[Bug 254437] Deadlock in ses_set_elm_status

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Mar 20 16:45:59 UTC 2021


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

            Bug ID: 254437
           Summary: Deadlock in ses_set_elm_status
           Product: Base System
           Version: 12.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs at FreeBSD.org
          Reporter: asomers at FreeBSD.org

I ran `sudo sesutil fault all off` on a 12.1-STABLE system with 18 SES
expanders and lots of disks.  It hung.  Procstat shows the following:

49857 103730 sesutil             -                   mi_switch+0xd4
sleepq_wait+0x2c _sleep+0x253 ses_set_elm_status+0x86 enc_ioctl+0x4f1
devfs_ioctl+0xb0 VOP_IOCTL_APV+0x7b vn_ioctl+0x16a devfs_ioctl_f+0x1e
kern_ioctl+0x2b7 sys_ioctl+0xfa amd64_syscall+0x387 fast_syscall_common+0xf8

   55 100353 enc_daemon8         -                   mi_switch+0xd4
sleepq_wait+0x2c _sx_xlock_hard+0x3ee ses_publish_cache+0x1d1 enc_daemon+0x37f
fork_exit+0x7e fork_trampoline+0xe 

It looks like sesutil acquired enc->enc_cache_lock in enc_ioctl, at line 438
(line numbers correspond to 13.0-RC2 sources), then went on to block on
cam_periph_sleep(enc->periph, &req, PUSER, "encstat", 0); in ses_set_elm_status
at line 2794.  Meanwhile, enc_daemon is blocked trying to acquire
enc->enc_cache_lock in ses_publish_cache at line 1971.  But enc_daemon itself
is responsible for waking up sesutil, via the wakeups in either
ses_fill_control_request or ses_process_control_request.

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


More information about the freebsd-bugs mailing list