?? crash.8
字號:
.TH CRASH 8 .SH NAMEcrash \- what to do when the system crashes.SH DESCRIPTIONThis section gives at least a few clues about how to proceed if thesystem crashes.It can't pretend to be complete..PP.I Bringing it back up.If the reason for the crash is not evident(see below for guidance on `evident')you may want to try to dump the system if you feel up todebugging.At the moment a dump can be taken only on magtape.With a tape mounted and ready,stop the machine, load address 44, and start.This should write a copy of all of coreon the tape with an EOF mark.Caution:Any error is taken to mean the end of core has been reached.This means that you must be sure the ring is in,the tape is ready, and the tape is clean and new.If the dump fails, you can try again,but some of the registers will be lost.See below for what to do with the tape..PPIn restarting after a crash,always bring up the system single-user.This is accomplished by following the directions in.IR boot (8)as modified for your particular installation;a single-user system is indicated by having a particular valuein the switches (173030 unless you've changed.I init)as the system starts executing.When it is running,perform a.I dcheckand.IR icheck (1)on all file systems which could have been in use at the timeof the crash.If any serious file system problems are found, they should be repaired.When you are satisfied with the health of your disks,check and set the date if necessary,then come up multi-user.This is most easily accomplished by changing thesingle-user value in the switches to something else,then logging outby typing an EOT..PPTo even boot \s8UNIX\s10 at all,three files (and the directories leading to them)must be intact.First,the initialization program.I /etc/initmust be present and executable.If it is not,the CPU will loop in user mode at location 6.For.I initto work correctly,.I /dev/tty8and.I /bin/shmust be present.If either does not exist,the symptom is best describedas thrashing..I Initwill go into a.I fork/execloop trying to create aShell with proper standard input and output..PPIf you cannot get the system to boot,a runnable system must be obtained froma backup medium.The root file system may then be doctored asa mounted file system as described below.If there are any problems with the rootfile system,it is probably prudent to go to abackup system to avoid working on amounted file system..PP.I Repairing disks.The first rule to keep in mind is that an addled diskshould be treated gently;it shouldn't be mounted unless necessary,and if it is very valuable yetin quite bad shape, perhaps it should be dumped beforetrying surgery on it.This is an area where experience and informed courage count for much..PPThe problems reported by.I ichecktypically fall into two kinds.There can beproblems with the free list:duplicates in the free list, or free blocks also in files.These can be cured easily with an.I icheck \-s.If the same block appears in more than one fileor if a file contains bad blocks,the files should be deleted, and the free list reconstructed.The best way to delete such a file is to use.IR clri (1),then remove its directory entries.If any of the affected files is really precious,you can try to copy it to another devicefirst..PP.I Dcheckmay report files whichhave more directory entries than links.Such situations are potentially dangerous;.I clridiscusses a special case of the problem.All the directory entries for the file should be removed.If on the other hand there are more links than directory entries,there is no danger of spreading infection, but merely some disk spacethat is lost for use.It is sufficient to copy the file (if it has any entries and is useful)then use.I clrion its inode and remove any directoryentries that do exist..PPFinally,there may be inodes reported by.I dcheckthat have 0 links and 0 entries.These occur on the root device when the system is stoppedwith pipes open, and on other file systems when the systemstops with files that have been deleted while still open.A.I clriwill free the inode, and an.I icheck -swillrecover any missing blocks..PP.I Why did it crash?UNIX types a messageon the console typewriter when it voluntarily crashes.Here is the current list of such messages,with enough information to providea hope at least of the remedy.The message has the form `panic: ...',possibly accompanied by other information.Left unstated in all casesis the possibility that hardware or softwareerror produced the message in some unexpected way..HP 5blkdev.brThe.I getblkroutine was called with a nonexistent major device as argument.Definitely hardware or software error..HP 5devtab.brNull device table entry for the major device used as argument to.I getblk.Definitely hardware or software error..HP 5iinit.brAn I/O error reading the super-block for the root file systemduring initialization..HP 5out of inodes.brA mounted file system has no more i-nodes when creating a file.Sorry, the device isn't available;the.I icheckshould tell you..HP 5no fs.brA device has disappeared from the mounted-device table.Definitely hardware or software error..HP 5no imt.brLike `no fs', but produced elsewhere..HP 5no inodes.brThe in-core inode table is full.Try increasing NINODE in param.h.Shouldn't be a panic, just a user error..HP 5no clock.brDuring initialization,neither the line nor programmable clock was found to exist..HP 5swap error.brAn unrecoverable I/O error during a swap.Really shouldn't be a panic,but it is hard to fix..HP 5unlink \- iget.brThe directory containing a file being deleted can't be found.Hardware or software..HP 5out of swap space.brA program needs to be swapped out, and there is no more swap space.It has to be increased.This really shouldn't be a panic, but there is no easy fix..HP 5out of text.brA pure procedure program is being executed,and the table for such things is full.This shouldn't be a panic..HP 5trap.brAn unexpected trap has occurred within the system.This is accompanied by three numbers:a `ka6', which is the contents of the segmentationregister for the area in which the system's stack is kept;`aps', which is the location where the hardware storedthe program status word during the trap;and a `trap type' which encodeswhich trap occurred.The trap types are:.TP 100bus error.br.ns.TP 101illegal instruction.br.ns.TP 102BPT/trace.br.ns.TP 103IOT.br.ns.TP 104power fail.br.ns.TP 105EMT.br.ns.TP 106recursive system call (TRAP instruction).br.ns.TP 10711/70 cache parity, or programmed interrupt.br.ns.TP 1010floating point trap.br.ns.TP 1011segmentation violation.PPIn some of these cases it ispossible for octal 20 to be added into the trap type;this indicates that the processor was in user mode when the trap occurred.If you wish to examine the stack after such a trap,either dump the system, or use the console switches to examine core;the required address mapping is described below..PP.I Interpreting dumps.All file system problemsshould be taken care of before attempting to look at dumps.The dump should be read into the file.I /usr/sys/core;.IR cp (1)will do.At this point, you should execute.I ps \-alxkand.I whoto print the process table and the users who were onat the time of the crash.You should dump (.IR od (1))the first 30 bytes of.I /usr/sys/core.Starting at location 4,the registers R0, R1, R2, R3, R4, R5, SPand KDSA6 (KISA6 for 11/40s) are stored.If the dump had to be restarted,R0 will not be correct.Next, take the value of KA6 (location 022(8) in the dump)multiplied by 0100(8) and dump 01000(8) bytes starting from there.This is the per-process data associated with the process runningat the time of the crash.Relabelthe addresses 140000 to 141776.R5 is C's frame or display pointer.Stored at (R5) is the old R5 pointing to the previousstack frame.At (R5)+2is the saved PC of the calling procedure.Tracethis calling chain untilyou obtain an R5 value of 141756, whichis where the user's R5 is stored.If the chain is broken,you have to look for a plausibleR5, PC pair and continue from there.Each PC should be looked up in the system's name listusing.IR adb (1)and its `:' command,to get a reverse calling order.In most cases this procedure will givean idea of what is wrong.A more complete discussionof system debugging is impossible here..SH SEE ALSOclri(1), icheck(1), dcheck(1), boot(8)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -