Bug 164598 - swap/memory space can not be freed by kernel 2.6.9-5.EL
swap/memory space can not be freed by kernel 2.6.9-5.EL
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Larry Woodman
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2005-07-28 23:33 EDT by wanglei
Modified: 2007-11-30 17:07 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-08-01 09:43:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Graph Results (10.90 KB, application/pdf)
2005-12-12 01:22 EST, Ding Rui
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
IBM Linux Technology Center 17319 None None None Never

  None (edit)
Description wanglei 2005-07-28 23:33:59 EDT
RHLE4 (2.6.9-5.EL), i*86, powerpc

Steps to reproduce:
1. Start memtest to make the memory utilization reach a high level such as 90%
memtest:  http://carpanta.dc.fi.udc.es/~quintela/memtest/
You can use option -m to specify how many memory spaces you want to allocate for

2. Start an fsx-linux loop
fsx-linux is a test suit provided by LTP. http://ltp.sourceforge.net/
Its config file is $LTPROOT/runtest/ltp-aiodio.part3
Here is a script snippet to start the fsx-linux loop.

while :
	${LTPROOT}/pan/pan -e -S -a ltpaiodiopart3 -n ltp-aiodiopart3 -l
ltpaiodio3.logfile -o ltpaiodio3.outfile -f ${LTPROOT}/runtest/ltp-aiodio.part3

3. The memory will reach 100%, after that, the swap utilization begin
increasing. When swap get a high level (e.g. above 90%), terminate all the
memtest processes, we can see the memory will go back to normal because kernel
frees the memeory space occupied by memtest. 

4. Then terminate fsx-linux loop, swap will never come back to normal even
though many hours have past. Looks like kernel never free the memory and swap
spaces that fsx-linux had ever occupied.

Another simpler but taking-more-time way to reproduce the swap/mem problem:
1. Run the fsx-linux loop only, it will eat up memory and swap, how long it will
take depends on how many swap/mem a test machine has.

2. Terminate the fsx-linux loop, both memory and swap never go back to normal.

Looks like this is a defect related with 2.6.9-5.EL kernel because I has never
run into this problem on 2.6.12 kernel.
Comment 1 Dave Jones 2005-07-30 02:11:37 EDT
Several memory leaks were fixed in the U1 kernel. Please try and reproduce on
Comment 2 wanglei 2005-07-31 23:12:39 EDT
I will try this kernel. Thanks!
Comment 3 IBM Bug Proxy 2005-08-01 09:43:08 EDT
Closing bug,  Issue 76923 has been opened to mirror the IBM bug
Comment 4 Ding Rui 2005-12-12 00:55:53 EST
I used a simpler script as follows to reproduce this problem,so I will reopen it.

RHLE4 U3-BETA(2.6.9-22.EL) 
IBM Power4

export LTPROOT=/root/ltp-full-20050307
export PATH=$PATH:${LTPROOT}/testcases/bin
mkdir -p /test/aiodio/junkdir

while :
        ${LTPROOT}/testcases/kernel/io/ltp-aiodio/fsx-linux -N 10000  -o 32768 -
l 500000 -r 2048 -t 2048 -w 2048 -Z -R -W /test/aiodio/junkfile


There is one thing I noticed that the problem will not occure if run fsx-linux 
without '-Z' option(O_DIRECT). 
Comment 5 Ding Rui 2005-12-12 00:59:29 EST
Correct myself,the kernel version should be 2.6.9-24.EL,RHLE4 U3-BETA
Comment 6 Ding Rui 2005-12-12 01:22:22 EST
Created attachment 122121 [details]
Graph Results

I record the usage of mem and swap  in the whole test.

Note You need to log in before you can comment on or make changes to this bug.