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