panic on a NULL turnstile on boot on r249810

From: Gleb Smirnoff <glebius_at_FreeBSD.org>
Date: Wed, 24 Apr 2013 00:25:02 +0400
  Hello,

  just upgraded from r245115 to r249810 and now box reliably panics on
boot a second after mounting root.

  Trace:

#9  0xffffffff8066a443 in calltrap ()
    at /usr/src/head/sys/amd64/amd64/exception.S:228
#10 0xffffffff8051fe75 in propagate_priority (td=<value optimized out>)
    at /usr/src/head/sys/kern/subr_turnstile.c:277
#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
#12 0xffffffff804cb03e in __mtx_lock_sleep (c=0xffffffff80af5f48,
    tid=18446741874883377440, opts=<value optimized out>,
    file=0xfffffe000bf42468 "(z§\200ÿÿÿÿ", line=2542784)
    at /usr/src/head/sys/kern/kern_mutex.c:503
#13 0xffffffff804f02ca in softclock_call_cc (c=0xffffffff80abd090,
    cc=0xffffffff80af9200, direct=0)
    at /usr/src/head/sys/kern/kern_timeout.c:638
#14 0xffffffff804f0644 in softclock (arg=0xffffffff80af9200)
    at /usr/src/head/sys/kern/kern_timeout.c:802
#15 0xffffffff804b2fe8 in intr_event_execute_handlers (
    p=<value optimized out>, ie=0xfffffe000bbea300)
    at /usr/src/head/sys/kern/kern_intr.c:1263
#16 0xffffffff804b39f8 in ithread_loop (arg=0xfffffe000ba78400)
    at /usr/src/head/sys/kern/kern_intr.c:1276
#17 0xffffffff804b0f55 in fork_exit (
    callout=0xffffffff804b38d0 <ithread_loop>, arg=0xfffffe000ba78400,
    frame=0xffffff800026cc00) at /usr/src/head/sys/kern/kern_fork.c:991
#18 0xffffffff8066a97e in fork_trampoline ()
    at /usr/src/head/sys/amd64/amd64/exception.S:602

The callout functions is the syscons one:

(kgdb) fr 13
#13 0xffffffff804f02ca in softclock_call_cc (c=0xffffffff80abd090,
    cc=0xffffffff80af9200, direct=0)
    at /usr/src/head/sys/kern/kern_timeout.c:638
638                     class->lc_lock(c_lock, sharedlock);
(kgdb) p *c
$2 = {c_links = {le = {le_next = 0xffffff800099d798,
      le_prev = 0xffffffff80af9310}, sle = {sle_next = 0xffffff800099d798},
    tqe = {tqe_next = 0xffffff800099d798, tqe_prev = 0xffffffff80af9310}},
  c_time = 67155431438, c_precision = 71582788, c_arg = 0xffffffff80abcac0,
  c_func = 0xffffffff803b9fa0 <scrn_timer>, c_lock = 0xffffffff80af5f30,
  c_flags = 130, c_cpu = 0}
(kgdb)

The lock is the correct one (syscons are Giant-locked):

(kgdb) p *c->c_lock
$3 = {lo_name = 0xffffffff80779329 "Giant", lo_flags = 17498112, lo_data = 1,
  lo_witness = 0x0}

But __mtx_lock_sleep() founds a NULL instead of turnstile:

(kgdb) fr 12
#12 0xffffffff804cb03e in __mtx_lock_sleep (c=0xffffffff80af5f48,
    tid=18446741874883377440, opts=<value optimized out>,
    file=0xfffffe000bf42468 "(z§\200ÿÿÿÿ", line=2542784)
    at /usr/src/head/sys/kern/kern_mutex.c:503
503                     turnstile_wait(ts, mtx_owner(m), TS_EXCLUSIVE_QUEUE);
(kgdb) p ts
$4 = (struct turnstile *) 0x0

-- 
Totus tuus, Glebius.
Received on Tue Apr 23 2013 - 18:25:13 UTC

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