Date: Tue, 15 Nov 2005 21:38:21 +1100 From: Peter Jeremy <PeterJeremy@optushome.com.au> To: Rob <spamrefuse@yahoo.com> Cc: freebsd-stable@freebsd.org Subject: Re: Swapfile problem in 6? Message-ID: <20051115103821.GJ39882@cirb503493.alcatel.com.au> In-Reply-To: <20051115100813.74195.qmail@web36214.mail.mud.yahoo.com> References: <20051115065740.GH39882@cirb503493.alcatel.com.au> <20051115100813.74195.qmail@web36214.mail.mud.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2005-Nov-15 02:08:12 -0800, Rob wrote: > makeoptions DEBUG=-g > options INVARIANTS > options WITNESS > options WITNESS_KDB > options KDB > options DDB > options DDB_NUMSYM > options GDB > >Is that enough? If your system is headless, you probably want 'options BREAK_TO_DEBUGGER' as well. First question is: Does the system still deadlock? INVARIANTS and WITNESS will have added sanity checks which might have picked up the problem. >1) Can I debug a kernel that does not crash, but > just hangs in a deadlock? Everything seems to > be frozen, except pinging the PC.... Have a look at http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-online-ddb.html and ddb(4). Unless you have another system handy, you might like to print out ddb(4) - it's difficult to read man pages when you're in the kernel debugger :-). >2) Is such debugging possible on a headless PC > without a keyboard attached? > I do have serial console access. Yes. See above URL. The advantage is that you can (hopefully) capture a log of your debug session. Send a serial BREAK and you should get a DDB> prompt. Basically, wait until your system deadlocks. BREAK into DDB. As a start, run 'show lockedvnods', 'ps'. My guess is that you'll see a lock that has a number of waiters - which is probably the culprit. Use 'panic' to get a crashdump and then you can use kgdb to rummage around once you reboot - see http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-gdb.html If in doubt, post the output from the above commands here and someone will hopefully provide further input. -- Peter Jeremy
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051115103821.GJ39882>