xref: /netbsd-src/share/man/man8/man8.vax/crash.8 (revision 997634fe1470bb1edef8e5d52fc996f52c9c958f)
1*997634feSjoerg.\"	$NetBSD: crash.8,v 1.12 2009/03/09 19:24:32 joerg Exp $
22b6e02aaSmrg.\"
32b6e02aaSmrg.\" Copyright (c) 1980, 1991, 1993
42b6e02aaSmrg.\"	The Regents of the University of California.  All rights reserved.
561f28255Scgd.\"
661f28255Scgd.\" Redistribution and use in source and binary forms, with or without
761f28255Scgd.\" modification, are permitted provided that the following conditions
861f28255Scgd.\" are met:
961f28255Scgd.\" 1. Redistributions of source code must retain the above copyright
1061f28255Scgd.\"    notice, this list of conditions and the following disclaimer.
1161f28255Scgd.\" 2. Redistributions in binary form must reproduce the above copyright
1261f28255Scgd.\"    notice, this list of conditions and the following disclaimer in the
1361f28255Scgd.\"    documentation and/or other materials provided with the distribution.
14075022b3Sagc.\" 3. Neither the name of the University nor the names of its contributors
1561f28255Scgd.\"    may be used to endorse or promote products derived from this software
1661f28255Scgd.\"    without specific prior written permission.
1761f28255Scgd.\"
1861f28255Scgd.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1961f28255Scgd.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2061f28255Scgd.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2161f28255Scgd.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2261f28255Scgd.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2361f28255Scgd.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2461f28255Scgd.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2561f28255Scgd.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2661f28255Scgd.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2761f28255Scgd.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2861f28255Scgd.\" SUCH DAMAGE.
2961f28255Scgd.\"
302b6e02aaSmrg.\"	from: @(#)crash.8	8.1 (Berkeley) 6/5/93
3161f28255Scgd.\"
32a556b47dSwiz.Dd June 5, 1993
3343148f18Sreed.Dt CRASH 8 vax
34*997634feSjoerg.Os
35a556b47dSwiz.Sh NAME
36a556b47dSwiz.Nm crash
37a556b47dSwiz.Nd UNIX system failures
38a556b47dSwiz.Sh DESCRIPTION
3961f28255ScgdThis section explains what happens when the system crashes
4061f28255Scgdand (very briefly) how to analyze crash dumps.
41a556b47dSwiz.Pp
4261f28255ScgdWhen the system crashes voluntarily it prints a message of the form
43a556b47dSwiz.Pp
44a556b47dSwiz.Dl panic: why i gave up the ghost
45a556b47dSwiz.Pp
4661f28255Scgdon the console, takes a dump on a mass storage peripheral,
4761f28255Scgdand then invokes an automatic reboot procedure as
4861f28255Scgddescribed in
49a556b47dSwiz.Xr reboot 8 .
5061f28255Scgd(If auto-reboot is disabled on the front panel of the machine the system
5161f28255Scgdwill simply halt at this point.)
5261f28255ScgdUnless some unexpected inconsistency is encountered in the state
5361f28255Scgdof the file systems due to hardware or software failure, the system
5461f28255Scgdwill then resume multi-user operations.
55a556b47dSwiz.Pp
5661f28255ScgdThe system has a large number of internal consistency checks; if one
5761f28255Scgdof these fails, then it will panic with a very short message indicating
5861f28255Scgdwhich one failed.
5961f28255ScgdIn many instances, this will be the name of the routine which detected
6061f28255Scgdthe error, or a two-word description of the inconsistency.
6161f28255ScgdA full understanding of most panic messages requires perusal of the
6261f28255Scgdsource code for the system.
63a556b47dSwiz.Pp
6461f28255ScgdThe most common cause of system failures is hardware failure, which
6561f28255Scgdcan reflect itself in different ways.  Here are the messages which
6661f28255Scgdare most likely, with some hints as to causes.
6761f28255ScgdLeft unstated in all cases is the possibility that hardware or software
6861f28255Scgderror produced the message in some unexpected way.
69a556b47dSwiz.Bl -tag -width 8n -compact
70a556b47dSwiz.It iinit
7161f28255ScgdThis cryptic panic message results from a failure to mount the root filesystem
7261f28255Scgdduring the bootstrap process.
7361f28255ScgdEither the root filesystem has been corrupted,
7461f28255Scgdor the system is attempting to use the wrong device as root filesystem.
7575e150fcSmouseUsually, an alternative copy of the system binary or an alternative root
7661f28255Scgdfilesystem can be used to bring up the system to investigate.
77a556b47dSwiz.It Can't exec /sbin/init
7861f28255ScgdThis is not a panic message, as reboots are likely to be futile.
7961f28255ScgdLate in the bootstrap procedure, the system was unable to locate
8061f28255Scgdand execute the initialization process,
81a556b47dSwiz.Xr init 8 .
8261f28255ScgdThe root filesystem is incorrect or has been corrupted, or the mode
8361f28255Scgdor type of /sbin/init forbids execution.
84a556b47dSwiz.It IO err in push
85a556b47dSwiz.It hard IO err in swap
8661f28255ScgdThe system encountered an error trying to write to the paging device
8761f28255Scgdor an error in reading critical information from a disk drive.
8861f28255ScgdThe offending disk should be fixed if it is broken or unreliable.
89a556b47dSwiz.It realloccg: bad optim
90a556b47dSwiz.It ialloc: dup alloc
91a556b47dSwiz.It alloccgblk: cyl groups corrupted
92a556b47dSwiz.It ialloccg: map corrupted
93a556b47dSwiz.It free: freeing free block
94a556b47dSwiz.It free: freeing free frag
95a556b47dSwiz.It ifree: freeing free inode
96a556b47dSwiz.It alloccg: map corrupted
9761f28255ScgdThese panic messages are among those that may be produced
9861f28255Scgdwhen filesystem inconsistencies are detected.
9961f28255ScgdThe problem generally results from a failure to repair damaged filesystems
10061f28255Scgdafter a crash, hardware failures, or other condition that should not
10161f28255Scgdnormally occur.
10261f28255ScgdA filesystem check will normally correct the problem.
103a556b47dSwiz.It timeout table overflow
10461f28255ScgdThis really shouldn't be a panic, but until the data structure
10561f28255Scgdinvolved is made to be extensible, running out of entries causes a crash.
10661f28255ScgdIf this happens, make the timeout table bigger.
107a556b47dSwiz.It KSP not valid
108a556b47dSwiz.It SBI fault
109a556b47dSwiz.It CHM? in kernel
11061f28255ScgdThese indicate either a serious bug in the system or, more often,
11161f28255Scgda glitch or failing hardware.
11261f28255ScgdIf SBI faults recur, check out the hardware or call
11361f28255Scgdfield service.  If the other faults recur, there is likely a bug somewhere
11461f28255Scgdin the system, although these can be caused by a flakey processor.
11561f28255ScgdRun processor microdiagnostics.
116a556b47dSwiz.It machine check %x: Em description
117a556b47dSwiz.It \0\0\0machine dependent machine-check information
11861f28255ScgdMachine checks are different on each type of CPU.
11961f28255ScgdMost of the internal processor registers are saved at the time of the fault
12061f28255Scgdand are printed on the console.
12161f28255ScgdFor most processors, there is one line that summarizes the type of machine
12261f28255Scgdcheck.
1237a538d88SwizOften, the nature of the problem is apparent from this message
12461f28255Scgdand/or the contents of key registers.
12561f28255ScgdThe VAX Hardware Handbook should be consulted,
12661f28255Scgdand, if necessary, your friendly field service people should be informed
12761f28255Scgdof the problem.
128a556b47dSwiz.It trap type %d, code=%x, pc=%x
12961f28255ScgdA unexpected trap has occurred within the system; the trap types are:
130a556b47dSwiz.Bd -literal -offset indent
13161f28255Scgd0	reserved addressing fault
13261f28255Scgd1	privileged instruction fault
13361f28255Scgd2	reserved operand fault
13461f28255Scgd3	bpt instruction fault
13561f28255Scgd4	xfc instruction fault
13661f28255Scgd5	system call trap
13761f28255Scgd6	arithmetic trap
13861f28255Scgd7	ast delivery trap
13961f28255Scgd8	segmentation fault
14061f28255Scgd9	protection fault
14161f28255Scgd10	trace trap
14261f28255Scgd11	compatibility mode fault
14361f28255Scgd12	page fault
14461f28255Scgd13	page table fault
145a556b47dSwiz.Ed
146a556b47dSwiz.Pp
14761f28255ScgdThe favorite trap types in system crashes are trap types 8 and 9,
14861f28255Scgdindicating
14961f28255Scgda wild reference.  The code is the referenced address, and the pc at the
15061f28255Scgdtime of the fault is printed.  These problems tend to be easy to track
15161f28255Scgddown if they are kernel bugs since the processor stops cold, but random
15261f28255Scgdflakiness seems to cause this sometimes.
15361f28255ScgdThe debugger can be used to locate the instruction and subroutine
15461f28255Scgdcorresponding to the PC value.
15561f28255ScgdIf that is insufficient to suggest the nature of the problem,
15661f28255Scgdmore detailed examination of the system status at the time of the trap
15761f28255Scgdusually can produce an explanation.
158a556b47dSwiz.It init died
15961f28255ScgdThe system initialization process has exited.  This is bad news, as no new
16061f28255Scgdusers will then be able to log in.  Rebooting is the only fix, so the
16161f28255Scgdsystem just does it right away.
162a556b47dSwiz.It out of mbufs: map full
16361f28255ScgdThe network has exhausted its private page map for network buffers.
16461f28255ScgdThis usually indicates that buffers are being lost, and rather than
16561f28255Scgdallow the system to slowly degrade, it reboots immediately.
16661f28255ScgdThe map may be made larger if necessary.
167a556b47dSwiz.El
168a556b47dSwiz.Pp
16961f28255ScgdThat completes the list of panic types you are likely to see.
170a556b47dSwiz.Pp
17161f28255ScgdWhen the system crashes it writes (or at least attempts to write)
17261f28255Scgdan image of memory into the back end of the dump device,
17361f28255Scgdusually the same as the primary swap
17461f28255Scgdarea.  After the system is rebooted, the program
175a556b47dSwiz.Xr savecore 8
17661f28255Scgdruns and preserves a copy of this core image and the current
17761f28255Scgdsystem in a specified directory for later perusal.  See
178a556b47dSwiz.Xr savecore 8
17961f28255Scgdfor details.
180a556b47dSwiz.Pp
18161f28255ScgdTo analyze a dump you should begin by running
182a556b47dSwiz.Ic adb
18361f28255Scgdwith the
184a556b47dSwiz.Fl k
18561f28255Scgdflag on the system load image and core dump.
18661f28255ScgdIf the core image is the result of a panic,
18761f28255Scgdthe panic message is printed.
18861f28255ScgdNormally the command
189a556b47dSwiz.Dq $c
19061f28255Scgdwill provide a stack trace from the point of
19161f28255Scgdthe crash and this will provide a clue as to
19261f28255Scgdwhat went wrong.
19361f28255ScgdFor more detail
19461f28255Scgdsee
195a556b47dSwiz.Dq Using ADB to Debug the UNIX Kernel .
196a556b47dSwiz.Sh SEE ALSO
197a556b47dSwiz.Xr gdb 1 ,
198a556b47dSwiz.Xr reboot 8
19961f28255Scgd.br
200a556b47dSwiz.Dq VAX 11/780 System Maintenance Guide
20161f28255Scgdand
202a556b47dSwiz.Dq VAX Hardware Handbook
20361f28255Scgdfor more information about machine checks.
20461f28255Scgd.br
205a556b47dSwiz.Dq Using ADB to Debug the UNIX Kernel
206