Bug 125769 - [ses] [panic] getencstat(8) panics system with "Sleeping thread owns a non-sleepable lock"
Summary: [ses] [panic] getencstat(8) panics system with "Sleeping thread owns a non-sl...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: crash
Depends on:
Blocks:
 
Reported: 2008-07-19 14:20 UTC by David Adam
Modified: 2022-10-17 12:18 UTC (History)
0 users

See Also:


Attachments
file.txt (16.42 KB, text/plain)
2008-07-19 14:20 UTC, David Adam
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Adam 2008-07-19 14:20:01 UTC
I have an ses(4) device which I was investigating using, so compiled
/usr/share/examples/ses/getencstat and friends.

ses0 at ahc1 bus 0 target 6 lun 0
ses0: <ESG-SHV SCA HSBP M18 0.06> Fixed Processor SCSI-2 device 
ses0: 3.300MB/s transfers
ses0: SAF-TE Compliant Device

Running getencstat(8) produces no output but repeatably panics the
GENERIC kernel, complaining of "Sleeping thread (tid 100056, pid 57)
owns a non-sleepable lock" in ahc_lock [irq26: ahc1].

Dumping core is not possible because the panic prevents any further
SCSI traffic, but I have DDB available and can probably get remote GDB
set up. I have attached a file containing a dmesg and my best guesses
at useful DDB output - if I can provide anything more please let me know.

Fix: Patch attached with submission follows:
How-To-Repeat: 1. cd /usr/share/examples/ses/getencstat && make
2. cp /usr/share/examples/ses/getencstat/getencstat /tmp/getencstat
3. Reboot to single-user in order to prevent filesystem damage.
4. /tmp/getencstat /dev/ses0

This is repeatable both with the FreeBSD Update-provided kernel, and with
a GENERIC-DEBUG kernel config containing

include GENERIC
options KDB
options DDB
options KDB_TRACE

Kernel panics (or, in the file attached, enters DDB.)
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:01 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:18:04 UTC
Keyword: 

    crash

– in lieu of summary line prefix: 

    [panic]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>