Bug 232044 - [panic] sleepq_add: ...with sleeping prohibited after ejecting ODD/DVD media [cdcheckmedia() cam_periph_runccb()]
Summary: [panic] sleepq_add: ...with sleeping prohibited after ejecting ODD/DVD media ...
Status: Closed DUPLICATE of bug 219857
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2018-10-07 20:05 UTC by Harald Schmalzbauer
Modified: 2018-10-08 00:54 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Harald Schmalzbauer 2018-10-07 20:05:14 UTC

the following panic happens immediately after I eject ODD media on 12.0_ALPHA8 #0 r339222M:
panic: sleepq_add: td 0xfffff80002760580 to sleep on wchan 0xfffff8000a905048 with sleeping prohibited
cpuid = 0
time = 1538941032
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00004e2610
vpanic() at vpanic+0x1a3/frame 0xfffffe00004e2670
panic() at panic+0x43/frame 0xfffffe00004e26d0
sleepq_add() at sleepq_add+0x32c/frame 0xfffffe00004e2720
_sleep() at _sleep+0x261/frame 0xfffffe00004e27c0
cam_periph_runccb() at cam_periph_runccb+0x18d/frame 0xfffffe00004e2910
cdcheckmedia() at cdcheckmedia+0x8a/frame 0xfffffe00004e2990
cdstrategy() at cdstrategy+0x55/frame 0xfffffe00004e29c0
g_disk_start() at g_disk_start+0x334/frame 0xfffffe00004e2a20
g_io_schedule_down() at g_io_schedule_down+0x105/frame 0xfffffe00004e2a60
g_down_procbody() at g_down_procbody+0x6d/frame 0xfffffe00004e2a70
fork_exit() at fork_exit+0x84/frame 0xfffffe00004e2ab0
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe00004e2ab0
--- trap 0, rip = 0, rsp = 0, rbp = 0 ---
KDB: enter: panic

#10 0xffffffff80592083 in panic (fmt=<value optimized out>)
    at /usr/src/sys/kern/kern_shutdown.c:799
#11 0xffffffff805e748c in sleepq_add (wchan=0xfffff8000a905048, lock=0xfffff8000a94dcd0, wmesg=0xffffffff809cdf89 "cbwait", 
    flags=0, queue=0) at /usr/src/sys/kern/subr_sleepqueue.c:319
#12 0xffffffff8059ccd1 in _sleep (ident=0xfffff8000a905048, lock=<value optimized out>, priority=92, 
    wmesg=0xffffffff809cdf89 "cbwait", sbt=<value optimized out>, pr=0, flags=256)
    at /usr/src/sys/kern/kern_synch.c:201
#13 0xffffffff802ba7ed in cam_periph_runccb (ccb=0xfffff8000a905000, error_routine=0xffffffff802e10e0 <cderror>, 
    camflags=CAM_RETRY_SELTO, sense_flags=3, ds=0xfffff8000aa7fc60)
    at /usr/src/sys/cam/cam_periph.c:1141
#14 0xffffffff802e09ea in cdcheckmedia (periph=0xfffff8000ad44300)
    at /usr/src/sys/cam/scsi/scsi_cd.c:821
#15 0xffffffff802dd125 in cdstrategy (bp=0xfffff8000aa2f600) at /usr/src/sys/cam/scsi/scsi_cd.c:861
#16 0xffffffff8050eb54 in g_disk_start (bp=<value optimized out>)
    at /usr/src/sys/geom/geom_disk.c:478
#17 0xffffffff80512575 in g_io_schedule_down (tp=<value optimized out>)
    at /usr/src/sys/geom/geom_io.c:893
#18 0xffffffff80512d6d in g_down_procbody (arg=<value optimized out>)
    at /usr/src/sys/geom/geom_kern.c:111
#19 0xffffffff8055a5d4 in fork_exit (callout=0xffffffff80512d00 <g_down_procbody>, arg=0x0, frame=0xfffffe00004e2ac0)
    at /usr/src/sys/kern/kern_fork.c:1057
#20 0xffffffff808b917e in fork_trampoline () at /usr/src/sys/amd64/amd64/exception.S:993
#21 0x0000000000000000 in ?? ()

I've no idea where to start, hope this is trivial to fix before 12.0-release.

Comment 1 Kenneth D. Merry freebsd_committer 2018-10-08 00:54:01 UTC

*** This bug has been marked as a duplicate of bug 219857 ***