Bug 196799 - Lock order reversal after shutting down ZFS root system.
Summary: Lock order reversal after shutting down ZFS root system.
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-16 08:02 UTC by Yasuhiro KIMURA
Modified: 2018-07-12 06:25 UTC (History)
1 user (show)

See Also:


Attachments
Kernel config file (14.34 KB, text/plain)
2015-01-16 08:02 UTC, Yasuhiro KIMURA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhiro KIMURA 2015-01-16 08:02:41 UTC
Created attachment 151726 [details]
Kernel config file

root@rolling-vm-freebsd1:~ # uname -a                                      ~
FreeBSD rolling-vm-freebsd1.home.utahime.org 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r277230: Fri Jan 16 15:01:54 JST 2015     root@rolling-vm-freebsd1.home.utahime.org:/usr0/freebsd/src/obj/am/eastasia/usr0/freebsd/src/head/sys/STATIC_ZFS  amd64

root@rolling-vm-freebsd1:~ # shutdown -h now

...

All buffers synced.
lock order reversal:
 1st 0xfffff800062b1d50 zfs (zfs) @ /am/eastasia/usr0/freebsd/src/head/sys/kern/vfs_mount.c:1223
 2nd 0xfffff800062b25f0 devfs (devfs) @ /am/eastasia/usr0/freebsd/src/head/sys/kern/vfs_subr.c:2164
KBD: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe011c352660
witness_checkorder() ad witness_checkorder+0xe58/frame 0xfffffe011c3526f0
__lockmgr_args() at __lockmgr_args+0xacf/frame 0xfffffe011c352820
vop_stdlock() at vop_stdlock+0x3c/frame 0xfffffe011c352840
VOP_LOCK1-APV() at VOP_LOCK1-APV+0xfc/frame 0xfffffe011c352870
_vn_lock() at _vn_lock+0x8a/frame 0xfffffe011c3528e0
vget() at vget+0x67/frame 0xfffffe011c352920
devfs_allocv() at devfs_allocv+0xfd/frame 0xfffffe011c352970
devfs_root() at devfs_root+0x43/frame 0xfffffe011c3529a0
dounmount() at duunmount+0x349/frame 0xfffffe011c352a20
vfs_unmountall(0 at vfs_unmountall+0x61/frame 0xfffffe011c352a50
kern_reboot(0 at kern_reboot+0x4e6/frame 0xfffffe011c352ac0
sys_reboot(0 at sys_reboot+0x58/frame 0xfffffe011c352ae0
amd64_syscall() at amd64_syscall+0x25a/frame 0xfffffe011c352bf0
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe011c352bf0
--- syscall (55 FreeBSD ELF64 sys_reboot), rip = 0x40fcec, rsp = 0x7fffffffe6d8, rbp = 0x7fffffffe7d0 ---
Comment 1 Dom 2018-03-29 14:32:09 UTC
I'm still seeing this with a ZFS root volume on a GENERIC kernel, with the addition of INVARIANT_SUPPORT+INVARIANTS+WITNESS. The line numbers have changed slightly, I assume it's the same bug but the files have been modified in the last 3 years.

FreeBSD box 11.1-RELEASE-p8 FreeBSD 11.1-RELEASE-p8 #1: Thu Mar 29 12:02:06 UTC 2018     root@box:/usr/obj/usr/src/sys/WITNESS  amd64

/usr/src/sys/kern/vfs_mount.c:1271
/usr/src/sys/kern/vfs_subr.c:2533
Comment 2 Andriy Gapon freebsd_committer 2018-03-29 15:35:07 UTC
(In reply to Dom from comment #1)
Diagnostic messages don't necessarily imply a bug.
If you see the message but do not ever see any problem related to it, then you can ignore it.