kern/102654: panic: sleeping thread

Eric van Gyzen eric at vangyzen.net
Tue Aug 29 18:30:18 UTC 2006


>Number:         102654
>Category:       kern
>Synopsis:       panic: sleeping thread
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 29 18:30:16 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Eric van Gyzen
>Release:        FreeBSD 6.1-RELEASE-p1 i386
>Organization:
>Environment:

This kernel does NOT have lock debugging options such as WITNESS.

>Description:

Sleeping thread (tid 100242, pid 72378) owns a non-sleepable lock
panic: sleeping thread

(kgdb) info threads
  115 Thread 100242 (PID=72378: pkg_info)  0xc0535347 in sched_switch (
    td=0xc3989000, newtd=0xc21f9180, flags=1)
    at /freebsd/src/sys/kern/sched_4bsd.c:973
[snip]

(kgdb) thread 115
[Switching to thread 115 (Thread 100242)]#0  0xc0535347 in sched_switch (
    td=0xc3989000, newtd=0xc21f9180, flags=1)
    at /freebsd/src/sys/kern/sched_4bsd.c:973
973			cpu_switch(td, newtd);

(kgdb) p *td
$1 = {td_proc = 0xc3982830, td_ksegrp = 0xc38d5c60, td_plist = {
    tqe_next = 0x0, tqe_prev = 0xc3982840}, td_kglist = {tqe_next = 0x0, 
    tqe_prev = 0xc38d5c6c}, td_slpq = {tqe_next = 0x0, tqe_prev = 0xc23dbda0}, 
  td_lockq = {tqe_next = 0x0, tqe_prev = 0xcf930bb0}, td_runq = {
    tqe_next = 0x0, tqe_prev = 0x0}, td_selq = {tqh_first = 0x0, 
    tqh_last = 0xc3989030}, td_sleepqueue = 0x0, td_turnstile = 0xc38ddcc0, 
  td_umtxq = 0xc2505d00, td_tid = 100242, td_flags = 16777216, 
  td_inhibitors = 2, td_pflags = 0, td_dupfd = 0, td_wchan = 0xc39812cc, 
  td_wmesg = 0xc06b4787 "user map", td_lastcpu = 0 '\0', td_oncpu = 255 'ÿ', 
  td_owepreempt = 0 '\0', td_locks = 1, td_blocked = 0x0, td_ithd = 0x0, 
  td_lockname = 0x0, td_contested = {lh_first = 0xc21e7900}, 
  td_sleeplocks = 0x0, td_intr_nesting_level = 0, td_pinned = 1, 
  td_mailbox = 0x0, td_ucred = 0xc2d42200, td_standin = 0x0, td_upcall = 0x0, 
  td_sticks = 1, td_uuticks = 0, td_usticks = 0, td_intrval = 0, 
  td_oldsigmask = {__bits = {0, 0, 0, 0}}, td_sigmask = {__bits = {0, 0, 0, 
      0}}, td_siglist = {__bits = {0, 0, 0, 0}}, td_generation = 2, 
  td_sigstk = {ss_sp = 0x0, ss_size = 0, ss_flags = 4}, td_kflags = 0, 
  td_xsig = 0, td_profil_addr = 0, td_profil_ticks = 0, td_base_pri = 196 'Ä', 
  td_priority = 196 'Ä', td_pcb = 0xcf87ed90, td_state = TDS_INHIBITED, 
  td_retval = {673771520, 671577088}, td_slpcallout = {c_links = {sle = {
        sle_next = 0x0}, tqe = {tqe_next = 0x0, tqe_prev = 0xc724e568}}, 
    c_time = -193029909, c_arg = 0xc3989000, 
    c_func = 0xc054279c <sleepq_timeout>, c_mtx = 0x0, c_flags = 18}, 
  td_frame = 0xcf87ed38, td_kstack_obj = 0xc321e6b4, td_kstack = 3481784320, 
  td_kstack_pages = 2, td_altkstack_obj = 0x0, td_altkstack = 0, 
  td_altkstack_pages = 0, td_critnest = 1, td_md = {md_spinlock_count = 1, 
    md_saved_flags = 582}, td_sched = 0xc3989154}

(kgdb) p *td->td_proc
$2 = {p_list = {le_next = 0xc39c5624, le_prev = 0xc0705184}, p_ksegrps = {
    tqh_first = 0xc38d5c60, tqh_last = 0xc38d5c64}, p_threads = {
    tqh_first = 0xc3989000, tqh_last = 0xc3989008}, p_suspended = {
    tqh_first = 0x0, tqh_last = 0xc3982848}, p_ucred = 0xc2d42200, 
  p_fd = 0xc3a30800, p_fdtol = 0x0, p_stats = 0xc37f7800, 
  p_limit = 0xc39f4000, p_sigacts = 0xc25d4000, p_flag = 16384, p_sflag = 1, 
  p_state = PRS_NORMAL, p_pid = 72378, p_hash = {le_next = 0x0, 
    le_prev = 0xc21662e8}, p_pglist = {le_next = 0xc263ec48, 
    le_prev = 0xc39c5674}, p_pptr = 0xc39c5624, p_sibling = {le_next = 0x0, 
    le_prev = 0xc39c5688}, p_children = {lh_first = 0x0}, p_mtx = {
    mtx_object = {lo_class = 0xc06d8484, lo_name = 0xc06a64d2 "process lock", 
      lo_type = 0xc06a64d2 "process lock", lo_flags = 4390912, lo_list = {
        tqe_next = 0x0, tqe_prev = 0x0}, lo_witness = 0x0}, mtx_lock = 4, 
    mtx_recurse = 0}, p_oppid = 0, p_vmspace = 0xc3981258, p_swtime = 0, 
  p_realtimer = {it_interval = {tv_sec = 0, tv_usec = 0}, it_value = {
      tv_sec = 0, tv_usec = 0}}, p_rux = {rux_runtime = {sec = 0, 
      frac = 44322835734215130}, rux_uticks = 0, rux_sticks = 1, 
    rux_iticks = 0, rux_uu = 0, rux_su = 0, rux_iu = 0}, p_crux = {
    rux_runtime = {sec = 0, frac = 0}, rux_uticks = 0, rux_sticks = 0, 
    rux_iticks = 0, rux_uu = 0, rux_su = 0, rux_iu = 0}, p_profthreads = 0, 
  p_maxthrwaits = 0, p_traceflag = 0, p_tracevp = 0x0, p_tracecred = 0x0, 
  p_textvp = 0xc2dbecc0, p_siglist = {__bits = {0, 0, 0, 0}}, 
  p_lock = 2 '\002', p_sigiolst = {slh_first = 0x0}, p_sigparent = 20, 
  p_sig = 0, p_code = 0, p_stops = 0, p_stype = 0, p_step = 0 '\0', 
  p_pfsflags = 0 '\0', p_nlminfo = 0x0, p_aioinfo = 0x0, p_singlethread = 0x0, 
  p_suspcount = 0, p_xthread = 0x0, p_boundary_count = 0, 
  p_procscopegrp = 0x0, p_magic = 3203398350, 
  p_comm = "pkg_info", '\0' <repeats 11 times>, p_pgrp = 0xc23ab780, 
  p_sysent = 0xc06f3f60, p_args = 0xc2a46bc0, 
  p_cpulimit = 9223372036854775807, p_nice = 0 '\0', p_xstat = 0, p_klist = {
    kl_list = {slh_first = 0x0}, kl_lock = 0xc0508678 <knlist_mtx_lock>, 
    kl_unlock = 0xc05086ac <knlist_mtx_unlock>, 
    kl_locked = 0xc05086e8 <knlist_mtx_locked>, kl_lockarg = 0xc3982898}, 
  p_numthreads = 1, p_numksegrps = 1, p_md = {md_ldt = 0x0}, p_itcallout = {
    c_links = {sle = {sle_next = 0x0}, tqe = {tqe_next = 0x0, 
        tqe_prev = 0x0}}, c_time = 0, c_arg = 0x0, c_func = 0, c_mtx = 0x0, 
    c_flags = 16}, p_acflag = 0, p_ru = 0x0, p_peers = 0x0, 
  p_leader = 0xc3982830, p_emuldata = 0x0, p_label = 0x0, p_sched = 0xc3982a3c}

>How-To-Repeat:

I don't know.  It happened during the nightly portaudit run.

I have the kernel.debug, vmcore, and sources if you're interested.

>Fix:

I was hoping /you/ could help with that...
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list