O_DIRECT leaks memory on linux-2.6.0-test9

From: IWAMOTO Toshihiro
Date: Fri Nov 21 2003 - 01:18:50 EST


Hi,

recently I noticed that direct IO causes memory leaks with
linux-2.6.0-test9.
The program that causes memory leaks is "fsstress", which is
testcases/kernel/fs/fsstress in ltp-full-20031106.tgz (ftp from
http://sourceforge.net/projects/ltp/).

fsstress does various file operations, and I found that the problem is
with the combination of write and dread (O_DIRECT read).
You should be able to reproduce the bug with the following command
line.

$ while true; do ./fsstress -c -d /usr/src/test -z -f write=1 \
-f dread=1 -f creat=1 -S -n 1000 -p 32; done

The test machine is a quad P3 machine with the following file systems.
/usr/src is an ext3 file system but mounted as an ext2 using mount -t ext2.
$ mount -v
/dev/rd/c0d0p2 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/rd/c0d0p5 on /usr/src type ext2 (rw)


I didn't see memory leaks with the other three combinations of
read+write (dread+dwrite, read+dwrite, and read+write).

Any ideas?
I'll try to debug this next week, but rather like to see the fix
in the meanwhile. :)
--
IWAMOTO Toshihiro
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/