From owner-freebsd-bugs@FreeBSD.ORG Tue Nov 5 17:50:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6C6947BE for ; Tue, 5 Nov 2013 17:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4CC312988 for ; Tue, 5 Nov 2013 17:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id rA5Ho15i079618 for ; Tue, 5 Nov 2013 17:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id rA5Ho1nF079616; Tue, 5 Nov 2013 17:50:01 GMT (envelope-from gnats) Resent-Date: Tue, 5 Nov 2013 17:50:01 GMT Resent-Message-Id: <201311051750.rA5Ho1nF079616@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Edward O'Callaghan" Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3B2F4616 for ; Tue, 5 Nov 2013 17:45:20 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0FE9C293F for ; Tue, 5 Nov 2013 17:45:20 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rA5HjJF5038249 for ; Tue, 5 Nov 2013 17:45:19 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rA5HjJOK038247; Tue, 5 Nov 2013 17:45:19 GMT (envelope-from nobody) Message-Id: <201311051745.rA5HjJOK038247@oldred.freebsd.org> Date: Tue, 5 Nov 2013 17:45:19 GMT From: "Edward O'Callaghan" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/183689: [lock order reversal] when umounting a ZFS disk. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 17:50:01 -0000 >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: