Commit | Line | Data |
---|---|---|
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 | |
41 | This section explains a bit about system crashes | |
610c010b | 42 | and (very briefly) how to analyze crash dumps. |
b42074ab | 43 | .Pp |
610c010b | 44 | When the system crashes voluntarily it prints a message of the form |
b42074ab | 45 | .Bd -ragged -offset indent |
610c010b | 46 | panic: why i gave up the ghost |
b42074ab CL |
47 | .Ed |
48 | .Pp | |
610c010b KB |
49 | on the console, takes a dump on a mass storage peripheral, |
50 | and then invokes an automatic reboot procedure as | |
51 | described in | |
b42074ab | 52 | .Xr reboot 8 . |
610c010b KB |
53 | Unless some unexpected inconsistency is encountered in the state |
54 | of the file systems due to hardware or software failure, the system | |
55 | will then resume multi-user operations. | |
b42074ab | 56 | .Pp |
610c010b KB |
57 | The system has a large number of internal consistency checks; if one |
58 | of these fails, then it will panic with a very short message indicating | |
59 | which one failed. | |
60 | In many instances, this will be the name of the routine which detected | |
61 | the error, or a two-word description of the inconsistency. | |
62 | A full understanding of most panic messages requires perusal of the | |
63 | source code for the system. | |
b42074ab | 64 | .Pp |
610c010b KB |
65 | The most common cause of system failures is hardware failure, which |
66 | can reflect itself in different ways. Here are the messages which | |
67 | are most likely, with some hints as to causes. | |
68 | Left unstated in all cases is the possibility that hardware or software | |
69 | error produced the message in some unexpected way. | |
b42074ab CL |
70 | .Pp |
71 | .Bl -tag -width Ds -compact | |
72 | .It Sy iinit | |
610c010b KB |
73 | This cryptic panic message results from a failure to mount the root filesystem |
74 | during the bootstrap process. | |
75 | Either the root filesystem has been corrupted, | |
76 | or the system is attempting to use the wrong device as root filesystem. | |
77 | Usually, an alternate copy of the system binary or an alternate root | |
78 | filesystem can be used to bring up the system to investigate. | |
b42074ab CL |
79 | .Pp |
80 | .It Sy "Can't exec /etc/init" | |
610c010b KB |
81 | This is not a panic message, as reboots are likely to be futile. |
82 | Late in the bootstrap procedure, the system was unable to locate | |
83 | and execute the initialization process, | |
b42074ab | 84 | .Xr init 8 . |
610c010b | 85 | The root filesystem is incorrect or has been corrupted, or the mode |
b42074ab CL |
86 | or type of |
87 | .Pa /etc/init | |
88 | forbids execution. | |
89 | .Pp | |
90 | .It Sy "IO err in push" | |
91 | .It Sy "hard IO err in swap" | |
610c010b KB |
92 | The system encountered an error trying to write to the paging device |
93 | or an error in reading critical information from a disk drive. | |
94 | The 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 |
104 | These panic messages are among those that may be produced |
105 | when filesystem inconsistencies are detected. | |
106 | The problem generally results from a failure to repair damaged filesystems | |
107 | after a crash, hardware failures, or other condition that should not | |
108 | normally occur. | |
109 | A filesystem check will normally correct the problem. | |
b42074ab CL |
110 | .Pp |
111 | .It Sy "timeout table overflow" | |
610c010b KB |
112 | This really shouldn't be a panic, but until the data structure |
113 | involved is made to be extensible, running out of entries causes a crash. | |
114 | If this happens, make the timeout table bigger. | |
b42074ab CL |
115 | .Pp |
116 | .It Sy "trap type %d, code = %x, v = %x" | |
610c010b | 117 | An unexpected trap has occurred within the system; the trap types are: |
b42074ab | 118 | .Bl -column xxxx -offset indent |
610c010b KB |
119 | 0 bus error |
120 | 1 address error | |
121 | 2 illegal instruction | |
122 | 3 divide by zero | |
b42074ab CL |
123 | .No 4\t Em chk No instruction |
124 | .No 5\t Em trapv No instruction | |
610c010b KB |
125 | 6 privileged instruction |
126 | 7 trace trap | |
127 | 8 MMU fault | |
128 | 9 simulated software interrupt | |
129 | 10 format error | |
130 | 11 FP coprocessor fault | |
131 | 12 coprocessor fault | |
132 | 13 simulated AST | |
b42074ab CL |
133 | .El |
134 | .Pp | |
610c010b KB |
135 | The favorite trap type in system crashes is trap type 8, |
136 | indicating a wild reference. | |
b42074ab CL |
137 | ``code'' (hex) is the concatenation of the |
138 | MMU | |
139 | status register | |
610c010b KB |
140 | (see <hp300/cpu.h>) |
141 | in the high 16 bits and the 68020 special status word | |
142 | (see the 68020 manual, page 6-17) | |
143 | in the low 16. | |
144 | ``v'' (hex) is the virtual address which caused the fault. | |
145 | Additionally, the kernel will dump about a screenful of semi-useful | |
146 | information. | |
147 | ``pid'' (decimal) is the process id of the process running at the | |
148 | time of the exception. | |
149 | Note that if we panic in an interrupt routine, | |
150 | this 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 | |
153 | on the hardware exception frame. | |
154 | It may | |
b42074ab | 155 | .Em not |
610c010b KB |
156 | be the PC of the instruction causing the fault. |
157 | ``sfc'' and ``dfc'' (hex) are the 68020 source/destination function codes. | |
158 | They should always be one. | |
b42074ab CL |
159 | ``p0'' and ``p1'' are the |
160 | VAX-like | |
161 | region registers. | |
610c010b | 162 | They are of the form: |
b42074ab CL |
163 | .Pp |
164 | .Bd -ragged -offset indent | |
165 | <length> '@' <kernel VA> | |
166 | .Ed | |
167 | .Pp | |
610c010b KB |
168 | where both are in hex. |
169 | Following these values are a dump of the processor registers (hex). | |
170 | Finally, 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 |
173 | The system initialization process has exited. This is bad news, as no new |
174 | users will then be able to log in. Rebooting is the only fix, so the | |
175 | system just does it right away. | |
b42074ab CL |
176 | .Pp |
177 | .It Sy "out of mbufs: map full" | |
610c010b KB |
178 | The network has exhausted its private page map for network buffers. |
179 | This usually indicates that buffers are being lost, and rather than | |
180 | allow the system to slowly degrade, it reboots immediately. | |
181 | The map may be made larger if necessary. | |
b42074ab CL |
182 | .El |
183 | .Pp | |
610c010b | 184 | That completes the list of panic types you are likely to see. |
b42074ab | 185 | .Pp |
610c010b KB |
186 | When the system crashes it writes (or at least attempts to write) |
187 | an image of memory into the back end of the dump device, | |
188 | usually the same as the primary swap | |
189 | area. After the system is rebooted, the program | |
b42074ab | 190 | .Xr savecore 8 |
610c010b KB |
191 | runs and preserves a copy of this core image and the current |
192 | system in a specified directory for later perusal. See | |
b42074ab | 193 | .Xr savecore 8 |
610c010b | 194 | for details. |
b42074ab | 195 | .Pp |
610c010b | 196 | To analyze a dump you should begin by running |
b42074ab | 197 | .Xr adb 1 |
610c010b | 198 | with the |
b42074ab | 199 | .Fl k |
610c010b KB |
200 | flag on the system load image and core dump. |
201 | If the core image is the result of a panic, | |
202 | the panic message is printed. | |
203 | Normally the command | |
204 | ``$c'' | |
205 | will provide a stack trace from the point of | |
206 | the crash and this will provide a clue as to | |
207 | what went wrong. | |
b42074ab CL |
208 | For 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 | |
223 | A | |
224 | .Nm | |
225 | man page appeared in Version 6 AT&T UNIX. |