Bug 207048 - kernel panic at sleepq_add+0x1d0
Summary: kernel panic at sleepq_add+0x1d0
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2016-02-09 09:27 UTC by krishna
Modified: 2016-07-29 23:31 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description krishna 2016-02-09 09:27:40 UTC
Stack trace:

panic: sleepq_add: td 0xfffff8002adb24f0 to sleep on wchan 0xffffffff82541b08 with sleeping prohibited
cpuid = 2
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2c/frame 0xfffffe0094a43120
kdb_backtrace() at kdb_backtrace+0x53/frame 0xfffffe0094a431f0
vpanic() at vpanic+0x249/frame 0xfffffe0094a432c0
kassert_panic() at kassert_panic+0xc7/frame 0xfffffe0094a43350
sleepq_add() at sleepq_add+0x1d0/frame 0xfffffe0094a433c0
_sx_slock_hard() at _sx_slock_hard+0x714/frame 0xfffffe0094a435a0
__sx_slock() at __sx_slock+0x76/frame 0xfffffe0094a43600
_sx_slock() at _sx_slock+0x14d/frame 0xfffffe0094a43660
vtprintf() at vtprintf+0x4b/frame 0xfffffe0094a43710
krping_printf() at krping_printf+0x54/frame 0xfffffe0094a43780
krping_cq_event_handler() at krping_cq_event_handler+0x390/frame 0xfffffe0094a43860
c4iw_ev_handler() at c4iw_ev_handler+0xa0/frame 0xfffffe0094a438e0
service_iq() at service_iq+0x3b6/frame 0xfffffe0094a43a30
t4_intr() at t4_intr+0x54/frame 0xfffffe0094a43a70
intr_event_execute_handlers() at intr_event_execute_handlers+0x252/frame 0xfffffe0094a43ac0
ithread_execute_handlers() at ithread_execute_handlers+0x47/frame 0xfffffe0094a43af0
ithread_loop() at ithread_loop+0x106/frame 0xfffffe0094a43b70
fork_exit() at fork_exit+0x145/frame 0xfffffe0094a43bf0
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0094a43bf0
--- trap 0, rip = 0, rsp = 0, rbp = 0 ---
KDB: enter: panic

Location where the panic has hit:

sleepq_add(void *wchan, struct lock_object *lock, const char *wmesg, int flags,
    int queue)
        struct sleepqueue_chain *sc;
        struct sleepqueue *sq;
        struct thread *td;

        td = curthread;
        sc = SC_LOOKUP(wchan);
        mtx_assert(&sc->sc_lock, MA_OWNED);
        MPASS(td->td_sleepqueue != NULL);
        MPASS(wchan != NULL);
        MPASS((queue >= 0) && (queue < NR_SLEEPQS));

        /* If this thread is not allowed to sleep, die a horrible death. */
 ===>    KASSERT(td->td_no_sleeping == 0,
            ("%s: td %p to sleep on wchan %p with sleeping prohibited",
            __func__, td, wchan));

The panic is occuring when I am running krping kernel tool in a loop(and not through manual attempts)
Comment 1 John Baldwin freebsd_committer freebsd_triage 2016-07-29 23:31:16 UTC
This was fixed in r297945