.th CRASH VIII .sh NAME crash - what to do if the system crashes .sh DESCRIPTION The description in the UNIX Programmer's Manual (crash(VIII)) contains much good advice. In addition, the following notes may be useful. If the system stops with a hang or loop, a .it panic should be forced, to cause a .it sync to update the file system. A `display console interrupt' can be generated by pressing FN\ 0; this causes UNIX to display the current PSW and stop with a "Panic: display console" message. To dump core to magtape: mount a tape on drive\ 0 and use the display panel to start execution at address x'66' (DTA 66 ADD RUN). This will write all of memory to the tape in 8k blocks, followed by a filemark. The tape may be copied to /usr/sys/core and examined with .it ddt. The command .dt .br ps aklx .br will use the /usr/sys/core file to display the status of all processes at the time of the crash. Some interesting locations in a dump are: .lp +10 8 uregs - contents of user register set .ti -8 eregs - contents of kernel register set .ti -8 ka6 - points to the kernel segmentation register for the current per-process data area, which contains the kernel-mode stack .ti -8 uisa0 - user-mode segmentation registers .ti -8 trbuff - a circular trace buffer (in Interdata `list' format): see below .i0 If the crash is reproducible, it may be useful to turn on debugging trace messages. The address x'404' (trmask) is a trace mask which may be patched with .it ddt or the display panel. Each `1' bit causes a different dynamic trace message to be logged on the console tty. Sorry, the messages are not documented yet: use .dt .br grep "trace(" /usr/sys/*.c .br for a quick list. In addition, even when .it trmask is\ 0, the first word of each trace message and a one-word associated value are always stored in the circular list .it trbuff. This list may be examined in a core dump for a record of the 64 most recent `system events' (interrupts, process switches, etc.). When repairing file systems with .it icheck -s, PLEASE dismount them first. If the root disk must be patched, a .it sync and reboot MUST be performed immediately afterwards.