https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289114

            Bug ID: 289114
           Summary: Lock order reversal when using autofs on shutdown
                    (unmount)
           Product: Base System
           Version: 15.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: [email protected]
          Reporter: [email protected]

A lock order reversal is triggered during shutdown when an autofs mount is, or
should be, unmounted. It appears to also happen when an automounted FS has been
dismounted prior to the shutdown. It never occurs on a shutdown when autofs has
not been used. It may not occur when automount hold time has expired before the
shutdown.

I use automount frequently of a geli encrypted file system. I had to modify
/etc/autofs/special_media to add .eli file systems to the list of items that
trigger automount. This has worked successfully for several years.
Occasionally, after the error occurs I need to do an fsck after rebooting as
the file system is not marked clean, but usually this is not the case.

 lock order reversal:
  1st 0xfffff800827bee30 ufs (ufs, lockmgr) @
/usr/src/sys/kern/vfs_mount.c:2261
  2nd 0xfffff802348123e0 autofs (autofs, lockmgr) @
/usr/src/sys/kern/vfs_subr.c:4189
 lock order autofs -> ufs established at:
 #0 0xffffffff80beb7a4 at witness_checkorder+0x364
 #1 0xffffffff80b3ed46 at lockmgr_lock_flags+0x76
 #2 0xffffffff80f18f4d at ffs_lock+0x7d
 #3 0xffffffff8118af2a at VOP_LOCK1_APV+0x2a
 #4 0xffffffff80c93363 at _vn_lock+0x53
 #5 0xffffffff80c793cd at vget_finish+0x4d
 #6 0xffffffff80c651c1 at vfs_hash_get+0xd1
 #7 0xffffffff80f147a9 at ffs_vgetf+0x59
 #8 0xffffffff80f2642b at ufs_root+0x1b
 #9 0xffffffff80c7e5d6 at vfs_cache_root_fallback+0x116
 #10 0xffffffff82447d1b at autofs_trigger_vn+0x10b
 #11 0xffffffff824472d9 at autofs_readdir+0x279
 #12 0xffffffff8118a96a at VOP_READDIR_APV+0x2a
 #13 0xffffffff80c8f7f8 at kern_getdirentries+0x228
 #14 0xffffffff80c8fc29 at sys_getdirentries+0x29
 #15 0xffffffff810c3599 at amd64_syscall+0x169
 #16 0xffffffff81094b8b at fast_syscall_common+0xf8
 lock order ufs -> autofs attempted at:
 #0 0xffffffff80bec021 at witness_checkorder+0xbe1
 #1 0xffffffff80b3ee3a at lockmgr_lock_flags+0x16a
 #2 0xffffffff8118af2a at VOP_LOCK1_APV+0x2a
 #3 0xffffffff80c93363 at _vn_lock+0x53
 #4 0xffffffff80c7a381 at vflush+0x101
 #5 0xffffffff8244800c at autofs_unmount+0x2c
 #6 0xffffffff80c6e9a9 at dounmount+0x649
 #7 0xffffffff80c6e2fc at kern_unmount+0x30c
 #8 0xffffffff810c3599 at amd64_syscall+0x169
 #9 0xffffffff81094b8b at fast_syscall_common+0xf8
 exiting on signal 15

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to