Subject: kern/6397: "panic: locking against myself" with too many diskless clients.
To: None <gnats-bugs@gnats.netbsd.org>
From: Herb Peyerl <hpeyerl@beer.org>
List: netbsd-bugs
Date: 11/04/1998 11:48:07
>Number:         6397
>Category:       kern
>Synopsis:       "panic: locking against myself" with too many diskless clients.
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov  4 10:50:01 1998
>Last-Modified:
>Originator:     Herb Peyerl
>Organization:
>Release:        October 1st/98...
>Environment:
	i386.
System: 
	NetBSD 1.3H (LORDS) #2: Mon Nov  2 16:30:11 PST 1998
	hpeyerl@traci:/amd/seka/a/src/sys/arch/i386/compile/LORDS



>Description:

I have 16 sharks trying to boot diskless off a netbsd/i386 box and
when they all try to boot at once I see, on the NFS server:

traci# mountd -d
Getting export list.
Got line / -maproot=root -alldirs -network 192.168.5 -mask 255.255.255.0
Making new ep fs=0x400,0x78b
doing opt -maproot=root -alldirs -network 192.168.5 -mask 255.255.255.0
doing opt -alldirs -network 192.168.5 -mask 255.255.255.0
doing opt -network 192.168.5 -mask 255.255.255.0
doing opt -mask 255.255.255.0
Getting mount list.
Here we go.
Mount successful.
Mount successful.
Mount successful.
Mount successful.
Mount successful.
Mount successful.
Mount successful.
Mount successful.
panic: lockmgr: locking against myself
Stopped in nfsd at      _Debugger+0x4:  leave
db> t
_Debugger(f235e328,0,f22b2990,f0160727,f01603d5) at _Debugger+0x4
_panic(f01603d5,10002,f221c618,10002,9b) at _panic+0x55
_lockmgr(f235e328,10002,f221c6a4,f22b29c8,f018734f) at _lockmgr+0x2af
_ufs_lock(f22b29bc) at _ufs_lock+0x22
_vn_lock(f221c618,10002,f221c618,202,f22b29fc) at _vn_lock+0x3f
_vget(f221c618,10002) at _vget+0x6f
_ufs_ihashget(400,202,202,f235b6ac,f2314e04) at _ufs_ihashget+0x3c
_ffs_vget(f041f000,202,f22b2ac0,f2314e04,f22b2d54) at _ffs_vget+0x27
_ufs_lookup(f22b2b2c,0,f22b2d54,f22b2d78,f2314e04) at _ufs_lookup+0x9c4
_lookup(f22b2d54,0,3,f0470000,3) at _lookup+0x26d
_nfs_namei(f22b2d54,f22b2c4c,1,f0410500,f0487184) at _nfs_namei+0x2f4
_nfsrv_remove(f0470000,f0410500,f2200c30,f22b2e0c,f02e07e0) at _nfsrv_remove+0x
402
_nfssvc_nfsd(f22b2e50,329c,f2200c30,f02e07e0,f2200c30) at _nfssvc_nfsd+0x4ee
_sys_nfssvc(f2200c30,f22b2f88,f22b2f80,0,10) at _sys_nfssvc+0x50a
_syscall() at _syscall+0x25c
--- syscall (number 155) ---
0x4003d3af:
db>                              

>How-To-Repeat:
	boot a bunch of diskless clients off a single NFS server at the same
	time.
>Fix:
	don't do that. :-)
>Audit-Trail:
>Unformatted: