Subject: Re: kern/30100: large number of mounts (mount_null) causes panic
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Piotr Meyer <aniou@smutek.pl>
List: netbsd-bugs
Date: 05/01/2005 07:58:01
The following reply was made to PR kern/30100; it has been noted by GNATS.
From: Piotr Meyer <aniou@smutek.pl>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/30100: large number of mounts (mount_null) causes panic
Date: Sun, 1 May 2005 10:03:56 +0200
Strange. Looks like backtrace and 'how to repeat' has been deleted.
So, I try again:
>Description:
After making about 960 (values between 960 and 980, depends of machine
or kernel) mounts like:
mount_null /usr/src /mnt/test/001
mount_null /usr/src /mnt/test/002
mount_null /usr/src /mnt/test/003
and so on... causes (in this case on 976 mount):
panic: malloc: out of space in kmem_map
Stopped in pid 8383.1 (mount_null) at netbsd:cpu_Debugger+0x4:
popl %
ebp
db> bt
cpu_Debugger(c0668fd8,c762dcf8,0,1727,c0d7708c) at
netbsd:cpu_Debugger+0x4
panic(c0694620,0,10000,0,ffffffff) at netbsd:panic+0x12b
malloc(10000,c06cdda0,0,9,9) at netbsd:malloc+0x19d
hashinit(3fd3,0,c06cdda0,0,c4bf112c) at netbsd:hashinit+0x53
nullfs_mount(c4bf1200,bfbffa0c,bfbff860,c762de54,c758fb30) at
netbsd:nullfs_moun
t+0x1fc
sys_mount(c6ddcdec,c762df64,c762df5c,c758fb30,c762df74) at
netbsd:sys_mount+0x25
a
syscall_plain() at netbsd:syscall_plain+0x85
--- syscall (number 21) ---
0x480839b7:
db>
Tested on 2.0(official release), 2.0_STABLE(<28.04.2005),
3.0_BETA (<27.03.2005). I made some test about jails and
shared '/usr'... :)
How-To-Repeat:
Try (on 3.0_BETA):
mkdir -p /mnt/test
for a in `seq -w 1 999`; do mkdir /mnt/test/$a; done
for a in `seq -w 1 999`; do echo $a; mount_null /usr/src /mnt/test/$a; done
--
Piotr 'aniou' Meyer
http://smutek.pl/~aniou/