Steinar H. Gunderson wrote:
thread, you'll see this patch which I wrote to fix the 1.1.0 issue. Could you
please try it under 1.0.12 and see if it fixes your problem?
--- a/support/export/client.c
+++ b/support/export/client.c
<at> <at> -329,6 +329,7 <at> <at> add_name(char *old, char *add)
strcat(new, ",");
strcat(new, cp);
}
+ free(old);
return new;
}
I've created a new package based on the etch package with the above file
patched, but it doesn't seem to help: the memory leak is still there.
I've created the package like this:
apt-get install build-essential
apt-get build-dep nfs-kernel-server
apt-get source nfs-kernel-server
cd nfs-utils*
vi debian/changelog
-> add a changelog entry
vi support/export/client.c
-> add the "free(old);" line
debian/rules binary
cd ..
dpkg -i nfs-kernel-server*.deb nfs-common*.deb
I reproduced the problem on a test system like this:
# On the server
-----
mkdir /exports
for i in testdir{a..z}; do
mkdir /exports/$i
echo "/exports/$i *(rw,async,no_root_squash)" >> /etc/exports
done
invoke-rc.d nfs-kernel-server restart
-----
# On 10 systems I run the following script
-----
#! /bin/bash
SOURCE="testserver:/exports"
MOUNTPOINT="/tmp/mount"
DELAY="1"
[[ -d $MOUNTPOINT ]] || mkdir $MOUNTPOINT
while true; do
for i in testdir{a..z} BOGUS; do
mount $SOURCE/$i $MOUNTPOINT
sleep $DELAY
umount $MOUNTPOINT
done
done
-----
On the server I run top sorted by memory usage. When rpc.mountd reaches
approx 1 minute of cpu time, the memory usage has increased by 0.6%.
If this bug is already fixed in new upstream versions (didn't check), do you think it's
possible to backport the fix to stable and ask for it's inclusion in a stable point release?
I believe it should be applicable, but I'm not sure if this is the bug you're
actually seeing. Do you have tons of mounts and umounts?
Should I repeat this with 1.0.12? Do you think 1.0.12 will get accepted
in 4.0r1 (if it fixes the problem)?
--
Rik Theys
KU Leuven - Dept. ESAT
Kasteelpark Arenberg 10
B-3001 LEUVEN - HEVERLEE
Tel.: +32(0)16/32.11.07
----------------------------------------------------------------
<<Any errors in spelling, tact or fact are transmission errors>>
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]