Subject: Re: kernel stack traceback
To: None <pha@pdq.com, port-alpha@netbsd.org>
From: Ross Harvey <ross@ghs.com>
List: port-alpha
Date: 03/18/1999 13:31:42
> From: "Paul H. Anderson" <pha@pdq.com>
>
> I've got a machine with a kernel panic sitting here on a serial console in
> the kernel debugger.
>
> Bill Sommerfield wants a stack traceback.
>
> How do I get one?
>
> I can go back up the stack manually if I know the calling conventions for
> gcc and alpha, then get the routine names out of the kernel image - I used
> to do this when I was porting osf/1 to the power PC.  Are the alpha/gcc
> calling conventions documented anywhere?
>
> Failing that, what do you suggest I do for debug?  I can do most anything
> with a teensy bit of guidance, including setting up to reproduce the panic
> again.

Turn off the kernel debugger with the sysctl (ddb.onpanic) or by recompilation,
let it panic and dump core, and use gdb(1) on the core dump you get when you
come back up. Actually, if you continue with ddb I think it will proceed to
the core dump.  Then do the following:

	% gdb /netbsd
	(gdb) target kcore /var/crash/...

My arm-waving prediction is that you won't find anything in the one stack
trace. I looked at this panic recently on i386 and found a perfectly normal
stack trace. My armchair conclusion was that the lock had not been properly
released by some previous error or timeout. (You can quote me to tech-kern
if you want, but the case I saw was from an NFS server running 1.3.3
and therefore rather different from yours)

	Ross.Harvey@Computer.Org