Originally Posted by rbh123
I am interested in learning how-to debugg Kernel-panics, but I dont know how to start.So need help in understanding how to debug a kernel-panic ? how to find the code that is causing the panic?.I know that the first thing to do when there is a kernel panic is to capture the Oops.But its difficult for me to understand the Oops.
To which pmarques
To help you, I'll need more information:
- What kernel version are you using?
- Does the machine hang after the panic? I.e., is this just a oops or an actual panic?[snip]
Anyway, if you're using a vanilla kernel, you can find all the information you need in the file "Documentation/oops-tracing.txt" that is bundled with th kernel sources.
Clearly, what pmarques
was answering was "How can I solve a specific
kernel panic, whilst rbh123
was asking "How can I learn what to do when a kernel panic (or "oops") happens, and what to do about the error?"
The suggestion to look at the documentation that comes with the kernel source code is a place to start, although not all sources have the oops-tracing.txt
file. (Note: You need to have downloaded the kernel sources for your distribution for this to be possible.)
Other things to try:
1) Review the log files in /var/logs
2) Google the error message.
3) Look for any bugzilla reports for the distribution and specific kernel that generated the message
4) And, simplest of all, read the error message
. Most of the time the cause of the message is fairly clear from the text of the message and any error messages that preceeded it.