Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 135621 - gamin-0.1.7 has a nasty memory leak in gam_server
Summary: gamin-0.1.7 has a nasty memory leak in gam_server
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-05 05:48 UTC by Morten Cools
Modified: 2006-12-20 06:51 UTC (History)
4 users (show)

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 Morten Cools 2006-06-05 05:48:05 UTC
Noticed a month or so ago that my system was getting noticably slower, and discovered that gam_server was eating up lots and lots of memory (>150 MB RAM and >550 MB swap). Killing the process freed the memory, but it turned out to be a temporary fix, since it immediately started growing again (estimated 2 KB per second). In the console used to start X, an error message is printed several times per second:

End from FAM server connection
invalid length 24902
invalid length 24902
invalid length 24902

info output:Portage 2.1_rc4-r1 (default-linux/x86/2005.1, gcc-4.1.1, glibc-2.4-r3, 2.6.16-gentoo-r4 i686)
=================================================================
System uname: 2.6.16-gentoo-r4 i686 AMD Athlon(tm) XP 2400+
Gentoo Base System version 1.12.0
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r1
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/conf.d"
CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms splitdebug strict"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ http://www.gigaload.org/gentoo.org/ http://gentoo.math.bme.hu"
LINGUAS="no en nl"
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'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 3dnow X alsa apache2 apm arts avi bash-completion berkdb bitmap-fonts bonobo bzip2 bzlib cdr cli crypt cups curl dba dbus divx4linux doc dri dvd dvdr eds emboss encode esd exif expat ffmpeg firefox flac foomaticdb fortran gd gdbm gif glut gmp gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal icq idn imagemagick imlib ipv6 isdnlog jack java jpeg junit kde kerberos lcms ldap libg++ libwww mad matroska mbox mhash mikmod mmx mmxext motif mp3 mpeg msn mysql ncurses nls nptl nptlonly ogg oggvorbis opengl oscar oss pam pcre pdflib perl php png pppd python qt quicktime readline reflection samba scanner sdk sdl session spell spl sse ssl tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts usb v4l v4l2 vorbis xml xml2 xmms xorg xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_wacom kernel_linux linguas_no linguas_en linguas_nl userland_GNU video_cards_nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Ville Mällinen 2006-12-06 08:38:32 UTC
This appears in amd64 systems too. Gamin slowly eats almost all ram then it starts swapping to disk. At that point system barely responds to user input. 

After setting up default setting for gamin in /etc/gamin/gaminrc there has been no more such swapping(fingers crossed). I'm using the 0.1.7 version. I wouldn't consider it stable given such issues.
The gaminrc:
none /var/log/*
none /home/<user>/.xsession-errors
none /mnt/*
none /home/*
none /video/*
fsset ext3 notify
fsset ext2 notify

emerge --info:
Portage 2.1.1-r2 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.18-gentoo-r2 x86_64)
=================================================================
System uname: 2.6.18-gentoo-r2 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.6
Last Sync: Wed, 06 Dec 2006 04:30:01 +0000
ccache version 2.3 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="ftp://trumpetti.atm.tut.fi/gentoo/ http://trumpetti.atm.tut.fi/gentoo/ http://ftp.linux.ee/pub/gentoo/distfiles/ ftp://ftp.linux.ee/pub/gentoo/distfiles/ ftp://ftp.du.se/pub/os/gentoo http://ds.thn.htu.se/linux/gentoo "
LANG="en_GB.utf8"
LC_ALL="en_GB.utf8"
LINGUAS="en_GB en fi"
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'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/sunrise /usr/portage/local/layman/mythtv"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X a52 aac acpi alsa apache2 apm authdaemond avahi berkdb bidi bitmap-fonts cairo cdda cdr cli cracklib crypt dbus dlloader dri dvb dvd dvdr dvdread eds elibc_glibc emboss encode fam ffmpeg firefox flac fortran gd gdbm gif gnome gnutls gpm gstreamer gtk gtk2 hal howl httpd iconv ieee1394 input_devices_keyboard input_devices_mouse ipod ipv6 isdnlog jabber java jpeg kernel_linux ldap libg++ libwww linguas_en linguas_en_GB linguas_fi live lm_sensors mad matroska mikmod mp3 mpeg musicbrainz mysql mysqli ncurses njb nls nptl nptlonly nsplugin nvidia ogg opengl oss pam pcre pdf perl png posix ppds pppd python qt3 qt4 quicktime readline reflection samba sasl sdl session slang sockets spell spl ssl stream subtitles svg swat tcpd theora truetype truetype-fonts type1-fonts udev unicode upnp userland_GNU userlocales v4l v4l2 vcd vhosts video_cards_fbdev video_cards_nvidia video_cards_vesa vlm vorbis wxwindows xinerama xml xorg xscreensaver xv xvid xvmc zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Erik 2006-12-06 13:22:25 UTC
I have problems with gam_server too. I just caught it constantly using between 20% and 30% CUP. It was only using 37m memory though (all according to top). Logging out to kdm and logging in again brought it back to 0.0% CPU (still 37m memory). I recall seeing something similar to the "invalid length" message in a log recently, although i cleaned away the old log files because they were growing huge.
Comment 3 Morten Cools 2006-12-07 09:41:44 UTC
I, on the other hand, no longer have this problem. One day I noticed that gam_server no longer was eating neither CPU nor RAM, and there had been no re-emerge of gamin in the meantime.

Unfortunately, I have no idea as to what resolved the situation, and seeing as how it has been 6 months since I first posted this, the maintainers/developers are not interested in researching it either.
Comment 4 Ryan Hill (RETIRED) gentoo-dev 2006-12-17 21:02:43 UTC
azarah has been MIA for quite a while now.  Gnome, does this fall under your umbrella?
Comment 5 Rémi Cardona (RETIRED) gentoo-dev 2006-12-17 23:44:29 UTC
Could you guys try with gamin-0.1.8 which is currently in unstable? If the leak is fixed there, we can file a stable request for this newer version.
Comment 6 Mart Raudsepp gentoo-dev 2006-12-18 00:03:21 UTC
GNOME-2.16 mostly uses the file alteration monitoring that is (now) in gnome-vfs, so very rare things out of official GNOME use gamin (virtual/fam really) at this point. gnome-vfs itself has a dep on it, but I'm not sure if that's correct - need to double-check. That doesn't mean we can't maintain it - I'll have to talk with others on that matter.

gamin-0.18 includes the reworked inotify based backend (that has been inside gnome-vfs code for a while now) and other fixes (I vaguely remember something about gam_server too) and should have less problems. Does the problem described here happen with gamin-0.18 too?
Comment 7 Rémi Cardona (RETIRED) gentoo-dev 2006-12-18 01:38:50 UTC
gnome-vfs does use fam/gamin. We could check the whole of gnome cvs, but a quick look reveals even nautilus was converted to use gnome-vfs monitoring back in 2002. In the Gnome stack, it's safe to say only gnome-vfs deps on it.
Comment 8 Morten Cools 2006-12-19 17:17:21 UTC
(In reply to comment #5)
> Could you guys try with gamin-0.1.8 which is currently in unstable? If the leak
> is fixed there, we can file a stable request for this newer version.
> 

As I said in my previous post, the memory leak suddenly stopped, and I have no idea what caused it. However, I do have gamin-0.1.8 installed, and the memory leak is not present there either.
Comment 9 Daniel Drake (RETIRED) gentoo-dev 2006-12-20 06:51:53 UTC
In that case, we can close this bug.