Re: panic on a NULL turnstile on boot on r249810

From: Gleb Smirnoff <glebius_at_FreeBSD.org>
Date: Wed, 24 Apr 2013 00:47:22 +0400
  More investigation. AFAIU, we can't come to this point
if __mtx_lock_sleep() passed a NULL ts. So ts wasn't NULL
before call to propagate_priority(). The turnstile_wait()
saves ts on td:

738:        td->td_blocked = ts;

So I can obtain it:

(kgdb) fr 11
#11 0xffffffff805206b2 in turnstile_wait (ts=<value optimized out>,
    owner=<value optimized out>, queue=<value optimized out>)
    at /usr/src/head/sys/kern/subr_turnstile.c:743
743             propagate_priority(td);
(kgdb) p *td->td_blocked
$8 = {ts_lock = {lock_object = {lo_name = 0xffffffff8077f1eb "turnstile lock",
      lo_flags = 720896, lo_data = 0, lo_witness = 0x0},
    mtx_lock = 18446741874883377440}, ts_blocked = {{
      tqh_first = 0xfffffe000bbf3920, tqh_last = 0xfffffe000bbf3960}, {
      tqh_first = 0x0, tqh_last = 0xfffffe000ba82ab0}}, ts_pending = {
    tqh_first = 0x0, tqh_last = 0xfffffe000ba82ac0}, ts_hash = {le_next = 0x0,
    le_prev = 0xffffffff80aaee38}, ts_link = {le_next = 0x0,
    le_prev = 0xfffffe000bf42120}, ts_free = {lh_first = 0x0},
  ts_lockobj = 0xffffffff80af5f30, ts_owner = 0xfffffe000bf42000}
(kgdb)

Ok, let's see who is the owner:

(kgdb) p td->td_blocked->ts_owner->td_proc->p_comm
$21 = "sysctl", '\0' <repeats 13 times>

I can't find it in info threads... Yep, it is zombie:

(kgdb) p td->td_blocked->ts_owner->td_proc->p_state
$22 = PRS_ZOMBIE

Could that happen that a zombie owns turnstile?

-- 
Totus tuus, Glebius.
Received on Tue Apr 23 2013 - 18:47:24 UTC

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