4.2BSD/usr/man/man8/crash.8v

.TH CRASH 8V "1 September 1981"
.UC 4
.SH NAME
crash \- what happens when the system crashes
.SH DESCRIPTION
This section explains what happens when the system crashes and how
you can analyze crash dumps.
.PP
When the system crashes voluntarily it prints a message of the form
.IP
panic: why i gave up the ghost
.LP
on the console, takes a dump on a mass storage peripheral,
and then invokes an automatic reboot procedure as
described in
.IR 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.
.PP
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.
.PP
The most common cause of system failures is hardware failure, which
can reflect itself in different ways.  Here are the messages which
you are likely to encounter, 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.
.TP
.B IO err in push
.ns
.TP
.B hard IO err in swap
The system encountered an error trying to write to the paging device
or an error in reading critical information from a disk drive.
You should fix your disk if it is broken or unreliable.
.TP
.B timeout table overflow
.ns
This really shouldn't be a panic, but until we fix up the data structure
involved, running out of entries causes a crash.  If this happens,
you should make the timeout table bigger.
.TP
.B KSP not valid
.ns
.TP
.B SBI fault
.ns
.TP
.B CHM? in kernel
These indicate either a serious bug in the system or, more often,
a glitch or failing hardware.
If SBI faults recur, check out the hardware or call
field service.  If the other faults recur, there is likely a bug somewhere
in the system, although these can be caused by a flakey processor.
Run processor microdiagnostics.
.TP
.B machine check %x:
.I description
.ns
.TP
.I \0\0\0machine dependent machine-check information
.ns
We should describe machine checks, and will someday.
For now, ask someone who knows (like your friendly field service people).
.TP
.B trap type %d, code=%d, pc=%x
A unexpected trap has occurred within the system; the trap types are:
.sp
.nf
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
.fi
.sp
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.
.TP
.B init died
The system initialization process has exited.  This is bad news, as no new
users will then be able to log in.  Rebooting is the only fix, so the
system just does it right away.
.PP
That completes the list of panic types you are likely to see.
.PP
When the system crashes it writes (or at least attempts to write)
an image of memory into the back end of the primary swap
area.  After the system is rebooted, the program
.IR savecore (8)
runs and preserves a copy of this core image and the current
system in a specified directory for later perusal.  See
.IR savecore (8)
for details.
.PP
To analyze a dump you should begin by running
.IR adb (1)
with the 
.B \-k
flag on the core dump.
Normally the command
``*(intstack-4)$c''
will provide a stack trace from the point of
the crash and this will provide a clue as to
what went wrong.
A more complete discussion
of system debugging is impossible here.
See, however,
``Using ADB to Debug the UNIX Kernel''.
.SH "SEE ALSO"
adb(1),
analyze(8),
reboot(8)
.br
.I "VAX 11/780 System Maintenance Guide"
for more information about machine checks.
.br
.I "Using ADB to Debug the UNIX Kernel"