home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / sgi / misc / 263 < prev    next >
Encoding:
Internet Message Format  |  1993-01-12  |  3.1 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!howland.reston.ans.net!spool.mu.edu!olivea!sgigate!odin!bananapc.csd.sgi.com!ciemo
  2. From: ciemo@bananapc.csd.sgi.com (Dave Ciemiewicz)
  3. Newsgroups: comp.sys.sgi.misc
  4. Subject: Re: casevision debugger and the kill signal
  5. Message-ID: <1993Jan13.034733.11869@odin.corp.sgi.com>
  6. Date: 13 Jan 93 03:47:33 GMT
  7. References: <MBR.93Jan11085304@ponape.bellcore.com> <KITTU.93Jan11095743@shakti.shakti.wpd.sgi.com>
  8. Sender: news@odin.corp.sgi.com (Net News)
  9. Organization: Silicon Graphics, Customer Support Division
  10. Lines: 51
  11. Nntp-Posting-Host: bananapc.csd.sgi.com
  12.  
  13. In article <KITTU.93Jan11095743@shakti.shakti.wpd.sgi.com>, kittu@shakti.wpd.sgi.com (Krishna Kolluri) writes:
  14. |> >>>>> "Mark" == Mark Rosenstein <mbr@bellcore.com> writes:
  15. |> 
  16. |>     Mark> I have an application that is killed (I assume by the
  17. |>     Mark> OS). I wanted to try and figure out what was going on
  18. |>     Mark> using the casevision debugger.  I was unable to figure
  19. |>     Mark> out a way to catch the kill, and when the program
  20. |>     Mark> mysteriously dies, all I get in the debugger is process
  21. |>     Mark> xxxx: terminated.
  22. |> 
  23. |>     Mark> Is there a way to catch the kill signal with the
  24. |>     Mark> casevision debugger?  With other signals (like INT) when
  25. |>     Mark> set it in the signal panel, and then send the
  26. |>     Mark> application (attached process) an INT, it happily
  27. |>     Mark> catches it.  And I can look at the stack, etc, etc.
  28. |> 
  29. |>     Mark> When I set SIGKILL in the signal panel, and then send
  30. |>     Mark> kill -9 xxxx, the process just terminates. [This also
  31. |>     Mark> happens when the OS does it to me].
  32. |> 
  33. |>     Mark> Have I missed something?
  34. |> 
  35. |> Sounds like your application is leaking memory, and is running out of
  36. |> swap space. Check your console window if this is what is happening.
  37. |> 
  38. |> If so, you should link your application with libmalloc_cv.a and turn
  39. |> on malloc/free tracing in the Performance Panel. Then bring up Heap
  40. |> View and see where you are leaking memory. If you need help, let me
  41. |> know. 
  42. |> 
  43. |> kittu..
  44. |> 
  45.  
  46. It may seem non-sequiter (sp?) but here is a piece of information missing
  47. from Kittu's reply.  IRIX 4.0.X does not preallocate Virtual Memory pages
  48. for programs.  VM pages are allocated whenever a process reads or writes
  49. to a particular page of memory for the first time.  It is possible that
  50. the system will run out of virtual memory (real memory + swap) when a
  51. memory reference is made.  If this occurs, the process will be killed.
  52.  
  53. The most common causes for this are programs which have memory leaks so
  54. the size of the process keeps growing.  Some rather ill behaved programs
  55. keep allocating memory until they run out so they can decide how much
  56. memory they'll have to play with.  This strategy only works if the pages
  57. are preallocated.  Your IRIX kernel can be reconfigured by changing the
  58. value of availsmem_accounting to 1 in /usr/sysgen/master.d/kernel and
  59. then running /etc/autoconfig and then rebooting.
  60.  
  61. If the program is ill-behaved when it comes to it's use of dynamically
  62. allocated memory, Kittu's suggestion of doing malloc/free tracing may
  63. help point out the hogs in you program.
  64.