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