Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Nov 2013 17:45:19 GMT
From:      "Edward O'Callaghan" <eocallaghan@alterapraxis.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/183689: [lock order reversal] when umounting a ZFS disk.
Message-ID:  <201311051745.rA5HjJOK038247@oldred.freebsd.org>
Resent-Message-ID: <201311051750.rA5Ho1nF079616@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 05 17:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Edward O'Callaghan
>Release:        ~ FreeBSD 10.0-BETA3
>Organization:
Altera Praxis Pty Ltd
>Environment:
FreeBSD acid.alterapraxis.com 11.0-CURRENT FreeBSD 11.0-CURRENT #3 r257709: Tue Nov  5 16:40:15 EST 2013     root@acid.alterapraxis.com:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
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 ---

---
>How-To-Repeat:
reboot
>Fix:
N/A.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311051745.rA5HjJOK038247>