Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 43667 - Memory leak
Summary: Memory leak
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-03 15:59 UTC by Hiel Van Campen
Modified: 2004-04-13 21:52 UTC (History)
1 user (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 Hiel Van Campen 2004-03-03 15:59:01 UTC
A large memory leak has occureing on my box for the last 1 1/2 wks. I shutdown
and restarted this morning. I did not start X. Free gave me 512M 67M used the
rest free at 9:00 AM. This afternoon I ran free again and 267M were used. This
with only seti and a halflife server running. I have been running both for over
6 months with no problems. This does continue until I reboot or crash.

emerge info
hielvc@tester hielvc $ evmrg info
Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 2.6.2-rc2)
=================================================================
System uname: 2.6.2-rc2 i686 AMD Athlon(tm) XP 2000+
Gentoo Base System version 1.4.3.13p1
distcc 2.12.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -Os -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config 
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ 
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
 /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon-xp -Os -pipe"
DISTDIR="/home/portage/distfiles"
FEATURES="autoaddcvs buildpkg ccache sandbox userpriv"
GENTOO_MIRRORS="ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://128.213.5.34/gentoo/"
MAKEOPTS="-j3 "
PKGDIR="/home/portage/packages"
PORTAGE_TMPDIR="/home/tmp"
PORTDIR="/home/portage"
PORTDIR_OVERLAY="/home/cvs"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X alsa apm arts async autofs avi berkdb bonobo cdr chroot crypt cups dillo 
doc encode esd foomaticdb freetype gdbm gif gnome gpm gtk gtk2 gvim hpijs imagemagick imlib 
java jpeg kde libg++ libwww mad mikmod mmx mmxext motif mozilla mpeg ncurses noreiserfs nptl 
oggvorbis opengl oss pam pdflib perl png python qt quicktime readline ruby samba sdl slang 
snmp spell sse ssl svga tcltk tcpd tetex truetype type1 unicode x86 xml2 xmms xv zlib"

