Merge from vendor branch LESS:
[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.22 2005/06/30 13:01:44 hmp Exp $
38 .\" $DragonFly: src/share/man/man8/crash.8,v 1.7 2007/10/16 08:49:38 swildner Exp $
39 .\"
40 .Dd February 2, 1996
41 .Dt CRASH 8
42 .Os
43 .Sh NAME
44 .Nm crash
45 .Nd
46 .Dx
47 system failures
48 .Sh DESCRIPTION
49 This section explains a bit about system crashes
50 and (very briefly) how to analyze crash dumps.
51 .Pp
52 When the system crashes voluntarily it prints a message of the form
53 .Bl -diag -offset indent
54 .It "panic: why i gave up the ghost"
55 .El
56 .Pp
57 on the console, and if dumps have been enabled (see
58 .Xr dumpon 8 ) ,
59 takes a dump on a mass storage peripheral,
60 and then invokes an automatic reboot procedure as
61 described in
62 .Xr reboot 8 .
63 Unless some unexpected inconsistency is encountered in the state
64 of the file systems due to hardware or software failure, the system
65 will then resume multi-user operations.
66 .Pp
67 The system has a large number of internal consistency checks; if one
68 of these fails, then it will panic with a very short message indicating
69 which one failed.
70 In many instances, this will be the name of the routine which detected
71 the error, or a two-word description of the inconsistency.
72 A full understanding of most panic messages requires perusal of the
73 source code for the system.
74 .Pp
75 The most common cause of system failures is hardware failure, which
76 can reflect itself in different ways.
77 Here are the messages which
78 are most likely, with some hints as to causes.
79 Left unstated in all cases is the possibility that hardware or software
80 error produced the message in some unexpected way.
81 .Pp
82 .Bl -diag -compact
83 .It "cannot mount root"
84 This panic message results from a failure to mount the root file system
85 during the bootstrap process.
86 Either the root file system has been corrupted,
87 or the system is attempting to use the wrong device as root file system.
88 Usually, an alternate copy of the system binary or an alternate root
89 file system can be used to bring up the system to investigate.
90 Most often this is done using the
91 .Dx
92 .Dq LiveCD .
93 .Pp
94 .It "init: not found"
95 This is not a panic message, as reboots are likely to be futile.
96 Late in the bootstrap procedure, the system was unable to locate
97 and execute the initialization process,
98 .Xr init 8 .
99 The root file system is incorrect or has been corrupted, or the mode
100 or type of
101 .Pa /sbin/init
102 forbids execution or is totally missing.
103 .Pp
104 .It "ffs_realloccg: bad optim"
105 .It "ffs_valloc: dup alloc"
106 .It "ffs_alloccgblk: cyl groups corrupted"
107 .It "ffs_alloccg: map corrupted"
108 .It "blkfree: freeing free block"
109 .It "blkfree: freeing free frag"
110 .It "ifree: freeing free inode"
111 These panic messages are among those that may be produced
112 when file system inconsistencies are detected.
113 The problem generally results from a failure to repair damaged file systems
114 after a crash, hardware failures, or other condition that should not
115 normally occur.
116 A file system check will normally correct the problem.
117 .Pp
118 .It "timeout table full"
119 This really should not be a panic, but until the data structure
120 involved is made to be extensible, running out of entries causes a crash.
121 If this happens, make the timeout table bigger.
122 .Pp
123 .It "init died (signal #, exit #)"
124 The system initialization process has exited with the specified
125 signal number and exit code.
126 This is bad news, as no new users will then be able to log in.
127 Rebooting is the only fix, so the
128 system just does it right away.
129 .El
130 .Pp
131 That completes the list of panic types you are likely to see.
132 .Pp
133 If the system has been configured to take crash dumps (see
134 .Xr dumpon 8 ) ,
135 then when it crashes it will write (or at least attempt to write)
136 an image of memory into the back end of the dump device,
137 usually the same as the primary swap
138 area.
139 After the system is rebooted, the program
140 .Xr savecore 8
141 runs and preserves a copy of this core image and the current
142 system in a specified directory for later perusal.
143 See
144 .Xr savecore 8
145 for details.
146 .Pp
147 To analyze a dump you should begin by running
148 .Xr kgdb 1
149 on the system load image and core dump.
150 If the core image is the result of a panic,
151 the panic message is printed.
152 For more details consult the chapter on kernel debugging in
153 the
154 .%B "FreeBSD Developers' Handbook"
155 .Pq Pa http://www.FreeBSD.org/ .
156 .Sh SEE ALSO
157 .Xr kgdb 1 ,
158 .Xr dumpon 8 ,
159 .Xr reboot 8 ,
160 .Xr savecore 8
161 .Sh HISTORY
162 The
163 .Nm
164 manual page first appeared in
165 .Fx 2.2 .