Bug 200353 - lock order reversal (vfs_mount.c and vfs_subr.c)
Summary: lock order reversal (vfs_mount.c and vfs_subr.c)
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: FreeBSD bugs mailing list
Depends on:
Reported: 2015-05-20 20:43 UTC by Tim Chase
Modified: 2016-01-19 07:04 UTC (History)
2 users (show)

See Also:

dmesg output with backtrace (10.54 KB, text/plain)
2015-05-20 20:43 UTC, Tim Chase
no flags Details
Output of "geli list" (812 bytes, text/plain)
2015-05-20 20:44 UTC, Tim Chase
no flags Details
Output of "zfs list" (762 bytes, text/plain)
2015-05-20 20:44 UTC, Tim Chase
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Chase 2015-05-20 20:43:01 UTC
Created attachment 156988 [details]
dmesg output with backtrace

On booting, I get this in my dmesg
lock order reversal:
 1st 0xfffff8003135e5f0 zfs (zfs) @ /usr/src/sys/kern/vfs_mount.c:848
 2nd 0xfffff800313d37c8 devfs (devfs) @ /usr/src/sys/kern/vfs_subr.c:2164
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00dcf75490
witness_checkorder() at witness_checkorder+0xe50/frame 0xfffffe00dcf75520
__lockmgr_args() at __lockmgr_args+0xacf/frame 0xfffffe00dcf75650
vop_stdlock() at vop_stdlock+0x3c/frame 0xfffffe00dcf75670
VOP_LOCK1_APV() at VOP_LOCK1_APV+0xfc/frame 0xfffffe00dcf756a0
_vn_lock() at _vn_lock+0x8a/frame 0xfffffe00dcf75710
vget() at vget+0x67/frame 0xfffffe00dcf75750
devfs_allocv() at devfs_allocv+0xfd/frame 0xfffffe00dcf757a0
devfs_root() at devfs_root+0x43/frame 0xfffffe00dcf757d0
vfs_donmount() at vfs_donmount+0x153e/frame 0xfffffe00dcf75aa0
sys_nmount() at sys_nmount+0x71/frame 0xfffffe00dcf75ae0
amd64_syscall() at amd64_syscall+0x25a/frame 0xfffffe00dcf75bf0
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe00dcf75bf0
--- syscall (378, FreeBSD ELF64, sys_nmount), rip = 0x800aac5fa, rsp = 0x7fffffffdc28, rbp = 0x7fffffffe190 ---
It doesn't appear to impact my system since (AFAICT) it appears to be working fine, but if it's a bug, I wanted to make sure it got reported.  I can provide extra info as needed, as it's just a tinkering machine.
Comment 1 Tim Chase 2015-05-20 20:44:06 UTC
Created attachment 156989 [details]
Output of "geli list"
Comment 2 Tim Chase 2015-05-20 20:44:41 UTC
Created attachment 156990 [details]
Output of "zfs list"
Comment 3 Paul Armstrong 2016-01-19 07:04:23 UTC
Still an issue as of 20160113-r293801

vfs_subr.c line has changed to 2477

This happens during jail creation with zfs based jails.