Florian Beier wrote:
Hi,
I am trying to debug a system freeze caused by our own kernel module...
I am using a serial interface and kgdb.
When the system freezes, the only possibility in the remote gdb is to
stop the debugging session because I cannot press 'ctrl c' anymore (because
the test machine is dead).
So how am I supposed to get a kernel stack or any helpfull information?
It is hardly possible to set a breakpoint because the module functions
are called serveral times a second and the system runs sometimes hours
without problems...
The best off the self solution is the NMI watchdog. Failing that, there are
ways to generate NMIs manually using a switch to directly send a signal to
the backplane.
You might check out http://www.microsoft.com/whdc/system/CEC/dmpsw.mspx for
PCI card sets or the attached for ISA machines.
(This info should be part of the kgdb documentation...)
--
George Anzinger [EMAIL PROTECTED]
HRT (High-res-timers): http://sourceforge.net/projects/high-res-timers/
Subject: Debugging with NMI
Date: Mon, 12 Jul 1999 11:28:31 -0500
From: David Grothe <[EMAIL PROTECTED]>
Organization: Gcom, Inc
To: David Grothe <[EMAIL PROTECTED]>
Kernel hackers:
Maybe this is old hat, but it is new to me --
On an ISA bus machine, if you short out the A1 and B1 pins of an ISA
slot you will generate an NMI to the CPU. This interrupts even a
machine that is hung in a loop with interrupts disabled. Used in
conjunction with kgdb <
ftp://ftp.gcom.com/pub/linux/src/kgdb-2.3.35/kgdb-2.3.35.tgz > you can
gain debugger control of a machine that is hung in the kernel! Even
without kgdb the kernel will print a stack trace so you can find out
where it was hung.
The A1/B1 pins are directly opposite one another and the farthest pins
towards the bracket end of the ISA bus socket. You can stick a paper
clip or multi-meter probe between them to short them out.
I had a spare ISA bus to PC104 bus adapter around. The PC104 end of the
board consists of two rows of wire wrap pins. So I wired a push button
between the A1/B1 pins and now have an ISA board that I can stick into
any ISA bus slot for debugger entry.
Microsoft has a circuit diagram of a PCI card at
http://www.microsoft.com/hwdev/DEBUGGING/DMPSW.HTM. If you want to
build one you will have to mail them and ask for the PAL equations.
Nobody makes one comercially.
[THIS TIP COMES WITH NO WARRANTY WHATSOEVER. It works for me, but if
your machine catches fire, it is your problem, not mine.]
-- Dave (the kgdb guy)