Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 262831 - dev-libs/glib-2.18.4-r1 causes syslog-ng to use 99% of cpu resources
Summary: dev-libs/glib-2.18.4-r1 causes syslog-ng to use 99% of cpu resources
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-17 19:27 UTC by François Valenduc
Modified: 2010-09-30 12:04 UTC (History)
2 users (show)

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


Attachments
sysprof output (sysprof,77.15 KB, text/plain)
2009-03-18 18:33 UTC, François Valenduc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description François Valenduc 2009-03-17 19:27:36 UTC
With glib-2.18.4-r1, syslog-ng constantly 99% of cpu resources. With glib-2.16.6, the problem doesn't occur. SO, my computer becomes rapidly unusable.

Reproducible: Always




output of emerge --info:

Portage 2.1.6.7 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.28.7 i686)
=================================================================
System uname: Linux-2.6.28.7-i686-Intel-R-_Pentium-R-_M_processor_1.50GHz-with-glibc2.0
Timestamp of tree: Tue, 17 Mar 2009 18:15:02 +0000
distcc 3.0 i686-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python:     2.5.2-r7
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.3
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.2/env /usr/kde/4.2/share/config /usr/kde/4.2/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /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/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages metadata-transfer parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.inode.at/ "
LANG="fr_BE.UTF-8"
LC_ALL="fr_BE.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="fr"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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/portage/local/layman/desktop-effects /usr/portage/local/layman/kde-testing /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X acl acpi alsa arts berkdb branding bzip2 cairo caps cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread emboss encode esd evo fam firefox fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog java jpeg kde kdeprefix kerberos kipi libnotify mad midi mikmod mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin ntpl ntplonly ogg opengl openmp oss pam pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis win32codecs x86 xml xorg xulrunner xv 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 mmap_emul 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="evdev synaptics mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Toralf Förster gentoo-dev 2009-03-17 20:10:31 UTC
Did you observe this issue w/ kernel 2.6.27 too ?
(b/c I observed a CPU ondemand governor issue with 2.6.28 at least at my ThinkPad T41)
Comment 2 François Valenduc 2009-03-17 21:16:56 UTC
I can't know if this issue also occurs with kernel 2.6.27. I don't use this kernel since many month and I have converted all my partitions to ext4 which is only available as ext4dev in 2.6.27. If I switch back to ext4dev and 2.6.27, I have to always use tune2fs to be able to mount my partitions.
I only upgraded to glib 2.18.4-r1 yesterday and I don't use the ondemand cpufreq governor.
Comment 3 Mart Raudsepp gentoo-dev 2009-03-17 22:16:29 UTC
Please use a profiler like sysprof to find out what functions are taking the time and what the trace looks like and such.
For that it's best to have debugging symbols available through having -ggdb in CFLAGS and splitdebug in FEATURES and recompiling glib
Comment 4 François Valenduc 2009-03-17 22:53:35 UTC
For me, your explanations looks a bit like chinese. I have created a file /etc/portage/env/dev-libs/glib containing the line CFLAGS="-O2 -pipe -march=i686 -ggdb". I also modified /etc/make.conf to add splitdebug in features and I have installed sysprof. What do I need to do next ?
Comment 5 François Valenduc 2009-03-18 18:33:07 UTC
Created attachment 185455 [details]
sysprof output

I managed to install and run sysprof. I hope it's the datas you were looking for.
Comment 6 Rémi Cardona (RETIRED) gentoo-dev 2009-03-19 11:00:15 UTC
The trace shows that syslog-ng is spending almost 3/4th of its time inside the kernel.

That one's going to be a toughie...
Comment 7 Krzysztof Pawlik (RETIRED) gentoo-dev 2009-09-13 18:56:21 UTC
François: are you still seeing this issue?

I've had the same and switching from pipe("/proc/kmsg") to file("/proc/kmsg") helped in my case.
Comment 8 Dan Reidy 2009-09-24 08:02:46 UTC
i have the exact same problem on 2 different machines.
a) Gentoo 2.0.1 AMD 64 
   kernel: sys-kernel/gentoo-sources (~)2.6.31
   profile: default/linux/amd64/10.0/desktop
   sys-libs/glibc: (~)2.10.1
   app-admin/syslog-ng: (~)3.0.4

b)  Gentoo 2.0.1 Pentium III
    kernel: sys-kernel/hardened-sources (~)2.6.29
    profile: hardened/linux/x86/10.0
    sys-libs/glibc: 2.9_p20081201-r2
    app-admin/syslog-ng: 2.1.4

as you can see, 2 very different machines, both exibiting similar problems. usually a SIGHUP will temporarily fix the issue, but i have to keep checking on it.

on the hardened machine, for example:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 8427 root      20   0  2232 1468 1272 R 96.4  0.2  11:28.18 syslog-ng                                                                                                                                           

Comment 9 Pacho Ramos gentoo-dev 2010-03-12 12:29:43 UTC
I cannot reproduce this at all, please try with current stable dev-libs/glib-2.22.4

Good luck
Comment 10 Rémi Cardona (RETIRED) gentoo-dev 2010-03-13 18:05:51 UTC
Please don't hesitate to reopen this bug if you can still reproduce with updated versions of glib and syslog-ng.

Thanks
Comment 11 François Valenduc 2010-04-05 08:33:21 UTC
In fact, this bug has been resolved by slsog-ng developers (see https://bugzilla.gnome.org/show_bug.cgi?id=575761 and https://bugzilla.balabit.com/show_bug.cgi?id=43).
Comment 12 Gilles Dartiguelongue (RETIRED) gentoo-dev 2010-09-30 12:03:56 UTC
I think we can conclude that version >= 2.1 of syslog-ng in tree are now safe to use. Thanks for the update.