This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 59088 - Obtain memory results snapshot in case of OutOfMemory error
Summary: Obtain memory results snapshot in case of OutOfMemory error
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-20 03:47 UTC by _ gtzabari
Modified: 2009-04-14 18:27 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2005-05-20 03:47:44 UTC
We need to be able to grab a snapshot of the JVM state right before shutdown. In
my case I am getting a nasty OutOfMemoryException (or Error, I forget) which
causes a shutdown and I need to be able to view a snapshot at this point of
failure, including the stack-traces for all allocations. I don't think this is
currently possible for me to do.
Comment 1 iformanek 2005-06-03 13:44:18 UTC
This would indeed be useful, specifically in case when hunting for reasons for 
getting OOM errors. It will be hard to implement though, as large portion of 
the agent is in fact a Java code running inside the same VM. I'll keep this 
open for further research on whether there are ways to implement this.
Comment 2 _ gtzabari 2005-06-03 16:47:36 UTC
Well "in theory" if you reserve memory for OOME interception at initialization
time, when it actually occurs you should be fine (since you don't need to
allocate any more memory). This is likely not as easy as I just said but it's an
idea :)
Comment 3 Jiri Sedlacek 2007-03-23 15:07:15 UTC
Note that automatic dumping the heap and opening in HeapWalker on OOME is 
already available in Profiler 6.0 devbuilds.
Comment 4 _ gtzabari 2008-08-30 03:17:27 UTC
Guys, correct me if I'm wrong, but isn't this feature implemented in 6.1?
Comment 5 Tomas Hurka 2009-04-08 12:55:59 UTC
Milestone cleanup: future->next
Comment 6 Jiri Sedlacek 2009-04-14 18:27:07 UTC
A .hprof heap dump is generated if the profiled application crashes on OOME (customizable in Tools | Options |
Miscellaneous | Profiler). The heap dump doesn't contain allocation stack traces but it contains paths to GC roots so a
potential memory leak can be easily discovered.

Already fixed from my viewpoint, please reopen if you really need the allocation stack traces.