On an ARM64 PRi4B I get the following LOR: The system is mounting a NFS share very late, if this leads more towards solving this problem. lock order reversal: 1st 0xfffffd0061a35c10 ufs (ufs, lockmgr) @ /tank/nfs_public/tiny/src/sys/kern/vfs_mount.c:1008 2nd 0xfffffd0061a3b450 devfs (devfs, lockmgr) @ /tank/nfs_public/tiny/src/sys/kern/vfs_mount.c:1019 lock order devfs -> ufs established at: #0 0xffff00000040eeec at witness_lock_order_add+0xec #1 0xffff00000040e4e0 at witness_checkorder+0x23c #2 0xffff000000380ff8 at lockmgr_lock_flags+0x150 #3 0xffff0000005dea68 at ffs_lock+0x68 #4 0xffff0000006dc560 at VOP_LOCK1_APV+0x40 #5 0xffff00000048684c at VOP_LOCK1+0x2c #6 0xffff000000485578 at _vn_lock+0x38 #7 0xffff00000046c54c at vfs_domount_first+0x440 #8 0xffff000000469d14 at vfs_domount+0x270 #9 0xffff000000469040 at vfs_donmount+0x6cc #10 0xffff00000046bb1c at kernel_mount+0x54 #11 0xffff00000046e664 at parse_mount+0x270 #12 0xffff00000046d7b8 at vfs_mountroot_parse+0xf4 #13 0xffff00000046d2d4 at vfs_mountroot+0x25c #14 0xffff000000349f7c at start_init+0x2c #15 0xffff00000036e22c at fork_exit+0x80 lock order ufs -> devfs attempted at: #0 0xffff00000040e954 at witness_checkorder+0x6b0 #1 0xffff0000003823e4 at lockmgr_xlock+0x50 #2 0xffff000000462294 at vop_lock+0x7c #3 0xffff0000006dc560 at VOP_LOCK1_APV+0x40 #4 0xffff00000048684c at VOP_LOCK1+0x2c #5 0xffff000000485578 at _vn_lock+0x38 #6 0xffff00000046c54c at vfs_domount_first+0x440 #7 0xffff000000469d14 at vfs_domount+0x270 #8 0xffff000000469040 at vfs_donmount+0x6cc #9 0xffff000000468920 at sys_nmount+0x60 #10 0xffff0000006807f0 at syscallenter+0x2c8 #11 0xffff000000680170 at svc_handler+0x4c #12 0xffff00000067ff80 at do_el0_sync+0xf0 #13 0xffff000000667224 at handle_el0_sync+0x90
I believe this is a known false positive.
After some investigation, the LOR happens when a jail mounting it's devfs, or better said, if devfs is enabled in the jail configuration.
fixed in https://cgit.freebsd.org/src/commit?id=dbc689cdef0cc8ff11171642cdcf107dfbc3fb41