kern/183689: [lock order reversal] when umounting a ZFS disk.

Edward O'Callaghan eocallaghan at
Tue Nov 5 17:50:01 UTC 2013

>Number:         183689
>Category:       kern
>Synopsis:       [lock order reversal] when umounting a ZFS disk.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 05 17:50:00 UTC 2013
>Originator:     Edward O'Callaghan
>Release:        ~ FreeBSD 10.0-BETA3
Altera Praxis Pty Ltd
FreeBSD 11.0-CURRENT FreeBSD 11.0-CURRENT #3 r257709: Tue Nov  5 16:40:15 EST 2013     root at  amd64

On reboot when unmounting a ZFS root there seems to be a lock order reversal between,
 1st 0xfffff800145fd7c8 zfs (zfs) @ /usr/src/sys/kern/vfs_mount.c:1237
 2nd 0xfffff800142ac240 devfs (devfs) @ /usr/src/sys/kern/vfs_subr.c:210

Since I can't understand the insane locking in vfs_mount.c:1237 I have no idea how to fix this.


Waiting (max 60 seconds) for system process `syncer' to stop...Syncing disks, vnodes remaining...0 0 0 0 0 0 0 done
Waiting (max 60 seconds) for system process `bufdaemon' to stop...done
All buffers synced.
lock order reversal:
 1st 0xfffff800145fd7c8 zfs (zfs) @ /usr/src/sys/kern/vfs_mount.c:1237
 2nd 0xfffff800142ac240 devfs (devfs) @ /usr/src/sys/kern/vfs_subr.c:2101
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe084d734460
kdb_backtrace() at kdb_backtrace+0x39/frame 0xfffffe084d734510
witness_checkorder() at witness_checkorder+0xd23/frame 0xfffffe084d7345a0
__lockmgr_args() at __lockmgr_args+0x86c/frame 0xfffffe084d7346d0
vop_stdlock() at vop_stdlock+0x3c/frame 0xfffffe084d7346f0
VOP_LOCK1_APV() at VOP_LOCK1_APV+0xf5/frame 0xfffffe084d734720
_vn_lock() at _vn_lock+0xab/frame 0xfffffe084d734790
vget() at vget+0x70/frame 0xfffffe084d7347e0
devfs_allocv() at devfs_allocv+0xfd/frame 0xfffffe084d734830
devfs_root() at devfs_root+0x43/frame 0xfffffe084d734860
dounmount() at dounmount+0x35a/frame 0xfffffe084d7348e0
vfs_unmountall() at vfs_unmountall+0x61/frame 0xfffffe084d734910
kern_reboot() at kern_reboot+0x548/frame 0xfffffe084d734980
sys_reboot() at sys_reboot+0x58/frame 0xfffffe084d7349a0
amd64_syscall() at amd64_syscall+0x265/frame 0xfffffe084d734ab0
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe084d734ab0
--- syscall (55, FreeBSD ELF64, sys_reboot), rip = 0x80085f3fc, rsp = 0x7fffffffda38, rbp = 0x7fffffffdba0 ---



More information about the freebsd-bugs mailing list