Subject: Re: mutex fault
To: Kazushi Marukawa <jam@pobox.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-xen
Date: 11/26/2007 00:04:48
On Sun, Nov 25, 2007 at 05:48:14PM +0900, Kazushi Marukawa wrote:
>    On Nov 25, 14:24, Kazushi (Jam) Marukawa wrote:
>    > Subject: Re: mutex fault
>    >    On Nov 24, 17:59, Manuel Bouyer wrote:
>    >    > Also please build a kernel with 
>    >    > makeoptions DEBUG="-g"
>    >    > 
>    >    > and use gdb to see where callout_softclock+0x24d (or whatever adress is given
>    >    > by ddb with this kernel on panic) is. On my kernel image it points to
>    >    > a mutex_enter which doens't make much sense ...
>    > 
>    > I'll try that.  Thanks.
> 
> Here is a disassembled output of netbsd.gdb I compiled with
> the same source and with -g option.
> 
> The codes around callout_softclock+0x24d
> (callout_softclock+589) are like following.
> 
>   0xc0431515 <callout_softclock+581>:     je     0xc043151d <callout_softclock+589>
>   0xc0431517 <callout_softclock+583>:     mov    %edi,(%esp)
>   0xc043151a <callout_softclock+586>:     call   *0xffffffec(%ebp)
>   0xc043151d <callout_softclock+589>:     movl   $0xc098d594,(%esp)
>   0xc0431524 <callout_softclock+596>:     call   0xc04db580 <mutex_spin_enter>
>   0xc0431529 <callout_softclock+601>:     mov    0xffffffe8(%ebp),%eax

Thanks. Can you reproduce the panic with this kernel (in case it's not
at callout_softclock+0x24d any more), and also map the address to a
line number in C code ?  it's
l *(callout_softclock+0x24d)
in gdb (easier than doing dissassembly by hand :)

From this it's the same as I get, but it's not consistent with the
backtrace you posted earlier ... it seems it called mutex_spin_enter instead
of mutex_spin_exit.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--