Re: using NMI watchdog for debugging "hanging"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ed L Cashin <ecashin@xxxxxxxxxx> writes:

> Hi.  I'm preparing to use the NMI watchdog feature to do some
> debugging.  To get ready, I've created a module like this:
>
>   /* ... */
>   int deadlock_init(void)
>   {
>   	local_irq_disable();
>   	while ("I want to loop!")
>   		;
>   
>   	return 0;
>   }
>   
>   module_init(deadlock_init);
>   /* ... */
>
> I boot with these parameters:
>
>   lapic nmi_watchdog=2 console=ttyS0,9600n8 console=tty0
>
> I see nmi.c:check_nmi_watchdog is satisfied:
>
>   testing NMI watchdog ... OK.
>
> ... and I can see the nmi count in /proc/interrupts increasing every
> couple minutes or so.  I have a serial console going to another
> computer.  When I load this module, though, I don't ever see any
> debugging information on the screen or on the serial console.  
>
> Is there anything else I need to do?  I'm assuming that I should see
> an NMI-watchdog-generated oops because of the infinite loop with
> interrupts disabled.

For anyone who's interested in this, I found out a couple more
things.  The machine that I was using for the test described above has
a Pentium 4, and I couldn't see the nmi interrupt count increasing in
/proc/interrupts when I booted with nmi_interrupt=1.  (2.6.4-52 Suse
kernel.) 

I did the same thing (infinite loop module) on a machine with an
Athlon XP 2200+ booting a gfs-patched 2.6.8.1 kernel with
nmi_watchdog=1, and I got a nice oops only a few seconds after loading
my misnamed "deadlock" module.  The stack trace wasn't very helpful,
but the EIP was in deadlock_init, which is where the infinite loop
is.  Neat!

-- 
  Ed L Cashin <ecashin@xxxxxxxxxx>


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux