# uname -a FreeBSD leader.local 11.1-STABLE FreeBSD 11.1-STABLE #0 r325311: Fri Nov 3 03:31:50 ACDT 2017 root at leader.local:/usr/obj/usr/src/sys/GENERIC amd64 mounting a nullfs mount point causes a lock violation when running a debug kernel (enabling witness, invariants etc) After starting the system with the debug kernel I logged in as root and ran `mount_nullfs /var/crash /home/shane/test/crash` to get the following - Full core.txt at http://shaneware.biz/freebsddebugdata/core.txt-2017-11-25-13-19 http://shaneware.biz/freebsddebugdata/dmesg.boot Unread portion of the kernel message buffer: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0468cf4560 assert_vop_locked() at assert_vop_locked+0x77/frame 0xfffffe0468cf4590 VOP_UNLOCK_APV() at VOP_UNLOCK_APV+0xad/frame 0xfffffe0468cf45c0 nullfs_mount() at nullfs_mount+0x25f/frame 0xfffffe0468cf4700 vfs_donmount() at vfs_donmount+0xf6d/frame 0xfffffe0468cf4940 sys_nmount() at sys_nmount+0x72/frame 0xfffffe0468cf4980 amd64_syscall() at amd64_syscall+0x7a8/frame 0xfffffe0468cf4ab0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe0468cf4ab0 --- syscall (378, FreeBSD ELF64, sys_nmount), rip = 0x80086de6a, rsp 0x7fffffffe048, rbp = 0x7fffffffe990 --- vnode 0xfffff80209c00000: tag nullfs, type VNON usecount 1, writecount 0, refcount 1 mountedhere 0 flags (VI_ACTIVE) lock type nullfs: UNLOCKED vp=0xfffff80209c00000, lowervp=0xfffff80059f81c30 VOP_UNLOCK: 0xfffff80209c00000 is not locked but should be KDB: enter: lock violation panic: mtx_lock() of spin mutex (null) @ /usr/src/sys/fs/nullfs/null_vnops.c:720 cpuid = 1 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0468cf4400 vpanic() at vpanic+0x186/frame 0xfffffe0468cf4480 kassert_panic() at kassert_panic+0x126/frame 0xfffffe0468cf44f0 __mtx_lock_flags() at __mtx_lock_flags+0x158/frame 0xfffffe0468cf4540 null_unlock() at null_unlock+0x5d/frame 0xfffffe0468cf4590 VOP_UNLOCK_APV() at VOP_UNLOCK_APV+0xe8/frame 0xfffffe0468cf45c0 nullfs_mount() at nullfs_mount+0x25f/frame 0xfffffe0468cf4700 vfs_donmount() at vfs_donmount+0xf6d/frame 0xfffffe0468cf4940 sys_nmount() at sys_nmount+0x72/frame 0xfffffe0468cf4980 amd64_syscall() at amd64_syscall+0x7a8/frame 0xfffffe0468cf4ab0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe0468cf4ab0 --- syscall (378, FreeBSD ELF64, sys_nmount), rip = 0x80086de6a, rsp 0x7fffffffe048, rbp = 0x7fffffffe990 --- KDB: enter: panic Uptime: 9m25s Dumping 1053 out of 16295 MB:..2%..11%..22%..31%..41%..51%..61%..72%..81%..92% -- FreeBSD - the place to B...Spinning Destruction ;) Shane Ambler