hielvc@tester hielvc $ ps aux
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  1464  500 ?        S    09:00   0:04 init [3]  
root         2  0.0  0.0     0    0 ?        SWN  09:00   0:00 [ksoftirqd/0]
root         3  0.0  0.0     0    0 ?        SW<  09:00   0:00 [events/0]
root         4  0.0  0.0     0    0 ?        SW<  09:00   0:00 [kblockd/0]
root         5  0.0  0.0     0    0 ?        SW   09:00   0:00 [pdflush]
root         6  0.0  0.0     0    0 ?        SW   09:00   0:00 [pdflush]
root         7  0.0  0.0     0    0 ?        SW   09:00   0:00 [kswapd0]
root         8  0.0  0.0     0    0 ?        SW<  09:00   0:00 [aio/0]
root         9  0.0  0.0     0    0 ?        SW   09:00   0:00 [kseriod]
root        10  0.0  0.0     0    0 ?        SW   09:00   0:00 [kjournald]
root      5124  0.0  0.0     0    0 ?        SW   09:00   0:00 [kjournald]
root      5125  0.0  0.0     0    0 ?        SW   09:00   0:00 [kjournald]
root      5126  0.0  0.0     0    0 ?        SW   09:00   0:00 [kjournald]
root      5127  0.0  0.0     0    0 ?        SW<  09:00   0:00 [reiserfs/0]
root      5130  0.0  0.0     0    0 ?        SW   09:00   0:00 [khubd]
root      5924  0.0  0.1  1516  568 ?        S    09:00   0:00 /usr/sbin/syslogd -m 0
root      5926  0.0  0.0  1468  448 ?        S    09:00   0:00 /usr/sbin/klogd -c 3 -2
root      6010  0.0  0.0  1488  456 ?        S    09:00   0:00 /sbin/dhcpcd eth0
root      6022  0.0  0.3  4732 1752 ?        S    09:00   0:00 /usr/sbin/cupsd
root      6072  0.0  0.0  1680  496 ?        S    09:00   0:00 /usr/sbin/gpm -m /dev/psaux -t imps2 -Rraw -r 60
bin       6228  0.0  0.1  1668  652 ?        S    09:00   0:00 /sbin/portmap
root      6241  0.0  0.1  1632  692 ?        S    09:00   0:00 /sbin/rpc.statd -p 32765 -o 32766
root      6251  0.0  0.0     0    0 ?        SW   09:00   0:00 [nfsd]
root      6252  0.0  0.0     0    0 ?        SW   09:00   0:00 [nfsd]
root      6253  0.0  0.0     0    0 ?        SW   09:00   0:00 [nfsd]
root      6255  0.0  0.0     0    0 ?        SW   09:00   0:00 [lockd]
root      6256  0.0  0.0     0    0 ?        SW   09:00   0:00 [rpciod]
root      6259  0.0  0.1  1672  660 ?        S    09:00   0:00 /usr/sbin/rpc.mountd
root      6307 96.0  2.8 16868 14800 ?       RN   09:00 390:23 /opt/setiathome/setiathome -nice 19
root      6355  0.0  3.4 20324 17960 ?       S    09:00   0:00 /usr/bin/spamd -d -r /var/run/spamd.pid -a -c
root      6401  0.0  0.2  3288 1440 ?        S    09:00   0:00 /usr/sbin/sshd
root      6439  0.0  0.1  1656  656 ?        S    09:00   0:00 /usr/sbin/cron
root      6454  0.0  0.2  2264 1196 ?        S    09:00   0:00 login -- hielvc     
root      6455  0.0  0.2  2264 1148 ?        S    09:00   0:00 login -- ian     
root      6456  0.0  0.1  1508  572 tty3     S    09:00   0:00 /sbin/agetty 38400 tty3 linux
root      6457  0.0  0.1  2264 1016 ?        S    09:00   0:00 login -- root     
root      6458  0.0  0.1  1508  572 tty5     S    09:00   0:00 /sbin/agetty 38400 tty5 linux
root      6459  0.0  0.1  1508  572 tty6     S    09:00   0:00 /sbin/agetty 38400 tty6 linux
hielvc    6460  0.0  0.2  2216 1228 tty1     S    09:00   0:00 -bash
root      6476  0.0  0.2  2216 1228 tty4     S    09:01   0:00 -bash
ian       6483  0.0  0.2  2216 1240 tty2     S    09:01   0:00 -bash
ian       8798  0.0  0.1  2020  872 tty2     S    12:31   0:00 /bin/bash ./start_server
ian       8799  0.0  0.1  2024  916 tty2     S    12:31   0:00 /bin/sh ./hlds_run -game cstrike +ip 192.168.2.100 +maxplayers 12 +m
ian       8808  7.3 13.0 73920 67392 tty2    S    12:31  14:26 ./hlds_amd -game cstrike +ip 192.168.2.100 +maxplayers 12 +map de_du
hielvc   10646  0.0  0.1  2884  752 tty1     S    15:15   0:00 xinit /etc/xfce4/xinitrc
root     10647  0.8  2.5 64876 13160 ?       R    15:15   0:15 /etc/X11/X :0
hielvc   10649  0.0  0.1  2020  900 tty1     S    15:15   0:00 sh /etc/xfce4/xinitrc
hielvc   10656  0.0  0.8  9896 4516 ?        S    15:15   0:00 xfce-mcs-manager
hielvc   10658  0.0  0.9  9244 5140 tty1     S    15:15   0:00 xfwm4 --daemon
hielvc   10659  0.0  1.0  9516 5308 tty1     S    15:15   0:00 xftaskbar4
hielvc   10660  0.0  1.2 10496 6312 tty1     S    15:15   0:00 xfdesktop
hielvc   10662  0.4  1.4 12112 7644 tty1     S    15:15   0:07 /usr/bin/xfce4-panel
hielvc   10830  0.0  0.7  7452 4080 tty1     S    15:25   0:00 nedit
hielvc   10975  0.2  1.0 12124 5444 tty1     S    15:36   0:01 multi-gnome-terminal
hielvc   10976  0.0  0.1  1668  596 tty1     S    15:36   0:00 mgt-pty-helper
hielvc   10977  0.0  0.2  2220 1228 pts/0    S    15:36   0:00 -bash
hielvc   11024  0.7  3.6 38132 18568 tty1    S    15:38   0:03 abiword
hielvc   11026  0.0  0.7  5464 3620 tty1     S    15:39   0:00 /usr/libexec/gconfd-2 13
hielvc   11144  0.0  0.1  2440  812 pts/0    R    15:47   0:00 ps au
Comment 1 Hiel Van Campen 2004-03-03 18:51:32 UTC
Here is a list of programs emerge in the last month.

