Penguin
Annotated edit history of KernelPanic version 8, including all changes. View license author blame.
Rev Author # Line
1 CraigBox 1 A general protection fault for your [Kernel].
2
3 Normally caused when the kernel tries to address memory 0 and throws a NullPointerException, or can't find its root file system, or something like that. Means your system stops.
2 PerryLorier 4
5 The idea is that if your kernel detects its in a bad state, it should stop doing anything, since theres no assurances that anything is correct anymore. It outputs information about whats going on that caused the problem just before it dies.
6
7 Occasionally the kernel will "oops" instead, an "Oops" means that it detected an error, but is trying to continue anyway. Oops are usually logged in syslog which will resolve all the symbols for you. If you get an Oops you should reboot as soon as possible.
1 CraigBox 8
9 You have to try pretty hard, or have dodgy hardware, to get a kernel panic.
10
11 How do you debug a kernel panic?
2 PerryLorier 12
3 PerryLorier 13 You write down all the numbers, and then feed them into ksymoops(8). ksymoops is pretty lenient about how you enter the data, but try and be exact with your formatting or you may confuse ksymoops.
2 PerryLorier 14
15 Alternatively take the numbers in angle brackets and look them up manually in /proc/ksyms and System.map.
16 ----
4 PerryLorier 17 If you have a machine in a hard to reach place and are worried about it panic'ing (for whatever reason), try setting
2 PerryLorier 18 /proc/sys/kernel/panic
19 to some non-zero number, then, (hopefully) after that number of seconds the machine will reboot, giving you an oppertunity to reconnect to it after it reboots remotely.
5 PerryLorier 20
21 This can be done by editing
22 /etc/sysctl.conf
23 and adding the line
24 kernel.panic = 60
2 PerryLorier 25
6 PerryLorier 26 see sysctl(8) or proc(5) for more information
2 PerryLorier 27 ----
7 PerryLorier 28 If you get a panic in the "swapper" then chances are it's dodgy ram (or other related hardware). a better indicator is if you get one in the interrupt handler.
8 PerryLorier 29
30 ----
31 CategoryKernel CategoryErrors