Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Mar 2021 16:45:58 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 254437] Deadlock in ses_set_elm_status
Message-ID:  <bug-254437-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D254437

            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@FreeBSD.org
          Reporter: asomers@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+0x=
37f
fork_exit+0x7e fork_trampoline+0xe=20

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_st=
atus
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 itse=
lf
is responsible for waking up sesutil, via the wakeups in either
ses_fill_control_request or ses_process_control_request.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-254437-227>