Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 19067 - Memory Leak in Kernel 2.4.20-ck5 and 2.4.20-genroo-r2
Summary: Memory Leak in Kernel 2.4.20-ck5 and 2.4.20-genroo-r2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High critical
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-09 23:21 UTC by Nicolas Lidzborski
Modified: 2003-05-03 12:55 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 Nicolas Lidzborski 2003-04-09 23:21:05 UTC
The memory used by the buffers is never reclaimed by the kernel so it ends up
swapping and crashing.

Reproducible: Always
Steps to Reproduce:
1. Execute free
2. while(true) goto 1

Actual Results:  
Initial:
             total       used       free     shared    buffers     cached
Mem:        514964     211620     303344          0      41504      87100
-/+ buffers/cache:      83016     431948
Swap:       248996          0     248996


After 100:
             total       used       free     shared    buffers     cached
Mem:        514964     212084     302880          0      41520      87100
-/+ buffers/cache:      83464     431500
Swap:       248996          0     248996

After 1000:
             total       used       free     shared    buffers     cached
Mem:        514964     220948     294016          0      42192      89304
-/+ buffers/cache:      89452     425512
Swap:       248996          0     248996


Expected Results:  
Liberate the memory after being done with it.

Portage 2.0.47-r10 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4)
=================================================================
System uname: 2.4.20-ck5 i686 Intel(R) Pentium(R) 4 CPU 1.70GHz
GENTOO_MIRRORS="http://gentoo.oregonstate.edu/
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="x86 oss apm arts avi crypt cups encode gif jpeg kde gnome libg++ mikmod mmx
mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib alsa gdbm
berkdb slang readline tetex bonobo svga tcltk java guile ruby X sdl gpm tcpd pam
libwww ssl perl python esd imlib oggvorbis gtk qt motif opengl mozilla sse -3dnow"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O3 -fomit-frame-pointer -pipe"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"
Comment 1 Nicolas Lidzborski 2003-04-09 23:29:44 UTC
To test it:
i=0
while (( $i < 30000 )) ; do free  &> /dev/null ; ((  i++  )) ;  done

After a lot (80000 free ?):
             total       used       free     shared    buffers     cached
Mem:        514964     490584      24380          0      42308      90724
-/+ buffers/cache:     357552     157412
Swap:       248996          0     248996
Comment 2 Nicolas Lidzborski 2003-04-09 23:37:59 UTC
After 50000 more:

Now I have to reboot...             total       used       free     shared    buffers     cached
Mem:        514964     509864       5100          0        748       3952
-/+ buffers/cache:     505164       9800
Swap:       248996      45572     203424
Comment 3 Eric Paynter 2003-04-11 18:31:07 UTC
I also experienced this with gentoo-sources-2.4.20-r2. I was losing about 200MB per day while the box was idle. After a couple of days, it needed a reboot to release the memory. I switched to gaming-sources-2.4.20-r1 and the problem seems to have resolved.
Comment 4 Jay Pfeifer (RETIRED) gentoo-dev 2003-05-03 12:55:10 UTC
fixed in {gaming/gentoo}-sources-2.4.20-r3

closing.