RE: 5.2-RELEASE panic in turnstile_wait

From: Erik Moe <emoe_at_cox.net>
Date: Thu, 29 Jan 2004 00:40:48 -0600
Humm....  crashing the stack for fun and profit....


(kgdb) frame 7
#7  0xc0546015 in _mtx_lock_sleep (m=0xc69e0aa8, opts=0,
    file=0xc06f3a10 "/usr/src/sys/kern/kern_exit.c", line=453)
    at /usr/src/sys/kern/kern_mutex.c:476
476			turnstile_wait(ts, &m->mtx_object, mtx_owner(m));
(kgdb) p *m
$1 = {mtx_object = {lo_class = 0x0, lo_name = 0x0, lo_type = 0x0,
    lo_flags = 0, lo_list = {tqe_next = 0x0, tqe_prev = 0x0},
    lo_witness = 0x0}, mtx_lock = 0, mtx_recurse = 0}

> -----Original Message-----
> From: John Baldwin [mailto:jhb_at_FreeBSD.org]
> Sent: Wednesday, January 28, 2004 12:04 PM
> To: Erik Moe; freebsd-current_at_freebsd.org
> Subject: Re: 5.2-RELEASE panic in turnstile_wait
>
>
> On Tuesday 27 January 2004 10:06 pm, Erik Moe wrote:
> > panic: page fault
> > panic messages:
> > ---
> > Fatal trap 12: page fault while in kernel mode
> > fault virtual address	= 0x6c
> > fault code		= supervisor read, page not present
> > instruction pointer	= 0x8:0xc0571bfd
> > stack pointer	        = 0x10:0xe3ab7c28
> > frame pointer	        = 0x10:0xe3ab7c2c
> > code segment		= base 0x0, limit 0xfffff, type 0x1b
> > 			= DPL 0, pres 1, def32 1, gran 1
> > processor eflags	= resume, IOPL = 0
> > current process		= 699 (zcat)
> > trap number		= 12
> > panic: page fault
> >
> > #4  0xc06b5113 in trap (frame=
> >       {tf_fs = 24, tf_es = 16, tf_ds = 16, tf_edi = -969008320, tf_esi
> > = -969012736, tf_ebp = -475300820, tf_isp = -475300844, tf_ebx =
> > -969008320, tf_edx = -969012736, tf_ecx = 0, tf_eax = 0, tf_trapno = 12,
> > tf_err = 0, tf_eip = -1068033027, tf_cs = 8, tf_eflags = 65538, tf_esp =
> > -962721112, tf_ss = -475300780})
> >     at /usr/src/sys/i386/i386/trap.c:250
> > #5  0xc06a7de8 in calltrap () at {standard input}:94
> > #6  0xc0571efc in turnstile_wait (ts=0xc63e1b40, lock=0xc69e0aa8,
> > owner=0x0) at /usr/src/sys/kern/subr_turnstile.c:458
>
> There is an extra frame in here that gdb misses.
>
> > (kgdb) frame 6
> > #6  0xc0571efc in turnstile_wait (ts=0xc63e1b40, lock=0xc69e0aa8,
> > owner=0x0) at /usr/src/sys/kern/subr_turnstile.c:458
> > 458			turnstile_setowner(ts, owner);
>
> The real panic is in turnstile_setowner().  If owner is indeed NULL (gdb
> sometimes messes up values of local variables and arguments) then
> that is why
> it is panicing.  Can you pop up to frame 7 and print out *m?
>
> --
> John Baldwin <jhb_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
> "Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
>
Received on Wed Jan 28 2004 - 21:40:53 UTC

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