1076912290: Started emerge on: Feb 15, 2004 22:18:10
1076912290:  *** emerge --upgradeonly --deep --buildpkg --update world
1076912306:  >>> emerge (1 of 73) sys-devel/libtool-1.5.2-r3 to /

1076912475:  >>> emerge (2 of 73) app-portage/gentoolkit-0.2.0_pre6 to /

1076912506:  >>> emerge (3 of 73) x11-base/opengl-update-1.6 to /

1076912519:  >>> emerge (4 of 73) sys-apps/baselayout-1.8.6.13 to /

1076912562:  >>> emerge (5 of 73) x11-base/xfree-4.3.0-r4 to /

1076915587:  >>> emerge (6 of 73) sys-devel/automake-1.8.2 to /

1076915638:  >>> emerge (7 of 73) sys-apps/help2man-1.33.1 to /

1076915653:  >>> emerge (8 of 73) sys-devel/gcc-config-1.3.5 to /

1076915672:  >>> emerge (9 of 73) sys-devel/gcc-3.3.2-r7 to /

1076918205:  >>> emerge (10 of 73) sys-libs/glibc-2.3.3_pre20040207 to /

1076920471:  >>> emerge (11 of 73) x11-libs/gtk+-1.2.10-r11 to /

1076920725:  >>> emerge (12 of 73) media-sound/esound-0.2.32-r1 to /

1076920775:  >>> emerge (13 of 73) sys-devel/gettext-0.12.1-r1 to /

1076920938:  >>> emerge (14 of 73) x11-libs/qt-3.3.0 to /

1076923403:  >>> emerge (15 of 73) sys-apps/module-init-tools-3.0_pre9 to /

1076923451:  >>> emerge (16 of 73) sys-kernel/development-sources-2.6.3_rc2 to /

1076923831:  >>> emerge (17 of 73) media-libs/libvorbis-1.0.1-r2 to /

1076923902:  >>> emerge (18 of 73) kde-base/arts-1.2.0 to /

1076924309:  >>> emerge (19 of 73) dev-util/intltool-0.30 to /

1076924328:  >>> emerge (20 of 73) gnome-base/gnome-vfs-2.4.2-r1 to /

1076924515:  >>> emerge (21 of 73) kde-base/kdelibs-3.2.0 to /
1076924515:  === (21 of 73) Cleaning (kde-base/kdelibs-3.2.0::/home/portage/kde-base/kdelibs/kdelibs-3.2.0.ebuild)
1076924515:  === (21 of 73) Compiling/Packaging (kde-base/kdelibs-3.2.0::/home/portage/kde-base/kdelibs/kdelibs-3.2.0.ebuild)
1076926100:  *** terminating.
1076950916: Started emerge on: Feb 16, 2004 09:01:56
1076950916:  *** emerge --buildpkg system
1076950917:  >>> emerge (1 of 4) app-shells/sash-3.7 to /

1076950941:  >>> emerge (2 of 4) sys-apps/kbd-1.12-r2 to /

