Bug 164598 - swap/memory space can not be freed by kernel 2.6.9-5.EL
Summary: swap/memory space can not be freed by kernel 2.6.9-5.EL
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Larry Woodman
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-07-29 03:33 UTC by wanglei
Modified: 2007-11-30 22:07 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-08-01 13:43:08 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
IBM Linux Technology Center 17319 0 None None None Never

Description wanglei 2005-07-29 03:33:59 UTC
Environment:
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
memtest.

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 :
do
	${LTPROOT}/pan/pan -e -S -a ltpaiodiopart3 -n ltp-aiodiopart3 -l
ltpaiodio3.logfile -o ltpaiodio3.outfile -f ${LTPROOT}/runtest/ltp-aiodio.part3
done

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 06:11:37 UTC
Several memory leaks were fixed in the U1 kernel. Please try and reproduce on
2.6.9-11.EL


Comment 2 wanglei 2005-08-01 03:12:39 UTC
I will try this kernel. Thanks!

Comment 3 IBM Bug Proxy 2005-08-01 13:43:08 UTC
Closing bug,  Issue 76923 has been opened to mirror the IBM bug

Comment 4 Ding Rui 2005-12-12 05:55:53 UTC
I used a simpler script as follows to reproduce this problem,so I will reopen it.

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

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

while :
do
        ${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

done
------------------------------------------------

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 05:59:29 UTC
Correct myself,the kernel version should be 2.6.9-24.EL,RHLE4 U3-BETA


Comment 6 Ding Rui 2005-12-12 06:22:22 UTC
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.