BSD 4_3_Net_2 release
[unix-history] / usr / src / share / man / man8 / man8.hp300 / crash.8
CommitLineData
b42074ab
CL
1.\" Copyright (c) 1990, 1991 Regents of the University of California.
2.\" All rights reserved.
610c010b 3.\"
af359dea
C
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\" must display the following acknowledgement:
14.\" This product includes software developed by the University of
15.\" California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\" may be used to endorse or promote products derived from this software
18.\" without specific prior written permission.
610c010b 19.\"
af359dea
C
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
b42074ab 31.\"
af359dea
C
32.\" @(#)crash.8 5.2 (Berkeley) 3/16/91
33.\"
34.Dd March 16, 1991
b42074ab
CL
35.Dt CRASH 8
36.Os
37.Sh NAME
38.Nm crash
39.Nd UNIX system failures
40.Sh DESCRIPTION
41This section explains a bit about system crashes
610c010b 42and (very briefly) how to analyze crash dumps.
b42074ab 43.Pp
610c010b 44When the system crashes voluntarily it prints a message of the form
b42074ab 45.Bd -ragged -offset indent
610c010b 46panic: why i gave up the ghost
b42074ab
CL
47.Ed
48.Pp
610c010b
KB
49on the console, takes a dump on a mass storage peripheral,
50and then invokes an automatic reboot procedure as
51described in
b42074ab 52.Xr reboot 8 .
610c010b
KB
53Unless some unexpected inconsistency is encountered in the state
54of the file systems due to hardware or software failure, the system
55will then resume multi-user operations.
b42074ab 56.Pp
610c010b
KB
57The system has a large number of internal consistency checks; if one
58of these fails, then it will panic with a very short message indicating
59which one failed.
60In many instances, this will be the name of the routine which detected
61the error, or a two-word description of the inconsistency.
62A full understanding of most panic messages requires perusal of the
63source code for the system.
b42074ab 64.Pp
610c010b
KB
65The most common cause of system failures is hardware failure, which
66can reflect itself in different ways. Here are the messages which
67are most likely, with some hints as to causes.
68Left unstated in all cases is the possibility that hardware or software
69error produced the message in some unexpected way.
b42074ab
CL
70.Pp
71.Bl -tag -width Ds -compact
72.It Sy iinit
610c010b
KB
73This cryptic panic message results from a failure to mount the root filesystem
74during the bootstrap process.
75Either the root filesystem has been corrupted,
76or the system is attempting to use the wrong device as root filesystem.
77Usually, an alternate copy of the system binary or an alternate root
78filesystem can be used to bring up the system to investigate.
b42074ab
CL
79.Pp
80.It Sy "Can't exec /etc/init"
610c010b
KB
81This is not a panic message, as reboots are likely to be futile.
82Late in the bootstrap procedure, the system was unable to locate
83and execute the initialization process,
b42074ab 84.Xr init 8 .
610c010b 85The root filesystem is incorrect or has been corrupted, or the mode
b42074ab
CL
86or type of
87.Pa /etc/init
88forbids execution.
89.Pp
90.It Sy "IO err in push"
91.It Sy "hard IO err in swap"
610c010b
KB
92The system encountered an error trying to write to the paging device
93or an error in reading critical information from a disk drive.
94The offending disk should be fixed if it is broken or unreliable.
b42074ab
CL
95.Pp
96.It Sy "realloccg: bad optim"
97.It Sy "ialloc: dup alloc"
98.It Sy "alloccgblk:cyl groups corrupted"
99.It Sy "ialloccg: map corrupted"
100.It Sy "free: freeing free block"
101.It Sy "free: freeing free frag"
102.It Sy "ifree: freeing free inode"
103.It Sy "alloccg: map corrupted"
610c010b
KB
104These panic messages are among those that may be produced
105when filesystem inconsistencies are detected.
106The problem generally results from a failure to repair damaged filesystems
107after a crash, hardware failures, or other condition that should not
108normally occur.
109A filesystem check will normally correct the problem.
b42074ab
CL
110.Pp
111.It Sy "timeout table overflow"
610c010b
KB
112This really shouldn't be a panic, but until the data structure
113involved is made to be extensible, running out of entries causes a crash.
114If this happens, make the timeout table bigger.
b42074ab
CL
115.Pp
116.It Sy "trap type %d, code = %x, v = %x"
610c010b 117An unexpected trap has occurred within the system; the trap types are:
b42074ab 118.Bl -column xxxx -offset indent
610c010b
KB
1190 bus error
1201 address error
1212 illegal instruction
1223 divide by zero
b42074ab
CL
123.No 4\t Em chk No instruction
124.No 5\t Em trapv No instruction
610c010b
KB
1256 privileged instruction
1267 trace trap
1278 MMU fault
1289 simulated software interrupt
12910 format error
13011 FP coprocessor fault
13112 coprocessor fault
13213 simulated AST
b42074ab
CL
133.El
134.Pp
610c010b
KB
135The favorite trap type in system crashes is trap type 8,
136indicating a wild reference.
b42074ab
CL
137``code'' (hex) is the concatenation of the
138MMU
139status register
610c010b
KB
140(see <hp300/cpu.h>)
141in the high 16 bits and the 68020 special status word
142(see the 68020 manual, page 6-17)
143in the low 16.
144``v'' (hex) is the virtual address which caused the fault.
145Additionally, the kernel will dump about a screenful of semi-useful
146information.
147``pid'' (decimal) is the process id of the process running at the
148time of the exception.
149Note that if we panic in an interrupt routine,
150this process may not be related to the panic.
151``ps'' (hex) is the 68020 processor status register ``ps''.
152``pc'' (hex) is the value of the program counter saved
153on the hardware exception frame.
154It may
b42074ab 155.Em not
610c010b
KB
156be the PC of the instruction causing the fault.
157``sfc'' and ``dfc'' (hex) are the 68020 source/destination function codes.
158They should always be one.
b42074ab
CL
159``p0'' and ``p1'' are the
160VAX-like
161region registers.
610c010b 162They are of the form:
b42074ab
CL
163.Pp
164.Bd -ragged -offset indent
165<length> '@' <kernel VA>
166.Ed
167.Pp
610c010b
KB
168where both are in hex.
169Following these values are a dump of the processor registers (hex).
170Finally, is a dump of the stack (user/kernel) at the time of the offense.
b42074ab
CL
171.Pp
172.It Sy "init died"
610c010b
KB
173The system initialization process has exited. This is bad news, as no new
174users will then be able to log in. Rebooting is the only fix, so the
175system just does it right away.
b42074ab
CL
176.Pp
177.It Sy "out of mbufs: map full"
610c010b
KB
178The network has exhausted its private page map for network buffers.
179This usually indicates that buffers are being lost, and rather than
180allow the system to slowly degrade, it reboots immediately.
181The map may be made larger if necessary.
b42074ab
CL
182.El
183.Pp
610c010b 184That completes the list of panic types you are likely to see.
b42074ab 185.Pp
610c010b
KB
186When the system crashes it writes (or at least attempts to write)
187an image of memory into the back end of the dump device,
188usually the same as the primary swap
189area. After the system is rebooted, the program
b42074ab 190.Xr savecore 8
610c010b
KB
191runs and preserves a copy of this core image and the current
192system in a specified directory for later perusal. See
b42074ab 193.Xr savecore 8
610c010b 194for details.
b42074ab 195.Pp
610c010b 196To analyze a dump you should begin by running
b42074ab 197.Xr adb 1
610c010b 198with the
b42074ab 199.Fl k
610c010b
KB
200flag on the system load image and core dump.
201If the core image is the result of a panic,
202the panic message is printed.
203Normally the command
204``$c''
205will provide a stack trace from the point of
206the crash and this will provide a clue as to
207what went wrong.
b42074ab
CL
208For more details consult
209.%T "Using ADB to Debug the UNIX Kernel" .
210.Sh SEE ALSO
211.Xr adb 1 ,
212.Xr reboot 8
213.Rs
214.%T "MC68020 32-bit Microprocessor User's Manual"
215.Re
216.Rs
217.%T "Using ADB to Debug the UNIX Kernel
218.Re
219.Rs
220.%T "4.3BSD for the HP300"
221.Re
222.Sh HISTORY
223A
224.Nm
225man page appeared in Version 6 AT&T UNIX.