home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V6 / usr / man / man8 / crash.8 < prev    next >
Encoding:
Text File  |  1975-06-26  |  8.6 KB  |  337 lines

  1. .th CRASH VIII 2/12/75
  2. .tr |
  3. .sh NAME
  4. crash \*- what to do when the system crashes
  5. .sh DESCRIPTION
  6. This section gives at least a few clues about how to proceed if the
  7. system crashes.
  8. It can't pretend to be complete.
  9. .s3
  10. .it "How to bring it back up.||"
  11. If the reason for the crash is not evident
  12. (see below for guidance on `evident')
  13. you may want to try to dump the system if you feel up to
  14. debugging.
  15. At the moment a dump can be taken only on magtape.
  16. With a tape mounted and ready,
  17. stop the machine, load address 44, and start.
  18. This should write a copy of all of core
  19. on the tape with an EOF mark.
  20. Caution:
  21. Any error is taken to mean the end of core has been reached.
  22. This means that you must be sure the ring is in,
  23. the tape is ready, and the tape is clean and new.
  24. If the dump fails, you can try again,
  25. but some of the registers will be lost.
  26. See below for what to do with the tape.
  27. .s3
  28. In restarting after a crash,
  29. always bring up the system single-user.
  30. This is accomplished by following the directions in
  31. .it "boot procedures"
  32. (VIII)
  33. as modified for your particular installation;
  34. a single-user system is indicated by having a particular value
  35. in the switches (173030 unless you've changed
  36. .it init)
  37. as the system starts executing.
  38. When it is running,
  39. perform a
  40. .it dcheck
  41. and
  42. .it icheck
  43. (VIII)
  44. on all file systems which could have been in use at the time
  45. of the crash.
  46. If any serious file system problems are found, they should be repaired.
  47. When you are satisfied with the health of your disks,
  48. check and set the date if necessary,
  49. then come up multi-user.
  50. This is most easily accomplished by changing the
  51. single-user value in the switches to something else,
  52. then logging out
  53. by typing an EOT.
  54. .s3
  55. To even boot \s8UNIX\s10 at all,
  56. three files (and the directories leading to them)
  57. must be intact.
  58. First,
  59. the initialization program
  60. .it /etc/init
  61. must be present and executable.
  62. If it is not,
  63. the CPU will loop in user mode at location 6.
  64. For
  65. .it init
  66. to work correctly,
  67. .it /dev/tty8
  68. and
  69. .it /bin/sh
  70. must be present.
  71. If either does not exist,
  72. the symptom is best described
  73. as thrashing.
  74. .it Init
  75. will go into a
  76. .it fork/exec
  77. loop trying to create a
  78. Shell with proper standard input and output.
  79. .s3
  80. If you cannot get the system to boot,
  81. a runnable system must be obtained from
  82. a backup medium.
  83. The root file system may then be doctored as
  84. a mounted file system as described below.
  85. If there are any problems with the root
  86. file system,
  87. it is probably prudent to go to a
  88. backup system to avoid working on a
  89. mounted file system.
  90. .s3
  91. .it "Repairing disks.||"
  92. The first rule to keep in mind is that an addled disk
  93. should be treated gently;
  94. it shouldn't be mounted unless necessary,
  95. and if it is very valuable yet
  96. in quite bad shape, perhaps it should be dumped before
  97. trying surgery on it.
  98. This is an area where experience and informed courage count for much.
  99. .s3
  100. The problems reported by
  101. .it icheck
  102. typically fall into two kinds.
  103. There can be
  104. problems with the free list:
  105. duplicates in the free list, or free blocks also in files.
  106. These can be cured easily with an
  107. .it "icheck \*-s."
  108. If the same block appears in more than one file
  109. or if a file contains bad blocks,
  110. the files should be deleted, and the free list reconstructed.
  111. The best way to delete such a file is to use
  112. .it clri
  113. (VIII),
  114. then remove its directory entries.
  115. If any of the affected files is really precious,
  116. you can try to copy it to another device
  117. first.
  118. .s3
  119. .it Dcheck
  120. may report files which
  121. have more directory entries than links.
  122. Such situations are potentially dangerous;
  123. .it clri
  124. discusses a special case of the problem.
  125. All the directory entries for the file should be removed.
  126. If on the other hand there are more links than directory entries,
  127. there is no danger of spreading infection, but merely some disk space
  128. that is lost for use.
  129. It is sufficient to copy the file (if it has any entries and is useful)
  130. then use
  131. .it clri
  132. on its inode and remove any directory
  133. entries that do exist.
  134. .s3
  135. Finally,
  136. there may be inodes reported by
  137. .it dcheck
  138. that have 0 links and 0 entries.
  139. These occur on the root device when the system is stopped
  140. with pipes open, and on other file systems when the system
  141. stops with files that have been deleted while still open.
  142. A
  143. .it clri
  144. will free the inode, and an
  145. .it "icheck -s"
  146. will
  147. recover any missing blocks.
  148. .s3
  149. .it "Why did it crash?||"
  150. UNIX types a message
  151. on the console typewriter when it voluntarily crashes.
  152. Here is the current list of such messages,
  153. with enough information to provide
  154. a hope at least of the remedy.
  155. The message has the form `panic: ...',
  156. possibly accompanied by other information.
  157. Left unstated in all cases
  158. is the possibility that hardware or software
  159. error produced the message in some unexpected way.
  160. .s3
  161. .lp +5 5
  162. blkdev
  163. .br
  164. The
  165. .it getblk
  166. routine was called with a nonexistent major device as argument.
  167. Definitely hardware or software error.
  168. .s3
  169. .lp +5 5
  170. devtab
  171. .br
  172. Null device table entry for the major device used as argument to
  173. .it getblk.
  174. Definitely hardware or software error.
  175. .s3
  176. .lp +5 5
  177. iinit
  178. .br
  179. An I/O error reading the super-block for the root file system
  180. during initialization.
  181. .s3
  182. .lp +5 5
  183. out of inodes
  184. .br
  185. A mounted file system has no more i-nodes when creating a file.
  186. Sorry, the device isn't available;
  187. the
  188. .it icheck
  189. should tell you.
  190. .s3
  191. .lp +5 5
  192. no fs
  193. .br
  194. A device has disappeared from the mounted-device table.
  195. Definitely hardware or software error.
  196. .s3
  197. .lp +5 5
  198. no imt
  199. .br
  200. Like `no fs', but produced elsewhere.
  201. .s3
  202. .lp +5 5
  203. no inodes
  204. .br
  205. The in-core inode table is full.
  206. Try increasing NINODE in param.h.
  207. Shouldn't be a panic, just a user error.
  208. .s3
  209. .lp +5 5
  210. no clock
  211. .br
  212. During initialization,
  213. neither the line nor programmable clock was found to exist.
  214. .s3
  215. .lp +5 5
  216. swap error
  217. .br
  218. An unrecoverable I/O error during a swap.
  219. Really shouldn't be a panic,
  220. but it is hard to fix.
  221. .s3
  222. .lp +5 5
  223. unlink \- iget
  224. .br
  225. The directory containing a file being deleted can't be found.
  226. Hardware or software.
  227. .s3
  228. .lp +5 5
  229. out of swap space
  230. .br
  231. A program needs to be swapped out, and there is no more swap space.
  232. It has to be increased.
  233. This really shouldn't be a panic, but there is no easy fix.
  234. .s3
  235. .lp +5 5
  236. out of text
  237. .br
  238. A pure procedure program is being executed,
  239. and the table for such things is full.
  240. This shouldn't be a panic.
  241. .s3
  242. .lp +5 5
  243. trap
  244. .br
  245. An unexpected trap has occurred within the system.
  246. This is accompanied by three numbers:
  247. a `ka6', which is the contents of the segmentation
  248. register for the area in which the system's stack is kept;
  249. `aps', which is the location where the hardware stored
  250. the program status word during the trap;
  251. and a `trap type' which encodes
  252. which trap occurred.
  253. The trap types are:
  254. .s3
  255. .lp +10 5
  256. 0    bus error
  257. .lp +10 5
  258. 1    illegal instruction
  259. .lp +10 5
  260. 2    BPT/trace
  261. .lp +10 5
  262. 3    IOT
  263. .lp +10 5
  264. 4    power fail
  265. .lp +10 5
  266. 5    EMT
  267. .lp +10 5
  268. 6    recursive system call (TRAP instruction)
  269. .lp +10 5
  270. 7    11/70 cache parity, or programmed interrupt
  271. .lp +10 5
  272. 10    floating point trap
  273. .lp +10 5
  274. 11    segmentation violation
  275. .i0
  276. .s3
  277. In some of these cases it is
  278. possible for octal 20 to be added into the trap type;
  279. this indicates that the processor was in user mode when the trap occurred.
  280. If you wish to examine the stack after such a trap,
  281. either dump the system, or use the console switches to examine core;
  282. the required address mapping is described below.
  283. .s3
  284. .it "Interpreting dumps.||"
  285. All file system problems
  286. should be taken care of before attempting to look at dumps.
  287. The dump should be read into the file
  288. .it /usr/sys/core;
  289. .it cp
  290. (I) will do.
  291. At this point, you should execute
  292. .it "ps \*-alxk"
  293. and
  294. .it who
  295. to print the process table and the users who were on
  296. at the time of the crash.
  297. You should dump (
  298. .it od
  299. (I))
  300. the first 30 bytes of
  301. .it /usr/sys/core.
  302. Starting at location 4,
  303. the registers R0, R1, R2, R3, R4, R5, SP
  304. and KDSA6 (KISA6 for 11/40s) are stored.
  305. If the dump had to be restarted,
  306. R0 will not be correct.
  307. Next, take the value of KA6 (location 22(8) in the dump)
  308. multiplied by 100(8) and dump 1000(8) bytes starting from there.
  309. This is the per-process data associated with the process running
  310. at the time of the crash.
  311. Relabel
  312. the addresses 140000 to 141776.
  313. R5 is C's frame or display pointer.
  314. Stored at (R5) is the old R5 pointing to the previous
  315. stack frame.
  316. At (R5)+2
  317. is the saved PC of the calling procedure.
  318. Trace
  319. this calling chain until
  320. you obtain an R5 value of 141756, which
  321. is where the user's R5 is stored.
  322. If the chain is broken,
  323. you have to look for a plausible
  324. R5, PC pair and continue from there.
  325. Each PC should be looked up in the system's name list
  326. using
  327. .it db
  328. (I) and its `:' command,
  329. to get a reverse calling order.
  330. In most cases this procedure will give
  331. an idea of what is wrong.
  332. A more complete discussion
  333. of system debugging is impossible here.
  334. .sh "SEE ALSO"
  335. clri, icheck, dcheck, boot procedures (VIII)
  336. .sh BUGS
  337.