CRASH(8) | System Manager's Manual (vax) | CRASH(8) |
crash
— UNIX
system failures
This section explains what happens when the system crashes and (very briefly) how to analyze crash dumps.
When the system crashes voluntarily it prints a message of the form
panic: why i gave up the
ghost
on the console, takes a dump on a mass storage peripheral, and then invokes an automatic reboot procedure as described in reboot(8). (If auto-reboot is disabled on the front panel of the machine the system will simply halt at this point.) Unless some unexpected inconsistency is encountered in the state of the file systems due to hardware or software failure, the system will then resume multi-user operations.
The system has a large number of internal consistency checks; if one of these fails, then it will panic with a very short message indicating which one failed. In many instances, this will be the name of the routine which detected the error, or a two-word description of the inconsistency. A full understanding of most panic messages requires perusal of the source code for the system.
The most common cause of system failures is hardware failure, which can reflect itself in different ways. Here are the messages which are most likely, with some hints as to causes. Left unstated in all cases is the possibility that hardware or software error produced the message in some unexpected way.
0 reserved addressing fault 1 privileged instruction fault 2 reserved operand fault 3 bpt instruction fault 4 xfc instruction fault 5 system call trap 6 arithmetic trap 7 ast delivery trap 8 segmentation fault 9 protection fault 10 trace trap 11 compatibility mode fault 12 page fault 13 page table fault
The favorite trap types in system crashes are trap types 8 and 9, indicating a wild reference. The code is the referenced address, and the pc at the time of the fault is printed. These problems tend to be easy to track down if they are kernel bugs since the processor stops cold, but random flakiness seems to cause this sometimes. The debugger can be used to locate the instruction and subroutine corresponding to the PC value. If that is insufficient to suggest the nature of the problem, more detailed examination of the system status at the time of the trap usually can produce an explanation.
That completes the list of panic types you are likely to see.
When the system crashes it writes (or at least attempts to write) an image of memory into the back end of the dump device, usually the same as the primary swap area. After the system is rebooted, the program savecore(8) runs and preserves a copy of this core image and the current system in a specified directory for later perusal. See savecore(8) for details.
To analyze a dump you should begin by running
adb
with the -k
flag on the
system load image and core dump. If the core image is the result of a panic,
the panic message is printed. Normally the command “$c” will
provide a stack trace from the point of the crash and this will provide a
clue as to what went wrong. For more detail see “Using ADB to Debug
the UNIX Kernel”.
gdb(1),
reboot(8)
“VAX 11/780 System Maintenance Guide” and “VAX Hardware
Handbook” for more information about machine checks.
“Using ADB to Debug the UNIX Kernel”
June 5, 1993 | NetBSD 10.99 |