during boot up, when mounting smbfs, following warning is displayed: lockmgr: thread 0xc1e56bd0 unlocking unheld lock KDB: stack backtrace: lockmgr(c2028d88,6,c2028dac,c1e56bd0,cc81a9fc) at lockmgr+0x6d9 smb_co_unlock(c2028d80,0,c1e56bd0,cc81aa1c,c2014290) at smb_co_unlock+0x2c smb_sm_init(cc81aa1c,c0493958,c1f1542c,c2026d62,c1f15400) at smb_sm_init+0x41 nsmb_dev_load(c1f15400,0,0,102,c05f7d1e) at nsmb_dev_load+0x25 module_register_init(c2028150,c05f7d1e,cc81aac0,cc81aac4,0) at module_register_init+0x73 linker_load_module(0,c1e54c00,0,0,cc81ac70) at linker_load_module+0x713 kldload(c1e56bd0,cc81ad04,4,1,cc81ad38) at kldload+0x195 syscall(3b,3b,3b,28050a1a,bfbfea20) at syscall+0x23b Xint0x80_syscall() at Xint0x80_syscall+0x1f --- syscall (304, FreeBSD ELF32, kldload), eip = 0x280d1843, esp = 0xbfbfe89c, ebp = 0xbfbfee68 --- Fix: I found that in smbfs_node.c, there is a path where smbfs_hash_unlock() is called twice. Following patch may avoid such situation. --- smbfs_node.c 17 Jan 2006 17:29:02 -0000 1.30 +++ smbfs_node.c 18 Mar 2006 23:38:47 -0000 @@ -222,12 +222,13 @@ (vp->v_type == VREG && (np->n_dosattr & SMB_FA_DIR) != 0)) { vgone(vp); vput(vp); - break; + goto unlocked; } *vpp = vp; return 0; } smbfs_hash_unlock(smp, td); +unlocked: /* * If we don't have node attributes, then it is an explicit lookup * for an existing vnode. How-To-Repeat: While booting up, I got two warnings. While shutting down, I got one. I have one smbfs entry in fstab.
Although the patch I submitted should be of some use, the problem it fixes seems not related to lockmgr warning I (and other guy) encountered. Title should be changed to something like: smbfs may cause double unlock and severity should be changed to "not serious" because it is fairly rare case, I think. Regards, SANETO Takanori
Responsible Changed From-To: freebsd-bugs->freebsd-fs Over to maintainer(s).
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped