From nobody Mon Jul 26 23:03:55 2021 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9547512BE9D5 for ; Mon, 26 Jul 2021 23:03:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GYb8C2LlYz3QRK for ; Mon, 26 Jul 2021 23:03:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3117F1F9F4 for ; Mon, 26 Jul 2021 23:03:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 16QN3tAY045865 for ; Mon, 26 Jul 2021 23:03:55 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 16QN3tn9045864 for bugs@FreeBSD.org; Mon, 26 Jul 2021 23:03:55 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 257439] [lor] lock order reversal when unmounting a UFS fs Date: Mon, 26 Jul 2021 23:03:55 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: pr@aoek.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D257439 Bug ID: 257439 Summary: [lor] lock order reversal when unmounting a UFS fs Product: Base System Version: CURRENT Hardware: arm64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: pr@aoek.com CC: fs@FreeBSD.org This lock order reversal is shown at after unmounting a UFS fs. I have been able to isolate two scenarios: 1) ZFS root, mount an external UFS, then unmount it lock order reversal: 1st 0xffffa00061bb3070 zfs (zfs, lockmgr) @ /usr/src/sys/kern/vfs_mount.c:= 1817 2nd 0xffffa0201d280e70 devfs (devfs, lockmgr) @ /usr/src/sys/kern/vfs_subr.c:3251 lock order devfs -> zfs established at: #0 0xffff0000004e091c at witness_checkorder+0x434 #1 0xffff0000004443e4 at lockmgr_xlock+0x50 #2 0xffff00000056ee98 at _vn_lock+0x54 #3 0xffff00000054f840 at vfs_domount+0xda4 #4 0xffff00000054d870 at vfs_donmount+0x2b8 #5 0xffff0000005522f8 at kernel_mount+0x4c #6 0xffff000000554a50 at parse_mount+0x49c #7 0xffff0000005532d0 at vfs_mountroot+0x6f0 #8 0xffff0000003ffb80 at start_init+0x24 #9 0xffff00000042cbdc at fork_exit+0x74 #10 0xffff0000007794dc at fork_trampoline+0x14 lock order zfs -> devfs attempted at: #0 0xffff0000004e10f4 at witness_checkorder+0xc0c #1 0xffff000000442984 at lockmgr_lock_flags+0x1e4 #2 0xffff00000056ee98 at _vn_lock+0x54 #3 0xffff000000559634 at vput_final+0x180 #4 0xffff0000006eda34 at ffs_unmount+0x2fc #5 0xffff000000550910 at dounmount+0x43c #6 0xffff00000055048c at kern_unmount+0x2d4 #7 0xffff000000779dd0 at do_el0_sync+0x4b8 #8 0xffff000000759a1c at handle_el0_sync+0x90 2) UFS root (in this case the lor shows at shutdown). lock order reversal: 1st 0xffffa0000b476770 ufs (ufs, lockmgr) @ /mnt/usr/src/sys/kern/vfs_mount.c:1817 2nd 0xffffa0000aa9ce70 devfs (devfs, lockmgr) @ /mnt/usr/src/sys/kern/vfs_subr.c:3009 lock order devfs -> ufs established at: #0 0xffff0000004e0ba0 at witness_checkorder+0x434 #1 0xffff000000442b90 at lockmgr_lock_flags+0x1e4 #2 0xffff0000006efe28 at ffs_lock+0x64 #3 0xffff00000056f18c at _vn_lock+0x54 #4 0xffff00000054fac4 at vfs_domount+0xda4 #5 0xffff00000054daf4 at vfs_donmount+0x2b8 #6 0xffff00000055257c at kernel_mount+0x4c #7 0xffff000000554cd4 at parse_mount+0x49c #8 0xffff000000553554 at vfs_mountroot+0x6f0 #9 0xffff0000003ffd84 at start_init+0x24 #10 0xffff00000042cde8 at fork_exit+0x74 #11 0xffff00000077a8ac at fork_trampoline+0x14 lock order ufs -> devfs attempted at: #0 0xffff0000004e1378 at witness_checkorder+0xc0c #1 0xffff0000004445f0 at lockmgr_xlock+0x50 #2 0xffff00000056f18c at _vn_lock+0x54 #3 0xffff0000005591a4 at vget_finish+0x4c #4 0xffff00000031b9d0 at devfs_allocv+0xd0 #5 0xffff00000031b15c at devfs_root+0x44 #6 0xffff00000055e638 at vfs_cache_root_fallback+0x15c #7 0xffff00000055a490 at vflush+0x5c #8 0xffff00000031b064 at devfs_unmount+0x34 #9 0xffff000000550b94 at dounmount+0x43c #10 0xffff00000055bc64 at vfs_unmountall+0xcc #11 0xffff00000052eaa4 at bufshutdown+0x288 #12 0xffff000000473be8 at kern_reboot+0x234 #13 0xffff000000473950 at sys_reboot+0x358 #14 0xffff00000077b1a0 at do_el0_sync+0x4b8 #15 0xffff00000075a21c at handle_el0_sync+0x90 All this is on a recent current: # uname -a FreeBSD asn 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n248066-439097486ba0:= Tue Jul 20 13:26:37 CEST 2021=20=20=20=20 root@asn:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64 This is similar to bug #256868 but I reported it independently because it happens on different circumstances. I am unable to test CURRENT on an hardware !=3D aarch64, so I am reporting = the bug for this hardware, but the lor might show up on different hardware as w= ell. Is this known? Shall it be reported? There is an outaded page http://sources.zabbadoz.net/freebsd/lor.html and I don't see this exact LOR there... --=20 You are receiving this mail because: You are the assignee for the bug.=