Subject: kern/13812: "mount_nfs -l" panics with "lockmgr: locking against myself"
To: None <>
From: None <>
List: netbsd-bugs
Date: 08/28/2001 14:06:00
>Number:         13812
>Category:       kern
>Synopsis:       "mount_nfs -l" panics with "lockmgr: locking against myself"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 28 11:02:00 PDT 2001
>Originator:     Nathan J. Williams
>Release:        NetBSD-current as of 2001-08-25
	Massachvsetts Institvte of Technology
System: NetBSD crash-test-dummy.putnam 1.5X NetBSD 1.5X (CTD) #2: Thu Aug 23 22:01:48 EDT 2001 nathanw@crash-test-dummy.putnam:/usr/build/CTD i386
Architecture: i386
Machine: i386
	Using the -l ("Use ReaddirPlus RPC") option to mount_nfs
causes a kernel panic, reliably. Traceback looks something like:

(gdb) target kcore /var/crash/netbsd.25.core
panic: lockmgr: locking against myself
#0  0x100 in ?? ()
(gdb) where
#0  0x100 in ?? ()
#1  0xc0206b9b in cpu_reboot (howto=256, bootstr=0x0)
    at /home/nathanw/work/sa/sys/arch/i386/i386/machdep.c:2012
#2  0xc0141375 in panic () at /home/nathanw/work/sa/sys/kern/subr_prf.c:251
#3  0xc0131b02 in lockmgr (lkp=0xc69f2538, flags=65538, interlkp=0xc69f24b4)
    at /home/nathanw/work/sa/sys/kern/kern_lock.c:659
#4  0xc0162b74 in genfs_lock (v=0xc6a988a4)
    at /home/nathanw/work/sa/sys/miscfs/genfs/genfs_vnops.c:323
#5  0xc016085b in VOP_LOCK (vp=0xc69f24b4, flags=65538)
    at /home/nathanw/work/sa/sys/kern/vnode_if.c:1079
#6  0xc016005a in vn_lock (vp=0xc69f24b4, flags=65538)
    at /home/nathanw/work/sa/sys/kern/vfs_vnops.c:610
#7  0xc015a024 in vrele (vp=0xc69f24b4)
    at /home/nathanw/work/sa/sys/kern/vfs_subr.c:1287
#8  0xc01da1a8 in nfs_readdirplusrpc (vp=0xc69db12c, uiop=0xc6a98a58, 
    cred=0xc052fa80) at /home/nathanw/work/sa/sys/nfs/nfs_vnops.c:2545
#9  0xc01bb3f5 in nfs_doio (bp=0xc250e528, p=0xc6937e14)
    at /home/nathanw/work/sa/sys/nfs/nfs_bio.c:929
#10 0xc01ba3ac in nfs_bioread (vp=0xc69db12c, uio=0xc6a98c28, ioflag=0, 
    cred=0xc052f680, cflag=1) at /home/nathanw/work/sa/sys/nfs/nfs_bio.c:304
#11 0xc01d859e in nfs_readdir (v=0xc6a98bbc)
    at /home/nathanw/work/sa/sys/nfs/nfs_vnops.c:2102
#12 0xc016075e in VOP_READDIR (vp=0xc69db12c, uio=0xc6a98c28, cred=0xc052f680, 
    eofflag=0xc6a98c14, cookies=0xc6a98c18, ncookies=0xc6a98c1c)
    at /home/nathanw/work/sa/sys/kern/vnode_if.c:932
#13 0xc01c5eff in nfs_cookieheuristic (vp=0xc69db12c, flagp=0xc0583dc0, 
    p=0xc6937e14, cred=0xc052f680)
    at /home/nathanw/work/sa/sys/nfs/nfs_subs.c:1776
#14 0xc01c94a3 in mountnfs (argp=0xc6a98e10, mp=0xc0583e00, nam=0xc04e7300, 
    pth=0xc6a98db4 "/d", hst=0xc6a98d58 "dd:/u1", vpp=0xc6a98d0c, p=0xc6937e14)
    at /home/nathanw/work/sa/sys/nfs/nfs_vfsops.c:730
#15 0xc01c9235 in nfs_mount (mp=0xc0583e00, 
    path=0xbfbfd8e4 <Address 0xbfbfd8e4 out of bounds>, data=0xbfbfd760, 
    ndp=0xc6a98e9c, p=0xc6937e14)
    at /home/nathanw/work/sa/sys/nfs/nfs_vfsops.c:607
#16 0xc015bd45 in sys_mount (l=0xc6907980, v=0xc6a98f80, retval=0xc6a98f78)
    at /home/nathanw/work/sa/sys/kern/vfs_syscalls.c:313

(Note that this traceback was taken from a kernel on the nathanw_sa
branch, but the problem is reproducable and was first detected on
vanilla -current on my macppc box, which doesn't support crash

The server is an Alpha also running -current. Unclear if this matters.

mount_nfs -l server:/filesystem /mountpoint