1076950973:  >>> emerge (3 of 4) sys-apps/hdparm-5.5 to /

1076950989:  >>> emerge (4 of 4) sys-devel/autoconf-2.59-r2 to /

1076951015:  ::: completed emerge (4 of 4) sys-devel/autoconf-2.59-r2 to /

1076952553: Started emerge on: Feb 16, 2004 09:29:13
1076952553:  *** emerge --upgradeonly --deep --buildpkg --update system
1076952556:  >>> emerge (1 of 5) sys-devel/gnuconfig-20040214 to /

1076952570:  >>> emerge (2 of 5) media-libs/freetype-2.1.5-r1 to /

1076952642:  >>> emerge (3 of 5) x11-base/xfree-4.3.0-r5 to /

1076955810:  >>> emerge (4 of 5) dev-lang/ruby-1.8.1-r2 to /

1076955997:  >>> emerge (5 of 5) app-editors/vim-core-6.2-r7 to /

1076957566: Started emerge on: Feb 16, 2004 10:52:46
1076957566:  *** emerge --buildpkg world
1076957568:  >>> emerge (1 of 47) gnome-extra/at-spi-1.3.12 to /

1076957690:  >>> emerge (2 of 47) app-office/abiword-2.0.3 to /

1076958252:  >>> emerge (3 of 47) media-libs/taglib-1.0_beta2 to /

1076958333:  >>> emerge (4 of 47) media-libs/musicbrainz-2.0.2-r2 to /

1076959444: Started emerge on: Feb 16, 2004 11:24:04
1076959444:  *** emerge --buildpkg world
1076959447:  >>> emerge (1 of 44) kde-base/kdelibs-3.2.0 to /
1076959447:  === (1 of 44) Cleaning (kde-base/kdelibs-3.2.0::/home/portage/kde-base/kdelibs/kdelibs-3.2.0.ebuild)
1076959454:  === (1 of 44) Compiling/Packaging (kde-base/kdelibs-3.2.0::/home/portage/kde-base/kdelibs/kdelibs-3.2.0.ebuild)
1076960015:  *** terminating.
1076992442: Started emerge on: Feb 16, 2004 20:34:02
1076992442:  *** emerge --buildpkg qt arts
1076992442:  >>> emerge (1 of 2) x11-libs/qt-3.3.0 to /

1076992921:  >>> emerge (2 of 2) kde-base/arts-1.2.0 to /

1076993459: Started emerge on: Feb 16, 2004 20:50:59
1076993459:  *** emerge --buildpkg world
1076993472:  >>> emerge (1 of 44) kde-base/kdelibs-3.2.0 to /
1076993472:  === (1 of 44) Cleaning (kde-base/kdelibs-3.2.0::/home/portage/kde-base/kdelibs/kdelibs-3.2.0.ebuild)
1076993480:  === (1 of 44) Compiling/Packaging (kde-base/kdelibs-3.2.0::/home/portage/kde-base/kdelibs/kdelibs-3.2.0.ebuild)
1076994530: Started emerge on: Feb 16, 2004 21:08:50
1076994530:  *** emerge --buildpkg search icc
1076994549:  *** terminating.
1076999572:  === (1 of 44) Merging (kde-base/kdelibs-3.2.0::/home/portage/kde-base/kdelibs/kdelibs-3.2.0.ebuild)
1076999824:  === (1 of 44) Post-Build Cleaning (kde-base/kdelibs-3.2.0::/home/portage/kde-base/kdelibs/kdelibs-3.2.0.ebuild)
1076999845:  >>> AUTOCLEAN: kde-base/kdelibs
1076999845:  --- AUTOCLEAN: Nothing unmerged.
1076999845:  ::: completed emerge (1 of 44) kde-base/kdelibs-3.2.0 to /
1076999845:  >>> emerge (2 of 44) media-libs/musicbrainz-2.0.2-r2 to /
1076999845:  === (2 of 44) Cleaning (media-libs/musicbrainz-2.0.2-r2::/home/portage/media-libs/musicbrainz/musicbrainz-2.0.2-r2.ebuild)
1076999847:  === (2 of 44) Compiling/Packaging (media-libs/musicbrainz-2.0.2-r2::/home/portage/media-libs/musicbrainz/musicbrainz-2.0.2-r2.ebuild)
1076999904:  *** terminating.
1077034661: Started emerge on: Feb 17, 2004 08:17:41
1077034661:  *** emerge --buildpkg unmerge bogofilter alsa-driver-p

