From owner-freebsd-bugs@FreeBSD.ORG Tue Jul 28 20:10:03 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25495106566C for ; Tue, 28 Jul 2009 20:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 136BF8FC12 for ; Tue, 28 Jul 2009 20:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6SKA2wT083417 for ; Tue, 28 Jul 2009 20:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6SKA2rp083416; Tue, 28 Jul 2009 20:10:02 GMT (envelope-from gnats) Date: Tue, 28 Jul 2009 20:10:02 GMT Message-Id: <200907282010.n6SKA2rp083416@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Mikolaj Golub Cc: Subject: Re: kern/134584: [panic] spin lock held too long X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mikolaj Golub List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2009 20:10:03 -0000 The following reply was made to PR kern/134584; it has been noted by GNATS. From: Mikolaj Golub To: barbara Cc: bug-followup@FreeBSD.org Subject: Re: kern/134584: [panic] spin lock held too long Date: Tue, 28 Jul 2009 23:03:26 +0300 On Mon, 27 Jul 2009 22:00:05 GMT barbara wrote: b> In the meanwhile I've rebuilt my kernel adding WITNESS, KDB, DDB options.= b> Is this what you need? b> I'm not able to work with the debugger. I suppose I have to type the comm= b> ands you asked (ps, show alllocks) when it's panicking and the debbugger = b> starts and write down the output with pen and paper, am I corrent? Or is = b> there a way to redirect or dump the output somewhere? b> Sorry, I'll try reading the chapter in the dev. handbook and I will try t= b> o do my best, but please, tell me if you have some suggestions. You can use `capture on' command in ddb to record all ddb output to the capture buffer. Then you will be able to extract it from core after reboot running: ddb capture print Also, as it is desktop pc, I suppose you are running X. Then on panic ddb console will be unreachable. In this case you can use textdump(4) facility to script commands you would like to run automatically on panic. Something like this: ddb script 'kdb.enter.panic=capture on; show pcpu; show allpcpu; bt; ps; show \ locks; show alllocks; show lockedvnods; alltrace; call doadump; reset' Please note, alltrace output is rather large and might not fit to capture buffer. To be sure all output is stored in the buffer you can increase the value of debug.ddb.capture.bufsize sysctl. See ddb(8) and textdump(4) for details. -- Mikolaj Golub