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.\" $DragonFly: src/share/man/man8/crash.8,v 1.3 2004/03/11 12:28:57 hmp Exp $ 39.\" 40.Dd February 2, 1996 41.Dt CRASH 8 42.Os 43.Sh NAME 44.Nm crash 45.Nd DragonFly system failures 46.Sh DESCRIPTION 47This section explains a bit about system crashes 48and (very briefly) how to analyze crash dumps. 49.Pp 50When the system crashes voluntarily it prints a message of the form 51.Bd -ragged -offset indent 52panic: why i gave up the ghost 53.Ed 54.Pp 55on the console, and if dumps have been enabled (see 56.Xr dumpon 8 ) , 57takes a dump on a mass storage peripheral, 58and then invokes an automatic reboot procedure as 59described in 60.Xr reboot 8 . 61Unless some unexpected inconsistency is encountered in the state 62of the file systems due to hardware or software failure, the system 63will then resume multi-user operations. 64.Pp 65The system has a large number of internal consistency checks; if one 66of these fails, then it will panic with a very short message indicating 67which one failed. 68In many instances, this will be the name of the routine which detected 69the error, or a two-word description of the inconsistency. 70A full understanding of most panic messages requires perusal of the 71source code for the system. 72.Pp 73The most common cause of system failures is hardware failure, which 74can reflect itself in different ways. Here are the messages which 75are most likely, with some hints as to causes. 76Left unstated in all cases is the possibility that hardware or software 77error produced the message in some unexpected way. 78.Pp 79.Bl -tag -width Ds -compact 80.It Sy "cannot mount root" 81This panic message results from a failure to mount the root filesystem 82during the bootstrap process. 83Either the root filesystem has been corrupted, 84or the system is attempting to use the wrong device as root filesystem. 85Usually, an alternate copy of the system binary or an alternate root 86filesystem can be used to bring up the system to investigate. Most often 87this is done by the use of the boot floppy you used to install the system, 88and then using the "fixit" floppy. 89.Pp 90.It Sy "init: not found" 91This is not a panic message, as reboots are likely to be futile. 92Late in the bootstrap procedure, the system was unable to locate 93and execute the initialization process, 94.Xr init 8 . 95The root filesystem is incorrect or has been corrupted, or the mode 96or type of 97.Pa /sbin/init 98forbids execution or is totally missing. 99.Pp 100.Pp 101.It Sy "ffs_realloccg: bad optim" 102.It Sy "ffs_valloc: dup alloc" 103.It Sy "ffs_alloccgblk: cyl groups corrupted" 104.It Sy "ffs_alloccg: map corrupted" 105.It Sy "blkfree: freeing free block" 106.It Sy "blkfree: freeing free frag" 107.It Sy "ifree: freeing free inode" 108These panic messages are among those that may be produced 109when filesystem inconsistencies are detected. 110The problem generally results from a failure to repair damaged filesystems 111after a crash, hardware failures, or other condition that should not 112normally occur. 113A filesystem check will normally correct the problem. 114.Pp 115.It Sy "timeout table full" 116This really shouldn't be a panic, but until the data structure 117involved is made to be extensible, running out of entries causes a crash. 118If this happens, make the timeout table bigger. 119.Pp 120.\" .It Sy "trap type %d, code = %x, v = %x" 121.\" An unexpected trap has occurred within the system; the trap types are: 122.\" .Bl -column xxxx -offset indent 123.\" 0 bus error 124.\" 1 address error 125.\" 2 illegal instruction 126.\" 3 divide by zero 127.\" .No 4\t Em chk No instruction 128.\" .No 5\t Em trapv No instruction 129.\" 6 privileged instruction 130.\" 7 trace trap 131.\" 8 MMU fault 132.\" 9 simulated software interrupt 133.\" 10 format error 134.\" 11 FP coprocessor fault 135.\" 12 coprocessor fault 136.\" 13 simulated AST 137.\" .El 138.\" .Pp 139.\" The favorite trap type in system crashes is trap type 8, 140.\" indicating a wild reference. 141.\" ``code'' (hex) is the concatenation of the 142.\" MMU 143.\" status register 144.\" (see <hp300/cpu.h>) 145.\" in the high 16 bits and the 68020 special status word 146.\" (see the 68020 manual, page 6-17) 147.\" in the low 16. 148.\" ``v'' (hex) is the virtual address which caused the fault. 149.\" Additionally, the kernel will dump about a screenful of semi-useful 150.\" information. 151.\" ``pid'' (decimal) is the process id of the process running at the 152.\" time of the exception. 153.\" Note that if we panic in an interrupt routine, 154.\" this process may not be related to the panic. 155.\" ``ps'' (hex) is the 68020 processor status register ``ps''. 156.\" ``pc'' (hex) is the value of the program counter saved 157.\" on the hardware exception frame. 158.\" It may 159.\" .Em not 160.\" be the PC of the instruction causing the fault. 161.\" ``sfc'' and ``dfc'' (hex) are the 68020 source/destination function codes. 162.\" They should always be one. 163.\" ``p0'' and ``p1'' are the 164.\" VAX-like 165.\" region registers. 166.\" They are of the form: 167.\" .Pp 168.\" .Bd -ragged -offset indent 169.\" <length> '@' <kernel VA> 170.\" .Ed 171.\" .Pp 172.\" where both are in hex. 173.\" Following these values are a dump of the processor registers (hex). 174.\" Finally, is a dump of the stack (user/kernel) at the time of the offense. 175.\" .Pp 176.It Sy "init died (signal #, exit #)" 177The system initialization process has exited with the specified signal number and exit code. This is bad news, as no new 178users will then be able to log in. Rebooting is the only fix, so the 179system just does it right away. 180.El 181.Pp 182That completes the list of panic types you are likely to see. 183.Pp 184If the system has been configured to take crash dumps (see 185.Xr dumpon 8 ) , 186then when it crashes it will write (or at least attempt 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 190.Xr savecore 8 191runs and preserves a copy of this core image and the current 192system in a specified directory for later perusal. See 193.Xr savecore 8 194for details. 195.Pp 196To analyze a dump you should begin by running 197.Xr gdb 1 198with the 199.Fl k 200flag on the system load image and core dump. 201If the core image is the result of a panic, 202the panic message is printed. 203For more details consult the chapter on kernel debugging in 204the 205.Fx 206Developers' Handbook 207.Pq Pa http://www.FreeBSD.org/ . 208.Sh SEE ALSO 209.Xr gdb 1 , 210.Xr dumpon 8 , 211.Xr reboot 8 , 212.Xr savecore 8 213.Sh HISTORY 214A 215.Nm 216man page first appeared in 217.Fx 2.2 . 218