Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Aug 2004 22:15:32 +0200
From:      Daniel Lang <dl@leo.org>
To:        Terrence Koeman <root@mediamonks.net>
Cc:        'John Baldwin' <jhb@FreeBSD.org>
Subject:   Re: Lock order reversal in 5.2-CURRENT
Message-ID:  <20040810201532.GA53289@atrbg11.informatik.tu-muenchen.de>
In-Reply-To: <200408102141323.SM01804@manrikigusari>
References:  <200408101535.11863.jhb@FreeBSD.org> <200408102141323.SM01804@manrikigusari>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Terrence,

Terrence Koeman wrote on Tue, Aug 10, 2004 at 09:40:22PM +0200:
[..]
> > --- trap 0xc, eip = 0xc04b3ed2, esp = 0xd4dd7c90, ebp = 0xd4dd7ce0 ---
> > mi_switch(1,0,c060d2be,9c,dbba0) at mi_switch+0x102
> > 
> > Does the original poster have a debug kernel built?
> > 
> 
> Yes I have, but I have no experience with the debugger. I'll be happy to
> carry out whatever's needed.
[..]

The process is documented in the developers handbook:

http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug.html

In short:

- first make sure dumpdevice is set and
  savecore enabled in /etc/rc.conf
- after a panic get a crash-dump, e.g.
  in ddb enter "call doadump()"
- after reboot the dump should be saved to e.g.
  /var/crash/vmcore.0

- analyse the dump with kernel-gdb:

  gdb -k /usr/obj/usr/src/sys/<KERNCONF>/kernel.debug /var/crash/vmcore.0

  (IIRC), so this is where the debug kernel is required.

  Please not that stock gdb is currently not able
  to act as kernel-debugger, you need to install the gdb6 port.

- Start with a backtrace (bt) of the kernel, look out for
  corrupted data. Obvious things are 0x0 pointers, where
  valid data is expected. If spotted, try to trace the source
  of corruption.

- Post any of your discoveries. Often just the stack-trace
  with function, arguments and source-lines can give valuable
  hints to the developers.

HTH,
 Daniel
-- 
IRCnet: Mr-Spock     - Agartim billiard bumba m'abdul in papejim twista 
-  rumba rock n rolla. Leik'ab mai. Spirzon Heroin se'osit gaula.     -
               - Marijuana esit gaula. Haschisch. Opis. - 
 Daniel Lang * dl@leo.org * +49 89 2600 8122 * http://www.leo.org/~dl/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040810201532.GA53289>