Re: debugging live kernel

From: Rob Landley
Date: Mon Apr 29 2013 - 16:31:14 EST

On 04/29/2013 06:34:08 AM, lkml@xxxxxxxxxxx wrote:
In case if my currently running kernel starts to do strange things and I
suspect it might have bug or was corrupted, what steps can be taken to
check for more info, other then dmesg?

If you built it with kgdb, you can use that. If you have a jtag connected to the hardware, you can use that. If you built with kernel crash dumps, you can use that. If you kept the vmlinux file corresponding to your bzImage you can (VERY CAREFULLY) look at /dev/kmem with gdb (or use the corresponding to decode addresses by hand; note this is horrible but possible)...

There's levels of difficulty here: "Kernel was hooked up to monitoring stuff before it went wrong" is the easy path. "Kept the box it came in" is the less easy path. "Flying blind on a rocketcycle" is not easy, and you pretty much have to have experience with the first two before you can even attempt the third. (And unless you're off in the enterprise space you generally go "Can I reproduce the issue? Let's reproduce it under a properly instrumented environment. If I _can't_ reproduce the issue then a reboot fixed it and we're good.)

Your problem description is way too vague to give specific advice about. "If I start to feel poorly, is there anything I can do to diagnose my illness?" Ummm... yes? (No, I'm not going to exchange a dozen emails with you to about it, and nothing here should be considered medical advice.)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at