Re: panic td->td_lock == NULL in scheduler(), csup'd 2011-02-19

From: Benjamin Kaduk <kaduk_at_MIT.EDU>
Date: Wed, 13 Jun 2012 11:46:56 -0400 (EDT)
On Wed, 13 Jun 2012, John Baldwin wrote:

> On Wednesday, June 13, 2012 7:11:10 am Svatopluk Kraus wrote:
>> Hi,
>>
>>  it looks similar to
>> http://lists.freebsd.org/pipermail/freebsd-current/2011-March/023829.html
>
> Hmm, the code in question has a PRS_NEW check though.
>
> Benjamin, can you go to the scheduler() frame and do 'p *p' and 'p *td'?

Sure.

(kgdb) frame 10
#10 0xffffffff8094b395 in scheduler (dummy=Variable "dummy" is not available.
) at /usr/src/sys/vm/vm_glue.c:744
744                             thread_lock(td);
(kgdb) p *p
$1 = {p_list = {le_next = 0xfffffe006d4c1000, le_prev = 0xffffffff80ee8f60},
   p_threads = {tqh_first = 0xfffffe003b14d8c0, tqh_last = 0xfffffe003b14d8d0},
   p_slock = {lock_object = {lo_name = 0xffffffff80b09517 "process slock",
       lo_flags = 720896, lo_data = 0, lo_witness = 0x0}, mtx_lock = 4},
   p_ucred = 0xfffffe00025e4e00, p_fd = 0x0, p_fdtol = 0x0,
   p_stats = 0xfffffe00058a1000, p_limit = 0x0, p_limco = {c_links = {sle = {
         sle_next = 0x0}, tqe = {tqe_next = 0x0, tqe_prev = 0x0}}, c_time = 0,
     c_arg = 0x0, c_func = 0, c_lock = 0x0, c_flags = 0, c_cpu = 0},
   p_sigacts = 0x0, p_flag = 0, p_state = PRS_NEW, p_pid = 3054, p_hash = {
     le_next = 0x0, le_prev = 0xffffff800023df70}, p_pglist = {le_next = 0x0,
     le_prev = 0x0}, p_pptr = 0x0, p_sibling = {le_next = 0x0, le_prev = 0x0},
   p_children = {lh_first = 0x0}, p_mtx = {lock_object = {
       lo_name = 0xffffffff80b0950a "process lock", lo_flags = 21168128,
       lo_data = 0, lo_witness = 0xffffff800021a400},
     mtx_lock = 18446744071577690160}, p_ksi = 0xfffffe0002cee850,
   p_sigqueue = {sq_signals = {__bits = {0, 0, 0, 0}}, sq_kill = {__bits = {0,
         0, 0, 0}}, sq_list = {tqh_first = 0x0, tqh_last = 0xfffffe003b07aa20},
     sq_proc = 0xfffffe003b07a8e0, sq_flags = 1}, p_oppid = 0, p_vmspace = 0x0,
   p_swtick = 0, p_realtimer = {it_interval = {tv_sec = 0, tv_usec = 0},
     it_value = {tv_sec = 0, tv_usec = 0}}, p_ru = {ru_utime = {tv_sec = 0,
       tv_usec = 0}, ru_stime = {tv_sec = 0, tv_usec = 0}, ru_maxrss = 0,
     ru_ixrss = 0, ru_idrss = 0, ru_isrss = 0, ru_minflt = 0, ru_majflt = 0,
     ru_nswap = 0, ru_inblock = 0, ru_oublock = 0, ru_msgsnd = 0,
     ru_msgrcv = 0, ru_nsignals = 0, ru_nvcsw = 0, ru_nivcsw = 0}, p_rux = {
     rux_runtime = 0, rux_uticks = 0, rux_sticks = 0, rux_iticks = 0,
     rux_uu = 0, rux_su = 0, rux_tu = 0}, p_crux = {rux_runtime = 0,
     rux_uticks = 0, rux_sticks = 0, rux_iticks = 0, rux_uu = 0, rux_su = 0,
     rux_tu = 0}, p_profthreads = 0, p_exitthreads = 0, p_traceflag = 0,
   p_tracevp = 0x0, p_tracecred = 0x0, p_textvp = 0x0, p_lock = 0,
   p_sigiolst = {slh_first = 0x0}, p_sigparent = 0, 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_pendingcnt = 0, p_itimers = 0x0,
   p_magic = 3203398350, p_osrel = 900033,
   p_comm = "sh", '\0' <repeats 17 times>, p_pgrp = 0xfffffe0002d42880,
   p_sysent = 0xffffffff80e8b960, p_args = 0xfffffe005d3e52c0,
   p_cpulimit = 9223372036854775807, p_nice = 0 '\0', p_fibnum = 0,
   p_xstat = 0, p_klist = {kl_list = {slh_first = 0x0},
     kl_lock = 0xffffffff806b3480 <knlist_mtx_lock>,
     kl_unlock = 0xffffffff806b34a0 <knlist_mtx_unlock>,
     kl_assert_locked = 0xffffffff806b3780 <knlist_mtx_assert_locked>,
     kl_assert_unlocked = 0xffffffff806b3760 <knlist_mtx_assert_unlocked>,
     kl_lockarg = 0xfffffe003b07a9d8}, p_numthreads = 1, p_md = {md_ldt = 0x0,
     md_ldt_sd = {sd_lolimit = 0, sd_lobase = 0, sd_type = 0, sd_dpl = 0,
       sd_p = 0, sd_hilimit = 0, sd_xx0 = 0, sd_gran = 0, sd_hibase = 0,
       sd_xx1 = 0, sd_mbz = 0, sd_xx2 = 0}}, 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_lock = 0x0, c_flags = 0, c_cpu = 0},
   p_acflag = 0, p_peers = 0x0, p_leader = 0x0, p_emuldata = 0x0,
   p_label = 0x0, p_sched = 0xfffffe003b07ad50, p_ktr = {stqh_first = 0x0,
     stqh_last = 0xfffffe003b07ad10}, p_mqnotifier = {lh_first = 0x0},
   p_dtrace = 0x0, p_pwait = {cv_description = 0xffffffff80b09f6a "ppwait",
     cv_waiters = 0}, p_dbgwait = {
     cv_description = 0xffffffff80b09f71 "dbgwait", cv_waiters = 0}}
(kgdb) p *td
$2 = {td_lock = 0x0, td_proc = 0xfffffe003b07a8e0, td_plist = {tqe_next = 0x0,
     tqe_prev = 0xfffffe003b07a8f0}, td_runq = {tqe_next = 0x0,
     tqe_prev = 0x0}, td_slpq = {tqe_next = 0x0, tqe_prev = 0x0}, td_lockq = {
     tqe_next = 0x0, tqe_prev = 0x0}, td_hash = {le_next = 0x0,
     le_prev = 0xffffff8000247b58}, td_cpuset = 0x0, td_sel = 0x0,
   td_sleepqueue = 0xfffffe0005bdd680, td_turnstile = 0xfffffe003b14ea80,
   td_umtxq = 0xfffffe0005be0780, td_tid = 100203, td_sigqueue = {sq_signals = {
       __bits = {0, 0, 0, 0}}, sq_kill = {__bits = {0, 0, 0, 0}}, sq_list = {
       tqh_first = 0x0, tqh_last = 0xfffffe003b14d970},
     sq_proc = 0xfffffe003b07a8e0, sq_flags = 1}, td_lend_user_pri = 255 '?',
   td_flags = 4, td_inhibitors = 0, td_pflags = 0, td_dupfd = 0,
   td_sqqueue = 0, td_wchan = 0x0, td_wmesg = 0x0, td_lastcpu = 0 '\0',
   td_oncpu = 255 '?', td_owepreempt = 0 '\0', td_tsqueue = 0 '\0',
   td_locks = 0, td_rw_rlocks = 0, td_lk_slocks = 0, td_blocked = 0x0,
   td_lockname = 0x0, td_contested = {lh_first = 0x0}, td_sleeplocks = 0x0,
   td_intr_nesting_level = 0, td_pinned = 0, td_ucred = 0x0, td_estcpu = 0,
   td_slptick = 0, td_blktick = 0, td_swvoltick = 0, td_ru = {ru_utime = {
       tv_sec = 0, tv_usec = 0}, ru_stime = {tv_sec = 0, tv_usec = 0},
     ru_maxrss = 0, ru_ixrss = 0, ru_idrss = 0, ru_isrss = 0, ru_minflt = 0,
     ru_majflt = 0, ru_nswap = 0, ru_inblock = 0, ru_oublock = 0,
     ru_msgsnd = 0, ru_msgrcv = 0, ru_nsignals = 0, ru_nvcsw = 0,
     ru_nivcsw = 0}, td_rux = {rux_runtime = 0, rux_uticks = 0, rux_sticks = 0,
     rux_iticks = 0, rux_uu = 0, rux_su = 0, rux_tu = 0}, td_incruntime = 0,
   td_runtime = 0, td_pticks = 0, td_sticks = 0, td_iticks = 0, td_uticks = 0,
   td_intrval = 0, td_oldsigmask = {__bits = {0, 0, 0, 0}}, td_sigmask = {
     __bits = {0, 0, 0, 0}}, td_generation = 0, td_sigstk = {ss_sp = 0x0,
     ss_size = 0, ss_flags = 0}, td_xsig = 0, td_profil_addr = 0,
   td_profil_ticks = 0, td_name = '\0' <repeats 19 times>, td_fpop = 0x0,
   td_dbgflags = 0, td_dbgksi = {ksi_link = {tqe_next = 0x0, tqe_prev = 0x0},
     ksi_info = {si_signo = 0, si_errno = 0, si_code = 0, si_pid = 0,
       si_uid = 0, si_status = 0, si_addr = 0x0, si_value = {sival_int = 0,
         sival_ptr = 0x0, sigval_int = 0, sigval_ptr = 0x0}, _reason = {
         _fault = {_trapno = 0}, _timer = {_timerid = 0, _overrun = 0},
         _mesgq = {_mqd = 0}, _poll = {_band = 0}, __spare__ = {__spare1__ = 0,
           __spare2__ = {0, 0, 0, 0, 0, 0, 0}}}}, ksi_flags = 0,
     ksi_sigq = 0x0}, td_ng_outbound = 0, td_osd = {osd_nslots = 0,
     osd_slots = 0x0, osd_next = {le_next = 0x0, le_prev = 0x0}},
   td_map_def_user = 0x0, td_dbg_forked = 0, td_rqindex = 0 '\0',
   td_base_pri = 0 '\0', td_priority = 0 '\0', td_pri_class = 0 '\0',
   td_user_pri = 0 '\0', td_base_user_pri = 0 '\0',
   td_pcb = 0xffffff8090bd2d10, td_state = TDS_INACTIVE, td_retval = {0, 0},
   td_slpcallout = {c_links = {sle = {sle_next = 0x0}, tqe = {tqe_next = 0x0,
         tqe_prev = 0x0}}, c_time = 0, c_arg = 0x0, c_func = 0, c_lock = 0x0,
     c_flags = 16, c_cpu = 0}, td_frame = 0xffffff8090bd2c50,
   td_kstack_obj = 0xfffffe005bb24ca8, td_kstack = 18446743526382039040,
   td_kstack_pages = 4, td_critnest = 1, td_md = {md_spinlock_count = 0,
     md_saved_flags = 0}, td_sched = 0xfffffe003b14dce8, td_ar = 0x0,
   td_lprof = {{lh_first = 0x0}, {lh_first = 0x0}}, td_dtrace = 0x0,
   td_errno = 0, td_vnet = 0x0, td_vnet_lpush = 0x0, td_intr_frame = 0x0}

-Ben Kaduk
Received on Wed Jun 13 2012 - 13:47:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:28 UTC