1077034697:  *** emerge --buildpkg unmerge alsa-driver

1077034707:  *** terminating.

1077072212: Started emerge on: Feb 17, 2004 18:43:32
1077072212:  *** emerge --buildpkg musicbrainz
1077072212:  >>> emerge (1 of 1) media-libs/musicbrainz-2.0.2-r2 to /
1077072212:  === (1 of 1) Cleaning (media-libs/musicbrainz-2.0.2-r2::/home/portage/media-libs/musicbrainz/musicbrainz-2.0.2-r2.ebuild)
1077072214:  === (1 of 1) Compiling/Packaging (media-libs/musicbrainz-2.0.2-r2::/home/portage/media-libs/musicbrainz/musicbrainz-2.0.2-r2.ebuild)
1077072356:  *** terminating.
1077072703: Started emerge on: Feb 17, 2004 18:51:43
1077072703:  *** emerge --buildpkg musicbrainz
1077072703:  >>> emerge (1 of 1) media-libs/musicbrainz-2.0.2-r2 to /
1077072703:  === (1 of 1) Cleaning (media-libs/musicbrainz-2.0.2-r2::/home/portage/media-libs/musicbrainz/musicbrainz-2.0.2-r2.ebuild)
1077072704:  === (1 of 1) Compiling/Packaging (media-libs/musicbrainz-2.0.2-r2::/home/portage/media-libs/musicbrainz/musicbrainz-2.0.2-r2.ebuild)
1077072840:  *** terminating.

1077320131: Started emerge on: Feb 20, 2004 15:35:31
1077320131:  *** emerge --buildpkg iptables
1077320131:  >>> emerge (1 of 1) net-firewall/iptables-1.2.9 to /

1077499021: Started emerge on: Feb 22, 2004 17:17:01
1077499021:  *** emerge --usepkgonly --buildpkg --usepkg coreutils
1077499029:  >>> emerge (1 of 1) sys-apps/coreutils-5.0.91-r4 to /

1077579661: Started emerge on: Feb 23, 2004 15:41:01
1077579661:  *** emerge --buildpkg fdutils
1077579661:  >>> emerge (1 of 1) app-misc/fdutils-5.4.20020222-r1 to /

1077590731: Started emerge on: Feb 23, 2004 18:45:31
1077590731:  *** emerge --buildpkg coreutils
1077590731:  >>> emerge (1 of 1) sys-apps/coreutils-5.0.91-r4 to /
 
1077859111:  *** emerge --buildpkg enscript
1077859111:  >>> emerge (1 of 1) app-text/enscript-1.6.3-r1 to /


1078121926: Started emerge on: Feb 29, 2004 22:18:46
1078121926:  *** emerge --upgradeonly --deep --buildpkg --update system
1078121930:  >>> emerge (1 of 9) dev-java/java-config-1.2.6 to /

1078121956:  >>> emerge (2 of 9) sys-devel/autoconf-2.59-r3 to /

1078121989:  >>> emerge (3 of 9) sys-devel/binutils-2.14.90.0.8-r1 to /

1078122312:  >>> emerge (4 of 9) sys-devel/gcc-3.3.3 to /

1078125438:  >>> emerge (5 of 9) sys-apps/baselayout-1.8.6.13-r1 to /

