📄 crash.8
字号:
.\" Copyright (c) 1990, 1991, 1993.\" The Regents of the University of California. All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\" notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\" notice, this list of conditions and the following disclaimer in the.\" documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\" must display the following acknowledgement:.\" This product includes software developed by the University of.\" California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\" may be used to endorse or promote products derived from this software.\" without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\" @(#)crash.8 8.2 (Berkeley) 1/12/94.\".Dd January 12, 1994.Dt CRASH 8 hp300.Os.Sh NAME.Nm crash.Nd UNIX system failures.Sh DESCRIPTIONThis section explains a bit about system crashesand (very briefly) how to analyze crash dumps..PpWhen the system crashes voluntarily it prints a message of the form.Bd -ragged -offset indentpanic: why i gave up the ghost.Ed.Ppon the console, takes a dump on a mass storage peripheral,and then invokes an automatic reboot procedure asdescribed in.Xr reboot 8 .Unless some unexpected inconsistency is encountered in the stateof the file systems due to hardware or software failure, the systemwill then resume multi-user operations..PpThe system has a large number of internal consistency checks; if oneof these fails, then it will panic with a very short message indicatingwhich one failed.In many instances, this will be the name of the routine which detectedthe error, or a two-word description of the inconsistency.A full understanding of most panic messages requires perusal of thesource code for the system..PpThe most common cause of system failures is hardware failure, whichcan reflect itself in different ways. Here are the messages whichare most likely, with some hints as to causes.Left unstated in all cases is the possibility that hardware or softwareerror produced the message in some unexpected way..Pp.Bl -tag -width Ds -compact.It Sy iinitThis cryptic panic message results from a failure to mount the root filesystemduring the bootstrap process.Either the root filesystem has been corrupted,or the system is attempting to use the wrong device as root filesystem.Usually, an alternate copy of the system binary or an alternate rootfilesystem can be used to bring up the system to investigate..Pp.It Sy "Can't exec /etc/init"This is not a panic message, as reboots are likely to be futile.Late in the bootstrap procedure, the system was unable to locateand execute the initialization process,.Xr init 8 .The root filesystem is incorrect or has been corrupted, or the modeor type of.Pa /etc/initforbids execution..Pp.It Sy "IO err in push".It Sy "hard IO err in swap"The system encountered an error trying to write to the paging deviceor an error in reading critical information from a disk drive.The offending disk should be fixed if it is broken or unreliable..Pp.It Sy "realloccg: bad optim".It Sy "ialloc: dup alloc".It Sy "alloccgblk:cyl groups corrupted".It Sy "ialloccg: map corrupted".It Sy "free: freeing free block".It Sy "free: freeing free frag".It Sy "ifree: freeing free inode".It Sy "alloccg: map corrupted"These panic messages are among those that may be producedwhen filesystem inconsistencies are detected.The problem generally results from a failure to repair damaged filesystemsafter a crash, hardware failures, or other condition that should notnormally occur.A filesystem check will normally correct the problem..Pp.It Sy "timeout table overflow"This really shouldn't be a panic, but until the data structureinvolved is made to be extensible, running out of entries causes a crash.If this happens, make the timeout table bigger..Pp.It Sy "trap type %d, code = %x, v = %x"An unexpected trap has occurred within the system; the trap types are:.Bl -column xxxx -offset indent0 bus error1 address error2 illegal instruction3 divide by zero.No 4\t Em chk No instruction.No 5\t Em trapv No instruction6 privileged instruction7 trace trap8 MMU fault9 simulated software interrupt10 format error11 FP coprocessor fault12 coprocessor fault13 simulated AST.El.PpThe favorite trap type in system crashes is trap type 8,indicating a wild reference.``code'' (hex) is the concatenation of theMMUstatus register(see <hp300/cpu.h>)in the high 16 bits and the 68020 special status word(see the 68020 manual, page 6-17)in the low 16.``v'' (hex) is the virtual address which caused the fault.Additionally, the kernel will dump about a screenful of semi-usefulinformation.``pid'' (decimal) is the process id of the process running at thetime of the exception.Note that if we panic in an interrupt routine,this process may not be related to the panic.``ps'' (hex) is the 68020 processor status register ``ps''.``pc'' (hex) is the value of the program counter savedon the hardware exception frame.It may.Em notbe the PC of the instruction causing the fault.``sfc'' and ``dfc'' (hex) are the 68020 source/destination function codes.They should always be one.``p0'' and ``p1'' are theVAX-likeregion registers.They are of the form:.Pp.Bd -ragged -offset indent<length> '@' <kernel VA>.Ed.Ppwhere both are in hex.Following these values are a dump of the processor registers (hex).Finally, is a dump of the stack (user/kernel) at the time of the offense..Pp.It Sy "init died"The system initialization process has exited. This is bad news, as no newusers will then be able to log in. Rebooting is the only fix, so thesystem just does it right away..Pp.It Sy "out of mbufs: map full"The network has exhausted its private page map for network buffers.This usually indicates that buffers are being lost, and rather thanallow the system to slowly degrade, it reboots immediately.The map may be made larger if necessary..El.PpThat completes the list of panic types you are likely to see..PpWhen the system crashes it writes (or at least attempts to write)an image of memory into the back end of the dump device,usually the same as the primary swaparea. After the system is rebooted, the program.Xr savecore 8runs and preserves a copy of this core image and the currentsystem in a specified directory for later perusal. See.Xr savecore 8for details..PpTo analyze a dump you should begin by running.Xr adb 1with the .Fl kflag on the system load image and core dump.If the core image is the result of a panic,the panic message is printed.Normally the command``$c''will provide a stack trace from the point ofthe crash and this will provide a clue as towhat went wrong.For more details consult.%T "Using ADB to Debug the UNIX Kernel" ..Sh SEE ALSO.Xr adb 1 ,.Xr reboot 8.Rs.%T "MC68020 32-bit Microprocessor User's Manual".Re.Rs.%T "Using ADB to Debug the UNIX Kernel.Re.Rs.%T "4.3BSD for the HP300".Re.Sh HISTORYA.Nmman page appeared in Version 6 AT&T UNIX.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -