Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 203227 - app-admin/syslog-ng-2.0.6 reload causes high cpu load
Summary: app-admin/syslog-ng-2.0.6 reload causes high cpu load
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High trivial (vote)
Assignee: Mr. Bones. (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-24 13:35 UTC by Ortwin Glueck
Modified: 2008-04-01 13:40 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ortwin Glueck 2007-12-24 13:35:17 UTC
syslog-ng-2.0.6:

after calling /etc/init.d/syslog-ng reload the process uses between 8 and 10% CPU.  The effect does not occur when you use restart instead of reload. The effect did not occur in syslog-ng-1 Very annoying because reload is used by the logrotate script.

Reproducible: Always

Steps to Reproduce:
1. top
2. /etc/init.d/syslog-ng reload
3. see CPU load
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2007-12-27 06:42:47 UTC
This doesn't happen for me.  Reopen with the output from emerge --info
Comment 2 Ortwin Glueck 2007-12-27 11:40:21 UTC
Portage 2.1.3.19 (default-linux/x86/2006.1, gcc-4.1.2, glibc-2.6.1-r0, 2.6.22-gentoo-r9 i686)
=================================================================
System uname: 2.6.22-gentoo-r9 i686 AMD Athlon(tm) processor
Timestamp of tree: Thu, 27 Dec 2007 01:46:01 +0000
app-shells/bash:     3.2_p17
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.6.3, 1.7.9-r1, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.20-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-tbird -O3 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon-tbird -O3 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="metadata-transfer sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://mirror.switch.ch/mirror/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LINGUAS="en de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X509 acpi apache2 bash-completion berkdb bitmap-fonts bzip2 clamav cli cracklib crypt cups dri dvd fam ftp gdbm hpn iconv idn ieee1394 imap ipv6 isdnlog ldap maildir midi mime mmx ncurses network network-cron nls no-old-linux no-suexec nptl nptlonly openmp pam pcre perl ppds pppd python readline reflection sasl scanner screen session spf spl ssl tcpd tiff unicode urandom usb userlocales vim-syntax x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS



a normal top:
top - 12:39:12 up 24 days, 14:44,  2 users,  load average: 0.29, 1.73, 2.30
Tasks:  86 total,   1 running,  85 sleeping,   0 stopped,   0 zombie
Cpu0  :  4.8%us,  4.3%sy,  0.2%ni, 89.6%id,  0.9%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    515236k total,   497056k used,    18180k free,   154440k buffers
Swap:   514064k total,      200k used,   513864k free,    64364k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    1 root      15   0  1596  492  432 S  0.0  0.1   0:00.87 init
    2 root      14  -5     0    0    0 S  0.0  0.0   0:00.00 kthreadd
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.41 ksoftirqd/0
    4 root      10  -5     0    0    0 S  0.0  0.0   0:00.53 events/0
    5 root      10  -5     0    0    0 S  0.0  0.0   0:00.01 khelper
   52 root      16  -5     0    0    0 S  0.0  0.0   0:00.11 kblockd/0
   53 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 kacpid
   54 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 kacpi_notify


after reload:
top - 12:39:34 up 24 days, 14:44,  2 users,  load average: 0.35, 1.63, 2.25
Tasks:  90 total,   3 running,  84 sleeping,   0 stopped,   3 zombie
Cpu0  :  4.8%us,  4.3%sy,  0.2%ni, 89.6%id,  0.9%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    515236k total,   497484k used,    17752k free,   154440k buffers
Swap:   514064k total,      200k used,   513864k free,    64368k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
22976 root      25   0  2792  948  720 R  7.9  0.2   0:00.24 syslog-ng
    1 root      15   0  1596  492  432 S  0.0  0.1   0:00.87 init
    2 root      14  -5     0    0    0 S  0.0  0.0   0:00.00 kthreadd
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.41 ksoftirqd/0
    4 root      10  -5     0    0    0 S  0.0  0.0   0:00.53 events/0
    5 root      10  -5     0    0    0 S  0.0  0.0   0:00.01 khelper
   52 root      10  -5     0    0    0 S  0.0  0.0   0:00.11 kblockd/0
   53 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 kacpid


Comment 3 Ortwin Glueck 2007-12-27 12:15:49 UTC
Ok, found the problem. There were some program destinations configured: 

destination mail-alert { program("/usr/local/bin/syslog-mail"); };
destination mail-alert-perl { program("/usr/local/bin/syslog-mail-perl"); };

But these programs do not exist. strace shows that syslog-ng is looping while trying to start these processes. A reload makes the situation just worse (I think it just starts another loop). I have removed all non-existing program destinations from the config and now reload works fine. I will report upstream.
Comment 4 Romain Riviere 2008-04-01 13:40:02 UTC
Same problem here, on two different arches (ppc and amd64).
Perhaps this one could be reopened ?

Portage 2.1.4.4 (default-linux/amd64/2007.0/server, gcc-4.1.2, glibc-2.6.1-r0, 2.6.22.18-vs2.3.0.32 x86_64)
=================================================================
System uname: 2.6.22.18-vs2.3.0.32 x86_64 Intel(R) Celeron(R) CPU 2.66GHz
Timestamp of tree: Wed, 26 Mar 2008 23:00:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=nocona -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=nocona -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.ovh.net/gentoo-distfiles/ ftp://mirror.ovh.net/gentoo-distfiles/"
LANG="en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude /etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage-ppc /usr/local/portage-ovh"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64 apache2 authdaemon bash-completion berkdb bzip2 chroot cli cracklib crypt ctype cups curl dba dbm dovecot-sasl dynamicplugin emacs emul-linux-x86 fortran ftp gd gdbm gpm iconv imap iproute2 ipv6 ipv6arpa latin1 libwww logrotate maildir mailwrapper mbox midi mime mudflap multiuser mysql mysqli ncurses netboot nls nptl nptlonly openmp pam pcre pdf perl pg-hier php png pop pop3d posix postfix postgres python rar razor readline reflection sasl sensord session simplexml slang snmp sockets spamassassin spl ssl suexec tcpd threads tokenizer truetype unicode unzip userlocales vhosts xml xmlreader xmlrpc xmlwriter xsl zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status suexec unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="via"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

Portage 2.1.4.4 (default-linux/ppc/ppc32/2007.0/G4, gcc-4.1.2, glibc-2.6.1-r0, 2.6.19-gentoo-r5 ppc)
=================================================================
System uname: 2.6.19-gentoo-r5 ppc 7447A, altivec supported
Timestamp of tree: Sat, 15 Mar 2008 10:16:01 +0000
distcc 2.18.3 powerpc-unknown-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.6.3, 1.7.9-r1, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="ppc"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=altivec -fno-strict-aliasing -pipe"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -mcpu=G4 -mtune=G4 -maltivec -mabi=altivec -fno-strict-aliasing -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distcc distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.ovh.net/gentoo-distfiles/ ftp://mirror.ovh.net/gentoo-distfiles/ http://gentoo.modulix.net/gentoo/ http://ftp.club-internet.fr/pub/mirrors/gentoo ftp://gentoo.imj.fr/pub/gentoo/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ "
LC_ALL="en_GB.ISO-8859-15"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude /etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl altivec apache2 bash-completion berkdb bzip2 chroot cli cracklib crypt ctype cups curl dba dbm dbus dovecot-sasl dynamicplugin emacs foomaticdb ftp gd gdbm gpm iconv imap ipv6 ipv6arpa jpeg latin1 ldap logrotate maildir mbox mime mudflap multiuser mysql mysqli ncurses net netboot nls nptl nptlonly openmp pam pcre perl pg-hier php png pop pop3d posix postfix postgres ppc ppds python razor readline reflection samba sasl sensord session sockets spamassassin spell spl ssl sysfs syslog tcpd threads tokenizer truetype unicode unzip usb userlocales vhosts xml xmlreader xmlrpc xmlwriter xsl zip zlib" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="chips dummy fbdev glint imstt mach64 mga nv r128 radeon s3 s3virge savage sisusb tdfx trident v4l voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS