From owner-kdb@oss.sgi.com Tue Feb 13 09:11:28 2001 Received: by oss.sgi.com id ; Tue, 13 Feb 2001 09:11:18 -0800 Received: from mercury.Sun.COM ([192.9.25.1]:10638 "EHLO mercury.Sun.COM") by oss.sgi.com with ESMTP id ; Tue, 13 Feb 2001 09:11:05 -0800 Received: from hsmtv32a.SFBay.Sun.COM ([129.145.120.36]) by mercury.Sun.COM (8.9.3+Sun/8.9.3) with ESMTP id JAA17097 for ; Tue, 13 Feb 2001 09:11:02 -0800 (PST) Received: from oscar0.cobalt.com (natbox [129.145.120.47]) by hsmtv32a.SFBay.Sun.COM (8.9.3+Sun/8.9.3/ENSMAIL,v2.1p1) with ESMTP id JAA22051 for ; Tue, 13 Feb 2001 09:10:55 -0800 (PST) Received: (from alan.jones@localhost) by oscar0.cobalt.com (8.9.3/8.9.3) id KAA24108 for kdb@oss.sgi.com; Tue, 13 Feb 2001 10:05:07 -0800 From: Alan Jones Message-Id: <200102131805.KAA24108@oscar0.cobalt.com> Subject: pasting into kdb To: kdb@oss.sgi.com Date: Tue, 13 Feb 2001 18:05:06 +0000 (UTC) Reply-To: alan.jones@sun.com X-Mailer: ELM [version 2.5 PL3] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing All, I'm having a problem pasting strings of >4 characters into kdb. This worked fine on kdb 1.5 adapted to 2.2.16, however, with kdb 1.7 on 2.4.1 I'm consistently losing the 5th character. Unfortunately, my hardware is fixed on a console speed of 115200. As you can imagine this is most annoying. Is there anything in kdb or Linux I could look at? Thanks for any help, Alan Jones Sun Microsystems From owner-kdb@oss.sgi.com Tue Feb 13 17:24:49 2001 Received: by oss.sgi.com id ; Tue, 13 Feb 2001 17:24:29 -0800 Received: from ppp0.ocs.com.au ([203.34.97.3]:56837 "HELO mail.ocs.com.au") by oss.sgi.com with SMTP id ; Tue, 13 Feb 2001 17:24:09 -0800 Received: (qmail 2741 invoked from network); 14 Feb 2001 01:23:54 -0000 Received: from ocs3.ocs-net (192.168.255.3) by mail.ocs.com.au with SMTP; 14 Feb 2001 01:23:54 -0000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: alan.jones@sun.com cc: kdb@oss.sgi.com Subject: Re: pasting into kdb In-reply-to: Your message of "Tue, 13 Feb 2001 18:05:06 -0000." <200102131805.KAA24108@oscar0.cobalt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 14 Feb 2001 12:23:52 +1100 Message-ID: <10484.982113832@ocs3.ocs-net> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Tue, 13 Feb 2001 18:05:06 +0000 (UTC), Alan Jones wrote: >I'm having a problem pasting strings of >4 characters into kdb. This >worked fine on kdb 1.5 adapted to 2.2.16, however, with kdb 1.7 on >2.4.1 I'm consistently losing the 5th character. Unfortunately, my >hardware is fixed on a console speed of 115200. As you can imagine >this is most annoying. Is there anything in kdb or Linux I could look >at? Unfortunately no. This is an artifact of the serial console driver which runs without flow control. It is a generic serial console problem which affects everything, not just kdb. People have been trying to tweak the serial console driver without success. From owner-kdb@oss.sgi.com Mon Feb 19 21:37:33 2001 Received: by oss.sgi.com id ; Mon, 19 Feb 2001 21:37:23 -0800 Received: from [203.199.199.225] ([203.199.199.225]:48389 "EHLO blaze.hcltech.com") by oss.sgi.com with ESMTP id ; Mon, 19 Feb 2001 21:37:15 -0800 Received: from netlab.hcltech.com (arun [192.168.201.67]) by blaze.hcltech.com (8.9.3/8.8.7) with ESMTP id LAA20428 for ; Tue, 20 Feb 2001 11:15:47 +0530 Message-ID: <3A92023F.C4E80223@netlab.hcltech.com> Date: Tue, 20 Feb 2001 11:05:59 +0530 From: arun X-Mailer: Mozilla 4.72 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: kdb@oss.sgi.com Subject: kdb version Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing hi all Iam trying to debug the kernel of linux. The linux version is 2.2.14-12. Can anyone suggest me the kdb patch version is should use. Iam pretty new to kdb. Thanks -arun From owner-kdb@oss.sgi.com Mon Feb 19 22:39:43 2001 Received: by oss.sgi.com id ; Mon, 19 Feb 2001 22:39:34 -0800 Received: from deliverator.sgi.com ([204.94.214.10]:45865 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Mon, 19 Feb 2001 22:39:11 -0800 Received: from sydney.sydney.sgi.com (sydney.sydney.sgi.com [134.14.48.2]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via SMTP id WAA07446 for ; Mon, 19 Feb 2001 22:38:06 -0800 (PST) mail_from (kaos@melbourne.sgi.com) Received: from kao2.melbourne.sgi.com by sydney.sydney.sgi.com via ESMTP (950413.SGI.8.6.12/930416.SGI) id RAA04219; Tue, 20 Feb 2001 17:36:30 +1100 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: arun cc: kdb@oss.sgi.com Subject: Re: kdb version In-reply-to: Your message of "Tue, 20 Feb 2001 11:05:59 +0530." <3A92023F.C4E80223@netlab.hcltech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 20 Feb 2001 17:36:30 +1100 Message-ID: <5720.982650990@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Tue, 20 Feb 2001 11:05:59 +0530, arun wrote: > Iam trying to debug the kernel of linux. The linux version is >2.2.14-12. Can anyone suggest me the kdb patch version is should use. SGI does not support kdb for 2.2 kernels, all our work is on 2.4 kernels. Your best option is to upgrade your kernel to 2.2.18 and use ftp://oss.sgi.com/projects/kdb/download/ix86/kdb-v1.5-2.2.18.gz From owner-kdb@oss.sgi.com Wed Feb 21 18:38:08 2001 Received: by oss.sgi.com id ; Wed, 21 Feb 2001 18:37:48 -0800 Received: from hermes.sistina.com ([208.210.145.141]:42250 "HELO sistina.com") by oss.sgi.com with SMTP id ; Wed, 21 Feb 2001 18:37:38 -0800 Received: (qmail 10393 invoked from network); 22 Feb 2001 02:36:58 -0000 Received: from fry.sistina.com (HELO sistina.com) (208.210.145.138) by hermes.sistina.com with SMTP; 22 Feb 2001 02:36:58 -0000 Received: by sistina.com (sSMTP sendmail emulation); Wed, 21 Feb 2001 20:37:37 +4200 From: Ken Preslan Date: Wed, 21 Feb 2001 20:37:37 -0600 To: kdb@oss.sgi.com Subject: can't enter KDB after panic? Message-ID: <20010221203737.A12811@sistina.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing Hi, I'm using kdb-v1.7-2.4.0.gz off the FTP site on a 2.4.1 kernel. I have a serial console for my machine setup (with mingetty on the tty device to keep it open). When the machine is running, I can use ctrl-A to break into KDB. For some reason, ctrl-A doesn't work after machine panics (right when I need it :-). This has always worked with KDB on 2.2. Does anybody know what happened? Thanks! -- Ken Preslan Code Monkey Sistina Software, Inc. From owner-kdb@oss.sgi.com Wed Feb 21 20:16:39 2001 Received: by oss.sgi.com id ; Wed, 21 Feb 2001 20:16:29 -0800 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:29978 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Wed, 21 Feb 2001 20:16:22 -0800 Received: from nodin.corp.sgi.com (fddi-nodin.corp.sgi.com [198.29.75.193]) by pneumatic-tube.sgi.com (980327.SGI.8.8.8-aspam/980310.SGI-aspam) via ESMTP id UAA04388 for ; Wed, 21 Feb 2001 20:25:30 -0800 (PST) mail_from (kaos@melbourne.sgi.com) Received: from sydney.sydney.sgi.com (sydney.sydney.sgi.com [134.14.48.2]) by nodin.corp.sgi.com (980427.SGI.8.8.8/980728.SGI.AUTOCF) via SMTP id UAA00633 for ; Wed, 21 Feb 2001 20:15:27 -0800 (PST) Received: from kao2.melbourne.sgi.com by sydney.sydney.sgi.com via ESMTP (950413.SGI.8.6.12/930416.SGI) id PAA27939; Thu, 22 Feb 2001 15:13:28 +1100 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: Ken Preslan cc: kdb@oss.sgi.com Subject: Re: can't enter KDB after panic? In-reply-to: Your message of "Wed, 21 Feb 2001 20:37:37 MDT." <20010221203737.A12811@sistina.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 22 Feb 2001 15:13:28 +1100 Message-ID: <32656.982815208@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Wed, 21 Feb 2001 20:37:37 -0600, Ken Preslan wrote: >I'm using kdb-v1.7-2.4.0.gz off the FTP site on a 2.4.1 kernel. I have >a serial console for my machine setup (with mingetty on the tty device to >keep it open). When the machine is running, I can use ctrl-A to break into >KDB. For some reason, ctrl-A doesn't work after machine panics (right when >I need it :-). If the machine is spinning with interrupts disabled then the IRQ from the serial line is not being processed so ctrl-A does not get in. This is a standard problem with the serial line and keyboard, you need an initial interrupt to get the kernel's attention. Once kdb is running it uses polled I/O but the first input needs a working IRQ. The solution is to use the NMI watchdog which always interrupts, as long as the hardware is not totally frozen. SMP boxes automatically have the NMI watchdog. The kdb patch includes NMI for UP boxes, under the processor type menu. Mind you, a panic should drop into kdb after printing the registers. Did you select "kdb off by default" in the config or boot with "kdb=off"? From owner-kdb@oss.sgi.com Thu Feb 22 09:42:57 2001 Received: by oss.sgi.com id ; Thu, 22 Feb 2001 09:42:48 -0800 Received: from mercury.Sun.COM ([192.9.25.1]:691 "EHLO mercury.Sun.COM") by oss.sgi.com with ESMTP id ; Thu, 22 Feb 2001 09:42:26 -0800 Received: from hsmtv32a.SFBay.Sun.COM ([129.145.120.36]) by mercury.Sun.COM (8.9.3+Sun/8.9.3) with ESMTP id JAA12671; Thu, 22 Feb 2001 09:41:40 -0800 (PST) Received: from oscar0.cobalt.com (natbox [129.145.120.47]) by hsmtv32a.SFBay.Sun.COM (8.9.3+Sun/8.9.3/ENSMAIL,v2.1p1) with ESMTP id JAA19228; Thu, 22 Feb 2001 09:41:38 -0800 (PST) Received: (from alan.jones@localhost) by oscar0.cobalt.com (8.9.3/8.9.3) id KAA10373; Thu, 22 Feb 2001 10:36:09 -0800 From: Alan Jones Message-Id: <200102221836.KAA10373@oscar0.cobalt.com> Subject: Re: can't enter KDB after panic? To: kaos@melbourne.sgi.com (Keith Owens) Date: Thu, 22 Feb 2001 18:36:09 +0000 (UTC) Cc: kpreslan@sistina.com (Ken Preslan), kdb@oss.sgi.com Reply-To: alan.jones@sun.com In-Reply-To: <32656.982815208@kao2.melbourne.sgi.com> from "Keith Owens" at Feb 22, 2001 03:13:28 PM X-Mailer: ELM [version 2.5 PL3] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing I'm using kdb-v1.7-2.4.2-pre1 with 2.4.1 (which applied cleanly!) on a UP system and it makes it into kdb on panic. I'm also using getty, not minigetty but getty, but I've also disabled it in the passed and it is not strictly needed to use kdb. That is, I think kdb performs I/O to the serial device regardless of it's open state in Linux. Note: for me, hardware flow control wires (DCD/DTR) were needed to get getty to wake up. My config params are: CONFIG_KDB=y # CONFIG_KDB_OFF is not set CONFIG_KALLSYMS=y # CONFIG_FRAME_POINTER is not set Regards, Alan > On Wed, 21 Feb 2001 20:37:37 -0600, > Ken Preslan wrote: > >I'm using kdb-v1.7-2.4.0.gz off the FTP site on a 2.4.1 kernel. I have > >a serial console for my machine setup (with mingetty on the tty device to > >keep it open). When the machine is running, I can use ctrl-A to break into > >KDB. For some reason, ctrl-A doesn't work after machine panics (right when > >I need it :-). > > If the machine is spinning with interrupts disabled then the IRQ from > the serial line is not being processed so ctrl-A does not get in. This > is a standard problem with the serial line and keyboard, you need an > initial interrupt to get the kernel's attention. Once kdb is running > it uses polled I/O but the first input needs a working IRQ. > > The solution is to use the NMI watchdog which always interrupts, as > long as the hardware is not totally frozen. SMP boxes automatically > have the NMI watchdog. The kdb patch includes NMI for UP boxes, under > the processor type menu. > > Mind you, a panic should drop into kdb after printing the registers. > Did you select "kdb off by default" in the config or boot with > "kdb=off"? > From owner-kdb@oss.sgi.com Thu Feb 22 15:31:42 2001 Received: by oss.sgi.com id ; Thu, 22 Feb 2001 15:31:33 -0800 Received: from hermes.sistina.com ([208.210.145.141]:9735 "HELO sistina.com") by oss.sgi.com with SMTP id ; Thu, 22 Feb 2001 15:31:24 -0800 Received: (qmail 11614 invoked from network); 22 Feb 2001 23:30:43 -0000 Received: from fry.sistina.com (HELO sistina.com) (208.210.145.138) by hermes.sistina.com with SMTP; 22 Feb 2001 23:30:43 -0000 Received: by sistina.com (sSMTP sendmail emulation); Thu, 22 Feb 2001 17:31:22 -0600 From: Ken Preslan Date: Thu, 22 Feb 2001 17:31:22 -0600 To: Keith Owens Cc: kdb@oss.sgi.com Subject: Re: can't enter KDB after panic? Message-ID: <20010222173122.A8980@sistina.com> References: <20010221203737.A12811@sistina.com> <32656.982815208@kao2.melbourne.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <32656.982815208@kao2.melbourne.sgi.com>; from kaos@melbourne.sgi.com on Thu, Feb 22, 2001 at 03:13:28PM +1100 Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Thu, Feb 22, 2001 at 03:13:28PM +1100, Keith Owens wrote: > The solution is to use the NMI watchdog which always interrupts, as > long as the hardware is not totally frozen. SMP boxes automatically > have the NMI watchdog. The kdb patch includes NMI for UP boxes, under > the processor type menu. > > Mind you, a panic should drop into kdb after printing the registers. > Did you select "kdb off by default" in the config or boot with > "kdb=off"? No version of KDB I've ever used has automaticaly dropped into KDB on a panic() call. An oops, yes, but not a panic. I did a bit more research. I only see this problem on SMP 2.4 machines. A UP 2.4 machine works fine (without the NMI watchdog switches, even). SMP and UP 2.2.18/kdb-v1.5 work fine too. I'm not specifiying kdb off in the config or on the boot command line. (I can use ctrl-A before a panic and it works, so KDB isn't off.) I'm using the exact same KDB config lines that Alan said he was using. (But he's using a UP machine.) Is there something I should be doing to set up the NMI watchdog on a SMP box? -- Ken Preslan Code Monkey Sistina Software, Inc. From owner-kdb@oss.sgi.com Thu Feb 22 15:48:32 2001 Received: by oss.sgi.com id ; Thu, 22 Feb 2001 15:48:23 -0800 Received: from hermes.sistina.com ([208.210.145.141]:39944 "HELO sistina.com") by oss.sgi.com with SMTP id ; Thu, 22 Feb 2001 15:48:20 -0800 Received: (qmail 12999 invoked from network); 22 Feb 2001 23:47:40 -0000 Received: from fry.sistina.com (HELO sistina.com) (208.210.145.138) by hermes.sistina.com with SMTP; 22 Feb 2001 23:47:40 -0000 Received: by sistina.com (sSMTP sendmail emulation); Thu, 22 Feb 2001 17:48:20 -0600 From: Ken Preslan Date: Thu, 22 Feb 2001 17:48:20 -0600 To: Alan Jones Cc: kdb@oss.sgi.com Subject: Re: can't enter KDB after panic? Message-ID: <20010222174819.A10229@sistina.com> References: <32656.982815208@kao2.melbourne.sgi.com> <200102221836.KAA10373@oscar0.cobalt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200102221836.KAA10373@oscar0.cobalt.com>; from alan.jones@sun.com on Thu, Feb 22, 2001 at 06:36:09PM +0000 Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Thu, Feb 22, 2001 at 06:36:09PM +0000, Alan Jones wrote: > I'm also using getty, > not minigetty but getty, but I've also disabled it in the passed and > it is not strictly needed to use kdb. That is, I think kdb performs > I/O to the serial device regardless of it's open state in Linux. This may be true if KDB automatically breaks because of an oops. But there are cases where you get your kernel into some sort of deadlock state, and you need to force a break manually. You need to have a program that has that device open to make KDB respond to the ctrl-A. At least that's been my experience. -- Ken Preslan Code Monkey Sistina Software, Inc. From owner-kdb@oss.sgi.com Thu Feb 22 15:56:12 2001 Received: by oss.sgi.com id ; Thu, 22 Feb 2001 15:56:02 -0800 Received: from spr2.ibd.com ([209.249.61.20]:25862 "EHLO imap.ultradevices.com") by oss.sgi.com with ESMTP id ; Thu, 22 Feb 2001 15:56:00 -0800 Received: from ultradevices.com ([38.184.255.98]) by imap.ultradevices.com (8.11.0/8.11.0) with ESMTP id f1MNrta18168 for ; Thu, 22 Feb 2001 15:53:55 -0800 Message-ID: <3A957C94.99FD89D3@ultradevices.com> Date: Thu, 22 Feb 2001 15:54:44 -0500 From: Manoj Ekbote Organization: Ultradevices Inc. X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.18br i686) X-Accept-Language: en MIME-Version: 1.0 To: kdb@oss.sgi.com Subject: remote debugging Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing Hello all, I am new to kdb. I would like to know if i could use kdb for remote debugging (using serial port from a remote system to debug the taget environment). From the documentation of kdb,i understand that i can debug the running kernel & output any messages to another machine connected through a serial port. Is my understanding correct? TIA, manoj ---//--- From owner-kdb@oss.sgi.com Thu Feb 22 16:14:22 2001 Received: by oss.sgi.com id ; Thu, 22 Feb 2001 16:14:13 -0800 Received: from ppp0.ocs.com.au ([203.34.97.3]:23314 "HELO mail.ocs.com.au") by oss.sgi.com with SMTP id ; Thu, 22 Feb 2001 16:13:54 -0800 Received: (qmail 25671 invoked from network); 23 Feb 2001 00:13:49 -0000 Received: from ocs3.ocs-net (192.168.255.3) by mail.ocs.com.au with SMTP; 23 Feb 2001 00:13:49 -0000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: Manoj Ekbote cc: kdb@oss.sgi.com Subject: Re: remote debugging In-reply-to: Your message of "Thu, 22 Feb 2001 15:54:44 CDT." <3A957C94.99FD89D3@ultradevices.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 23 Feb 2001 11:13:48 +1100 Message-ID: <18206.982887228@ocs3.ocs-net> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Thu, 22 Feb 2001 15:54:44 -0500, Manoj Ekbote wrote: >I would like to know if i could use kdb for remote debugging (using >serial port from a remote system to debug the taget environment). From >the documentation of kdb,i understand that i can debug the running >kernel & output any messages to another machine connected through a >serial port. Correct. Read Documentation/serial-console.txt for the setup, boot with "console=tty0 console=ttyS0,38400" to get kdb on both the main keyboard and the remote system. Replace ttys0,38400 with suitable values. From owner-kdb@oss.sgi.com Thu Feb 22 20:14:22 2001 Received: by oss.sgi.com id ; Thu, 22 Feb 2001 20:14:13 -0800 Received: from deliverator.sgi.com ([204.94.214.10]:53019 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Thu, 22 Feb 2001 20:14:05 -0800 Received: from sydney.sydney.sgi.com (sydney.sydney.sgi.com [134.14.48.2]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via SMTP id UAA12225 for ; Thu, 22 Feb 2001 20:13:00 -0800 (PST) mail_from (kaos@melbourne.sgi.com) Received: from kao2.melbourne.sgi.com by sydney.sydney.sgi.com via ESMTP (950413.SGI.8.6.12/930416.SGI) id PAA24073; Fri, 23 Feb 2001 15:12:43 +1100 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: Ken Preslan cc: kdb@oss.sgi.com Subject: Re: can't enter KDB after panic? In-reply-to: Your message of "Thu, 22 Feb 2001 17:31:22 MDT." <20010222173122.A8980@sistina.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 23 Feb 2001 15:12:43 +1100 Message-ID: <1967.982901563@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Thu, 22 Feb 2001 17:31:22 -0600, Ken Preslan wrote: >No version of KDB I've ever used has automaticaly dropped into KDB >on a panic() call. An oops, yes, but not a panic. True. See patch below. >Is there something I should be doing to set up the NMI watchdog on a SMP box? panic() disables the APICs which turns off all interrupts, including the NMI watchdog. panic() also disables all the other cpus. This patch renames the existing kdb panic to oops and adds panic. Because of the way that kdb is entered from the panic() routine, it has no valid exception frame. kdb tries to synthesise an exception frame but that is tricky and does not always work. If backtrace from panic says "not in kernel" then get the pid from the earlier message and do "btp pid" instead. You can also get invalid kernel addresses due to the incorrect exception frame, ignore those messages. Patch against kernel 2.4.2 + kdb-v1.7-2.4.2. Index: 2.2/include/linux/kdb.h --- 2.2/include/linux/kdb.h Mon, 29 Jan 2001 17:02:23 +1100 kaos (linux-2.4/b/d/39_kdb.h 1.3 644) +++ 2.2(w)/include/linux/kdb.h Fri, 23 Feb 2001 14:31:41 +1100 kaos (linux-2.4/b/d/39_kdb.h 1.3 644) @@ -136,7 +136,7 @@ typedef enum { KDB_REASON_FAULT, /* Kernel fault - regs valid */ KDB_REASON_BREAK, /* Breakpoint inst. - regs valid */ KDB_REASON_DEBUG, /* Debug Fault - regs valid */ - KDB_REASON_PANIC, /* Kernel Panic - regs valid */ + KDB_REASON_OOPS, /* Kernel Oops - regs valid */ KDB_REASON_SWITCH, /* CPU switch - regs valid*/ KDB_REASON_ENTER, /* KDB_ENTER() trap/fault - regs valid */ KDB_REASON_KEYBOARD, /* Keyboard entry - regs valid */ @@ -144,6 +144,7 @@ typedef enum { KDB_REASON_WATCHDOG, /* Watchdog interrupt; regs valid */ KDB_REASON_RECURSE, /* Recursive entry to kdb; regs probably valid */ KDB_REASON_SILENT, /* Silent entry/exit to kdb; regs invalid */ + KDB_REASON_PANIC, /* From panic() routine; regs invalid */ } kdb_reason_t; Index: 2.2/arch/i386/kdb/kdbasupport.c --- 2.2/arch/i386/kdb/kdbasupport.c Sun, 21 Jan 2001 15:29:07 +1100 kaos (linux-2.4/b/d/48_kdbasuppor 1.2 644) +++ 2.2(w)/arch/i386/kdb/kdbasupport.c Fri, 23 Feb 2001 13:01:28 +1100 kaos (linux-2.4/b/d/48_kdbasuppor 1.2 644) @@ -1497,7 +1497,7 @@ kdba_callback_die(struct pt_regs *regs, */ kdb_diemsg = (char *)vp; - return kdb(KDB_REASON_PANIC, error_code, (kdb_eframe_t) regs); + return kdb(KDB_REASON_OOPS, error_code, (kdb_eframe_t) regs); } /* Index: 2.2/kdb/kdbmain.c --- 2.2/kdb/kdbmain.c Tue, 30 Jan 2001 17:15:54 +1100 kaos (linux-2.4/b/d/49_kdbmain.c 1.1.1.4 644) +++ 2.2(w)/kdb/kdbmain.c Fri, 23 Feb 2001 14:53:39 +1100 kaos (linux-2.4/b/d/49_kdbmain.c 1.1.1.4 644) @@ -734,6 +734,7 @@ kdb_local(kdb_reason_t reason, int error char cmd[CMD_BUFLEN]; int diag; int parsed_once=0; /* if false don't repeat last cmd on CR */ + typeof (*ef) local_ef; if (reason != KDB_REASON_DEBUG && reason != KDB_REASON_SILENT) { @@ -788,18 +789,24 @@ kdb_local(kdb_reason_t reason, int error case KDB_REASON_SWITCH: kdb_printf("due to cpu switch\n"); break; - case KDB_REASON_CALL: - kdb_printf("due to direct function call\n"); + case KDB_REASON_CALL: /* drop through */ + case KDB_REASON_PANIC: + if (reason == KDB_REASON_CALL) + kdb_printf("due to direct function call\n"); + else + kdb_printf("due to panic\n"); /* * Get a set of registers that defines the current * context (as of the call to kdb). */ + memset(&local_ef, 0, sizeof(local_ef)); + ef = &local_ef; kdb_getcurrentframe(ef); kdba_setpc(ef, (kdb_machreg_t)(&kdb)); /* for traceback */ break; - case KDB_REASON_PANIC: - kdb_printf("Panic: %s\n", kdb_diemsg); - kdb_printf("due to panic @ " kdb_machreg_fmt "\n", kdba_getpc(ef)); + case KDB_REASON_OOPS: + kdb_printf("Oops: %s\n", kdb_diemsg); + kdb_printf("due to oops @ " kdb_machreg_fmt "\n", kdba_getpc(ef)); kdba_dumpregs(ef, NULL, NULL); break; case KDB_REASON_NMI: @@ -977,8 +984,8 @@ kdb_previous_event(void) * acording to kdb state. * db_result Result code from break or debug point. * ef The exception frame at time of fault/breakpoint. If reason - * is KDB_REASON_SILENT then ef is NULL, otherwise it should - * always be valid. + * is KDB_REASON_SILENT or KDB_REASON_PANIC then ef is NULL, + * otherwise it should always be valid. * Returns: * 0 KDB was invoked for an event which it wasn't responsible * 1 KDB handled the event for which it was invoked. @@ -1065,8 +1072,10 @@ kdb_main_loop(kdb_reason_t reason, kdb_r * The breakpoint trap code should invoke this function with * one of KDB_REASON_BREAK (int 03) or KDB_REASON_DEBUG (debug register) * - * the panic function should invoke this function with - * KDB_REASON_PANIC. + * the die_if_kernel function should invoke this function with + * KDB_REASON_OOPS. + * + * the panic function should invoke this function with KDB_REASON_PANIC. * * The kernel fault handler should invoke this function with * reason == KDB_REASON_FAULT and error == trap vector #. @@ -1080,8 +1089,8 @@ kdb_main_loop(kdb_reason_t reason, kdb_r * reason The reason KDB was invoked * error The hardware-defined error code * ef The exception frame at time of fault/breakpoint. If reason - * is KDB_REASON_SILENT then ef is NULL, otherwise it should - * always be valid. + * is KDB_REASON_SILENT or KDB_REASON_PANIC then ef is NULL, + * otherwise it should always be valid. * Returns: * 0 KDB was invoked for an event which it wasn't responsible * 1 KDB handled the event for which it was invoked. @@ -2698,6 +2707,34 @@ kdb_cmd_init(void) } /* + * kdb_panic + * + * Invoked via the panic_notifier_list. + * + * Inputs: + * None. + * Outputs: + * None. + * Returns: + * Zero. + * Locking: + * None. + * Remarks: + * When this function is called from panic(), the other cpus have already + * been stopped. + * + */ + +static int +kdb_panic(struct notifier_block *self, unsigned long command, void *ptr) +{ + kdb(KDB_REASON_PANIC, 0, NULL); + return(0); +} + +static struct notifier_block kdb_block = { kdb_panic, NULL, 0 }; + +/* * kdb_init * * Initialize the kernel debugger environment. @@ -2734,6 +2771,7 @@ kdb_init(void) kdb_cmd_init(); /* Preset commands from kdb_cmds */ kdb(KDB_REASON_SILENT, 0, 0); /* Activate any preset breakpoints on boot cpu */ + notifier_chain_register(&panic_notifier_list, &kdb_block); } EXPORT_SYMBOL(kdb_register); From owner-kdb@oss.sgi.com Fri Feb 23 12:24:48 2001 Received: by oss.sgi.com id ; Fri, 23 Feb 2001 12:24:28 -0800 Received: from hermes.sistina.com ([208.210.145.141]:53259 "HELO sistina.com") by oss.sgi.com with SMTP id ; Fri, 23 Feb 2001 12:24:11 -0800 Received: (qmail 12486 invoked from network); 23 Feb 2001 20:23:29 -0000 Received: from fry.sistina.com (HELO sistina.com) (208.210.145.138) by hermes.sistina.com with SMTP; 23 Feb 2001 20:23:29 -0000 Received: by sistina.com (sSMTP sendmail emulation); Fri, 23 Feb 2001 14:24:10 -0600 From: Ken Preslan Date: Fri, 23 Feb 2001 14:24:10 -0600 To: Keith Owens Cc: kdb@oss.sgi.com Subject: Re: can't enter KDB after panic? Message-ID: <20010223142410.A8230@sistina.com> References: <20010222173122.A8980@sistina.com> <1967.982901563@kao2.melbourne.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <1967.982901563@kao2.melbourne.sgi.com>; from kaos@melbourne.sgi.com on Fri, Feb 23, 2001 at 03:12:43PM +1100 Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Fri, Feb 23, 2001 at 03:12:43PM +1100, Keith Owens wrote: > This patch renames the existing kdb panic to oops and adds panic. > Because of the way that kdb is entered from the panic() routine, it has > no valid exception frame. kdb tries to synthesise an exception frame > but that is tricky and does not always work. If backtrace from panic > says "not in kernel" then get the pid from the earlier message and do > "btp pid" instead. You can also get invalid kernel addresses due to > the incorrect exception frame, ignore those messages. Sweet! Thanks for you help. -- Ken Preslan Code Monkey Sistina Software, Inc. From owner-kdb@oss.sgi.com Mon Feb 26 22:54:46 2001 Received: by oss.sgi.com id ; Mon, 26 Feb 2001 22:54:27 -0800 Received: from sgi.SGI.COM ([192.48.153.1]:49739 "EHLO sgi.com") by oss.sgi.com with ESMTP id ; Mon, 26 Feb 2001 22:54:02 -0800 Received: from sydney.sydney.sgi.com ([134.14.48.2]) by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via SMTP id WAA07447 for ; Mon, 26 Feb 2001 22:53:59 -0800 (PST) mail_from (kaos@ocs.com.au) Received: from kao2.melbourne.sgi.com by sydney.sydney.sgi.com via ESMTP (950413.SGI.8.6.12/930416.SGI) id RAA29290; Tue, 27 Feb 2001 17:52:33 +1100 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: kdb@oss.sgi.com Cc: linux-kernel@vger.kernel.org Subject: [Announce] kdb v1.8 is available Date: Tue, 27 Feb 2001 17:52:41 +1100 Message-ID: <31732.983256761@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-Type: text/plain; charset=us-ascii http://oss.sgi.com/projects/kdb/download/ix86/ contains patches for kdb v1.8 against 2.4.2 and 2.4.2-ac5. The main reason for this release is to hook into the panic() routine and to sync with the NMI changes in the -ac series. kdb-v1.8-2.4.2-ac5 has been tested on SMP, the UP NMI code has not been tested, it relies on the -ac patch. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.3 (GNU/Linux) Comment: Exmh version 2.1.1 10/15/1999 iD8DBQE6m064i4UHNye0ZOoRAlr8AKCN657mDGbSiQuOZEfEerk2u6xcmwCg09K6 GnlCQTeyUFhXNMQXY3CgunU= =RNp7 -----END PGP SIGNATURE----- From owner-kdb@oss.sgi.com Tue Feb 27 02:02:39 2001 Received: by oss.sgi.com id ; Tue, 27 Feb 2001 02:02:29 -0800 Received: from [203.199.199.225] ([203.199.199.225]:27914 "EHLO blaze.hcltech.com") by oss.sgi.com with ESMTP id ; Tue, 27 Feb 2001 02:02:14 -0800 Received: from netlab.hcltech.com (arun [192.168.201.67]) by blaze.hcltech.com (8.9.3/8.8.7) with ESMTP id PAA19084 for ; Tue, 27 Feb 2001 15:41:57 +0530 Message-ID: <3A9B7B28.BE9F13C3@netlab.hcltech.com> Date: Tue, 27 Feb 2001 15:32:16 +0530 From: arun X-Mailer: Mozilla 4.72 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: kdb@oss.sgi.com Subject: kdb help References: <20010222173122.A8980@sistina.com> <1967.982901563@kao2.melbourne.sgi.com> <20010223142410.A8230@sistina.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing Hello, I'm trying to build a new kernel with kdb support and I keep getting an error from the make file: kallsyms pass 1 [make] /bin/sh: /sbin/kallsyms: No such file or directory error.... What is kallsyms and where can I get it from ? Thanks -arun From owner-kdb@oss.sgi.com Tue Feb 27 03:17:30 2001 Received: by oss.sgi.com id ; Tue, 27 Feb 2001 03:17:09 -0800 Received: from ppp0.ocs.com.au ([203.34.97.3]:64018 "HELO mail.ocs.com.au") by oss.sgi.com with SMTP id ; Tue, 27 Feb 2001 03:16:38 -0800 Received: (qmail 10422 invoked from network); 27 Feb 2001 11:16:29 -0000 Received: from ocs3.ocs-net (192.168.255.3) by mail.ocs.com.au with SMTP; 27 Feb 2001 11:16:29 -0000 X-Mailer: exmh version 2.1.1 10/15/1999 From: Keith Owens To: arun cc: kdb@oss.sgi.com Subject: Re: kdb help In-reply-to: Your message of "Tue, 27 Feb 2001 15:32:16 +0530." <3A9B7B28.BE9F13C3@netlab.hcltech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 27 Feb 2001 22:16:28 +1100 Message-ID: <1123.983272588@ocs3.ocs-net> Sender: owner-kdb@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;kdb-outgoing On Tue, 27 Feb 2001 15:32:16 +0530, arun wrote: >kallsyms pass 1 >[make] /bin/sh: /sbin/kallsyms: No such file or directory >What is kallsyms and where can I get it from ? kallsyms is part of modutils.