home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / sysv386 / 12457 < prev    next >
Encoding:
Internet Message Format  |  1992-07-26  |  5.1 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!jvnc.net!mtcusa
  2. From: mtcusa@tigger.jvnc.net (Multilingual Technogies Corporation)
  3. Newsgroups: comp.unix.sysv386
  4. Subject: Re: How to debug a PANIC??
  5. Keywords: unix panic interactive debug
  6. Message-ID: <1992Jul26.151933.22053@tigger.jvnc.net>
  7. Date: 26 Jul 92 15:19:33 GMT
  8. References: <1992Jul13.184212.23816@wb3ffv.ampr.org> <1992Jul24.171942.13964@generics.ka.sub.org>
  9. Sender: news@tigger.jvnc.net (Zee News Genie)
  10. Organization: JvNCnet, Princeton University, NJ
  11. Lines: 115
  12. Originator: mtcusa@tigger.jvnc.net
  13. Nntp-Posting-Host: tigger.jvnc.net
  14.  
  15. In article <1992Jul24.171942.13964@generics.ka.sub.org> ihno@generics.ka.sub.org (Ihno Krumreich) writes:
  16. >howardl@wb3ffv.ampr.org (Howard Leadmon - WB3FFV) writes:
  17. >
  18. >
  19. >>    Hello,
  20. >
  21. >>I am currently running Interactive UNIX version 3.0, and things have 
  22. >>generally been great.  The other day I had my system PANIC and crash
  23. >>twice within a couple hours.  I know there is supposed to be a way I
  24. >>can find what program was dying by using the kernel debugger, but am
  25. >>not sure how to do this.  If somenody on the net would be so kind as
  26. >>to give me a little instruction it would be most appreicated...
  27. >
  28. >>Just for information sake, the panic was a Trap 0x0000000E
  29. >
  30. >Bad luck for you trap 0xe says nearly nothing.
  31. >
  32. >The way to find the programm probably killing the machine is the following:
  33. >
  34. >1) After the panic the system should report how many pages it has written to
  35. >   the swap space. If that does not happen, no need to read the rest.
  36. >
  37. >2) When the system comes up again, the system shouls ask you, whether you
  38. >   want to save the memory dump. Save it. (if you want to save to diskettes,
  39. >   prepare enough. If you have 16 Meg of memory you need 14 diskettes)
  40. >
  41. >3) If the system is up again load the dump to the disk with the command
  42. >   ldsysdump.
  43. >   Now you can use the command crash to analyse the dump.
  44. >   All commands, wich are discribed now are within crash
  45. >
  46. >   crash>  p    # gives you all processes that have been on the system
  47. >        # when it crashed. In the second coloum (ST) the state of
  48. >        # process is noted. s for sleeping, r for runnable and
  49. >        # p for on processor. So the one with the p should be
  50. >        # of intressed for you..
  51. >        # Have a look at the slot number (first coloum).
  52. >   crash> t #s  # t with the slot number gives you a trace of the called
  53. >        # procedures of the numbered process. This may give you an
  54. >        # idea which driver was the bad one.
  55. >
  56. >   crash uses the /unix for the symbols and other information. If you want
  57. >   to analyze the dump on a different machine, you always need the kernel from
  58. >   the machine which paniced. 
  59. >
  60. >   hope that helped you.
  61. >
  62. >Ihno
  63. >
  64. >=======================================================
  65. >
  66. >Ihno Krumreich     | Phone (49) 721 38 70 94
  67. >Generics Gmbh      | email: ihno@generics.ka.sub.org
  68. >Breite Strasse 24  | FAX   (49) 721 38 56 22
  69. >D-W7500 Karlsruhe  |
  70. >-- 
  71. >Ihno Krumreich     | Phone (49) 721 38 70 94
  72. >Generics Gmbh      | email: ihno@generics.ka.sub.org
  73. >Breite Strasse 24  | FAX   (49) 721 38 56 22
  74. >D-W7500 Karlsruhe  |
  75.  
  76. Using crash is good advice.  I have found that the floppy dump is a pain
  77. however.  Here's some other ways to find the offending system call:
  78.  
  79. SCO:
  80.     After the panic, when the system boots, it stops and asks you
  81.     if you want to go into maint. mode.  Type in the password and
  82.     go into single user.   You can then use crash directly on /dev/swap,
  83.     or do a 'dd' of /dev/swap to some (real big) file somewhere.
  84.  
  85.     You have to do this in single user because as soon as you go 
  86.     multi user the system may use swap, and 'crash' won't work any more.
  87.  
  88.     This method doesn't work on INTERACTIVE.  I can get into single
  89.     user by changing 'initdefault' to '1' in 'inittab', but once
  90.     there, crash gets confused by whatever is in /dev/swap.
  91.     I really don't need it because of the following, so haven't
  92.     really tried to figure out why it doesn't like /dev/swap.
  93.  
  94. INTERACTIVE:
  95.     First you have to get the kernel debugger going.  You can do that
  96.     by configuring it into the kernel using 'kconfig'.  Manual section
  97.     8 has some documentation on how to use this debugger.  Beside
  98.     being able to access addresses by symbol name, there is a single
  99.     stepping mode, and the ability to set break points on the running
  100.     kernel.   Single step mode is only useful if you speak assembler.
  101.  
  102.     You enter debug mode with CTRL-ALT-D and exit with CTRL-D.
  103.  
  104.     Once you get this in the kernel, activate the debugger (CTRL-ALT-D)
  105.     and set a break point on "panic".  You can do this as:
  106.  
  107.             panic .i brk0
  108.     
  109.     (I don't have the manual in front of me, so check this out.  I also
  110.      can't remember how to turn off a break point.   I think it's
  111.      something like:
  112.      
  113.             0 .i brk0
  114.  
  115.     If you can produce the panic on demand, do so.  If not, wait for
  116.     it.  When it happens, the system will dump all that register muck
  117.     and then break on the 'panic' kernel call.
  118.  
  119.     You can now type 't' for 'trace' and get a backtrace to the
  120.     system call that caused the panic.
  121.  
  122.     GURU question:  What is the meaning of all that stuff in
  123.             parentheses after the system calls.  It's not
  124.             function call arguments.   More to the point
  125.             where can I read for myself about it.
  126.  
  127. Hope this helps.
  128.  
  129. George Bogatko - mtcusa@tigger.jvnc.net
  130.