United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6765718 Indicate which thread throwing OOME when generating the heap dump at OOME
JDK-6765718 : Indicate which thread throwing OOME when generating the heap dump at OOME

Details
Type:
Enhancement
Submit Date:
2008-10-30
Status:
Closed
Updated Date:
2011-04-23
Project Name:
JDK
Resolved Date:
2011-04-23
Component:
hotspot
OS:
generic
Sub-Component:
svc
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs20 (b01)

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

Description
The hotspot built-in heap dumper now includes the stack traces in the heap dump (see 6306922).

The OutOfMemoryError is preallocated by the VM and the stack trace is filled after the heap dump.  So the stack traces have no indication which thread is throwing the OOME.  

It would be very helpful for diagnosing the OOME problem if tools like VisualVM can show which thread throwing OOME from the heap dump when +HeapDumpOnOutOfMemoryError is set.

                                    

Comments
EVALUATION

This looks like useful enhancement.
                                     
2010-09-11
SUGGESTED FIX

For suggested fix see webrev at:
http://cr.openjdk.java.net/~thurka/6765718/webrev.02
                                     
2010-09-11
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/30f67acf635d
                                     
2010-09-12
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/30f67acf635d
                                     
2010-09-15



Hardware and Software, Engineered to Work Together