NFSv234 server ported to FreeBSD6.0-BETA1

Kris Kennaway kris at obsecurity.org
Sat Jul 30 04:04:26 GMT 2005


On Fri, Jul 29, 2005 at 11:59:58PM -0400, Kris Kennaway wrote:

> OK, I got the server to work with a bit more hackery..there's clearly
> more integration needed with the FreeBSD build and /etc/rc.d process
> before this is ready to be committed though.  I'm only using nfsv3,
> because I couldn't get the FreeBSD nfs4 client to talk to the server:
> 
> haessal# mount_nfs4 dosirak:/c /dosirak/c
> mount_nfs4: /dosirak/c: Protocol not supported
> 
> (nothing logged on the server), and the mount_newnfs in the utils
> tarball does not compile on FreeBSD.

It died after a few seconds with:

panic: lockmgr: thread 0xc5aea000, not exclusive lock holder 0xc5ab0d80 unlocking
db> wh
Tracing pid 54836 tid 100188 td 0xc5aea000
kdb_enter(c06feb5a,1,c06fd00e,f7c86980,c5aea000) at kdb_enter+0x30
panic(c06fd00e,c5aea000,c06fcff8,c5ab0d80,c5aea000) at panic+0x13e
debuglockmgr(c62f8b2c,6,c62f8b6c,c5aea000,c06f8111) at debuglockmgr+0x59e
vop_stdunlock(f7c86a24,f7c86a34,786,c5b2b400,c5bac0ba) at vop_stdunlock+0x4d
VOP_UNLOCK_APV(c0749660,f7c86a24,2,f7c86a10,c06d6282) at VOP_UNLOCK_APV+0xb2
nfsrv_namei(c9d8de80,f7c86b7c,c62f8ad4,0,180) at nfsrv_namei+0x46b
nfsrvd_lookup(c9d8de80,c9bf4880,c62f8ad4,0,f7c86c1c) at nfsrvd_lookup+0xcf
nfsrvd_dorpc(c9d8de80,c9bf4880,c5aea000,6e5,0) at nfsrvd_dorpc+0x2f3
nfsrvd_nfsd(c5aea000,0,c070d4cc,33d,c5ae2cb0) at nfsrvd_nfsd+0x404
nfssvc(c5aea000,f7c86d04,8,bfbff000,2) at nfssvc+0x3a8
syscall(2806003b,2806003b,bfbf003b,2804f40b,bfbfe884) at syscall+0x295
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (155, FreeBSD ELF32, nfssvc), eip = 0x280ba523, esp = 0xbfbfe64c, ebp = 0xbfbfe848 ---
db>

show lockedvnods does not work:

db> show lockedvnods
Locked vnodes
panic: _mtx_lock_sleep: recursed on non-recursive mutex lockbuilder mtxpool @ ../../../kern/kern_lock.c:542
[...]

The running processes are:

60944 c5aef624    0 60936 60936 0004000 [CPU 0] cvsup
54836 c5ae2c48    0 54835 54835 0000000 [CPU 1] newnfsd

db> wh 60944
Tracing pid 60944 tid 100199 td 0xc5ab0d80
ipi_nmi_handler(c56af780,f780,82e80000,c56a4818,0) at ipi_nmi_handler+0x59
trap(c5ab0008,f7c60028,f7c60028,c5877060,c5877000) at trap+0x3f
Xnmi(c5877000,0,c0716b5c,56e,f7c65948) at Xnmi+0x1e
siointr(c5877000,c5ab0d80,f7c65948,c053f454,4) at siointr+0x35
intr_execute_handlers(c564dc90,f7c65960,f7c659c4,c06ac0a3,34) at intr_execute_handlers+0xb7
lapic_handle_intr(34) at lapic_handle_intr+0x3b
Xapic_isr1() at Xapic_isr1+0x33
--- interrupt, eip = 0xc05220ae, esp = 0xf7c659a4, ebp = 0xf7c659c4 ---
_mtx_lock_sleep(c075fcec,c5ab0d80,0,c06fceea,a7) at _mtx_lock_sleep+0x115
_mtx_lock_flags(c075fcec,0,c06fceea,a7,c5ab0d80) at _mtx_lock_flags+0x9f
debuglockmgr(c62f8b2c,6,c62f8b6c,c5ab0d80,c06f8111) at debuglockmgr+0x54
vop_stdunlock(f7c65a7c,2,c5ab0d80,c76bfe70,c62f8ad4) at vop_stdunlock+0x4d
VOP_UNLOCK_APV(c0749660,f7c65a7c,c07060b0,7de,f7c65bc0) at VOP_UNLOCK_APV+0xb2
vput(c62f8ad4,f7c65aec,f7c65ad8,c5ab0d80,17c) at vput+0xc8
lookup(f7c65b98,0,c07059b3,b4,c058b2af) at lookup+0x8f7
namei(f7c65b98,f7c65be8,60,0,c5ab0d80) at namei+0x40a
kern_lstat(c5ab0d80,8231dd4,0,f7c65c6c,b47) at kern_lstat+0x4f
lstat(c5ab0d80,f7c65d04,8,421,2) at lstat+0x2f
syscall(bfbf003b,bfbf003b,81b003b,bfbfee70,bfbfee5c) at syscall+0x295
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (190, FreeBSD ELF32, lstat), eip = 0x2819a427, esp = 0x81dbaa0, ebp = 0x81dbb3c ---
db> wh 54836
Tracing pid 54836 tid 100188 td 0xc5aea000
kdb_enter(c06feb5a,1,c06fd00e,f7c86980,c5aea000) at kdb_enter+0x30
panic(c06fd00e,c5aea000,c06fcff8,c5ab0d80,c5aea000) at panic+0x13e
debuglockmgr(c62f8b2c,6,c62f8b6c,c5aea000,c06f8111) at debuglockmgr+0x59e
vop_stdunlock(f7c86a24,f7c86a34,786,c5b2b400,c5bac0ba) at vop_stdunlock+0x4d
VOP_UNLOCK_APV(c0749660,f7c86a24,2,f7c86a10,c06d6282) at VOP_UNLOCK_APV+0xb2
nfsrv_namei(c9d8de80,f7c86b7c,c62f8ad4,0,180) at nfsrv_namei+0x46b
nfsrvd_lookup(c9d8de80,c9bf4880,c62f8ad4,0,f7c86c1c) at nfsrvd_lookup+0xcf
nfsrvd_dorpc(c9d8de80,c9bf4880,c5aea000,6e5,0) at nfsrvd_dorpc+0x2f3
nfsrvd_nfsd(c5aea000,0,c070d4cc,33d,c5ae2cb0) at nfsrvd_nfsd+0x404
nfssvc(c5aea000,f7c86d04,8,bfbff000,2) at nfssvc+0x3a8
syscall(2806003b,2806003b,bfbf003b,2804f40b,bfbfe884) at syscall+0x295
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (155, FreeBSD ELF32, nfssvc), eip = 0x280ba523, esp = 0xbfbfe64c, ebp = 0xbfbfe848 ---

Kris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20050730/25289b72/attachment.bin


More information about the freebsd-fs mailing list