From owner-freebsd-hackers Mon Sep 13 19:25:27 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id 530AF14F15 for ; Mon, 13 Sep 1999 19:25:21 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id LAA17890; Tue, 14 Sep 1999 11:55:22 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id LAA26081; Tue, 14 Sep 1999 11:55:20 +0930 (CST) Date: Tue, 14 Sep 1999 11:55:20 +0930 From: Greg Lehey To: greg Cc: hackers@FreeBSD.ORG Subject: Re: debugging a proc's kernel stack... Message-ID: <19990914115519.A10106@freebie.lemis.com> References: <199909132000.UAA11296@jules.res.cmu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <199909132000.UAA11296@jules.res.cmu.edu>; from greg on Mon, Sep 13, 1999 at 08:00:02PM +0000 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, 13 September 1999 at 20:00:02 +0000, greg wrote: > Hi, I want to see where some a deadlock is occurring in the kernel. I've got > a dump with a bunch of processes in the inode or namecache state. > > Can anybody give me a hint about how to find a proc's "kernel stack" - so that > I can find out what these kernel was doing for these processes when it locked > up... > > (see "repeated deadlocks in FS ..." on the smp list for more info about the problem)... Take a look at the .gdbinits in /usr/src/sys/modules/vinum. There's a little bit of documentation in vinum(4), but not really enough. The functions you might want are (extracted from gdb's "help user"): btp -- Show a backtrace for the process whose pid is specified as a parameter btpa -- Show backtraces for all processes in the system btpp -- Show a backtrace for the process previously selected with 'defproc' btr -- Show a backtrace from the ebp address specified defproc -- Specify a process for btpp and fr commands fr -- Show the frame of the stack of the process previously selected with 'defproc' Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message