1078125483:  >>> emerge (6 of 9) sys-apps/module-init-tools-3.0_pre10 to /

1078125538:  >>> emerge (7 of 9) sys-apps/less-382 to /

1078125573:  >>> emerge (8 of 9) sys-apps/procps-3.2.0 to /

1078125606:  >>> emerge (9 of 9) net-misc/openssh-3.8_p1 to /
Comment 2 Brian Jackson (RETIRED) gentoo-dev 2004-03-04 00:19:56 UTC
Does it ever run totally out of memory? (i.e. does the oom killer start killing processess?) If not then what you are seeing is normally caching. The kernel keeps various different caches for different subsystems. It will free a majority of these caches when it needs to.
Comment 3 Hiel Van Campen 2004-03-04 09:03:31 UTC
Yes it crashed 3or 4 days ago. I run "free" or top daily and Xfce has a little cpu, mem, swap thingee. I use them to check if seti is still running. Theres a bug in the init script where if seti cont connect to up and down load it shuts down with out killing its pid and I have to zap it and manually remove the pid. Anyway Im use to seeing the mem usage going up down. But in the last 3 to 1 1/2 wks the memusage goes up but doesnt come down or more correctly doesnt down as far as it should. I'm in X now with Mozzila, 2 dillo's ( abrowser) and splyheed-claws. Xtce thingee is showing 96 to 97M memory usage. In g-muti-term free reports:
hielvc@tester hielvc $ free
             total       used       free     shared    buffers     cached
Mem:        515412     178616     336796          0      12200      77644
-/+ buffers/cache:      88772     426640
Swap:       506036          0     506036

which is something I noticed last night the descrepincey between the 2 reports.
Now If i shutdown everything and leave X i should go back to about 67 to 72Megs of usage in free, I started at 67M after shutting down this morning as when I checked, with no X just 3 terms with halflife and seti going, free showed 420M used. This started after I unmerged bogoflilters and went to spamassine about 3 wks ago. Anyway shut down X stopped spamd and 200M gobled up over night. I tried kernel 2.6.1 same thing happening.   
Comment 4 Brian Jackson (RETIRED) gentoo-dev 2004-03-04 09:47:44 UTC
Spamassassin is notorious for consuming whatever resources it can. Have you tried a 2.4 kernel?
Comment 5 Hiel Van Campen 2004-03-04 15:23:17 UTC
Well I tried to install a 2.4.25 kernel but upon trying to boot I get "FATAL:kernel too old
Kernel panic...."

joy joy
 
Comment 6 Hiel Van Campen 2004-03-04 15:30:29 UTC
Also I removed spamassine from init and sylpheed which gave me a another 20M available on boot but still 1 to 2Megs an hour are going into the used colume and are not being releashed.
Comment 7 Martin Holzer (RETIRED) gentoo-dev 2004-03-04 15:36:37 UTC
maybe its releated to bug #43471
Comment 8 Hiel Van Campen 2004-03-04 17:21:39 UTC
No HIGHMEM IS off. 
This might be a problem with spamassine. As I said previously its now off but I had setup a cron job to log date & free hourly as such " * */1 * * * " which started doingit every minute?!? Another 'what the flock!" So I changed it to "*/30 * * * *" and its working as advertised once every 30minutes. Anyway after that free was antually droping in mem usage so I.m monitoring it now and should know by tommorrow.
Comment 9 Jason Cox (RETIRED) gentoo-dev 2004-03-29 07:22:59 UTC
To test a 2.4 kernel, you're going to have to disable nptl. That means grabbing the binaries from http://dev.gentoo.org/~avenj/bins or rebuilding glibc without nptl support. I would still like to see the results on a 2.4 kernel if you have the time.
Comment 10 Jason Cox (RETIRED) gentoo-dev 2004-04-13 21:52:44 UTC
This issue was a spamassassin/cron problem. Changing crontab fixed it (so it seems).