Richard B. Johnson wrote:On Fri, 22 Oct 2004, Kasper Sandberg wrote:The problem is, that the free memory reported by vmstat is decresing by 124mb for each 10-iterations....
On Fri, 2004-10-22 at 16:13 +0200, Kristian Sørensen wrote:
Hi all!
After some more testing after the previous post of the OOPS in
generic_delete_inode, we have now found a gigantic memory leak in Linux 2.6.
[789]. The scenario is the same:
File system: EXT3
Unpack and delete linux-2.6.8.1.tar.bz2 with this Bash while loop:
let "i = 0"
while [ "$i" -lt 10 ]; do
tar jxf linux-2.6.8.1.tar.bz2;
rm -fr linux-2.6.8.1;
let "i = i + 1"
done
When the loop has completed, the system use 124 MB memory more _each_ time....
so it is pretty easy to make a denial-of-service attack :-(
Do something like this with your favorite kernel version.....
while true ; do tar -xzf linux-2.6.9.tar.gz ; rm -rf linux-2.6.9 ; vmstat ; done
You can watch this for as long as you want. If there is no other
activity, the values reported by vmstat remain, on the average, stable.
If you throw in a `sync` command, the values rapidly converge to
little memory usage as the disk-data gets flused to disk.
The allocated memory does not get freed even if the system has been left alone for three hours!
Cheers, Kristian.
--
Kristian Sørensen
- The Umbrella Project
http://umbrella.sourceforge.net
E-mail: ipqw@xxxxxxxxxxxx, Phone: +45 29723816