United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6966967 G1: SA: jmap and jstack do not work
JDK-6966967 : G1: SA: jmap and jstack do not work

Details
Type:
Bug
Submit Date:
2010-07-06
Status:
Closed
Updated Date:
2013-10-04
Project Name:
JDK
Resolved Date:
2011-09-26
Component:
hotspot
OS:
generic
Sub-Component:
svc
CPU:
generic
Priority:
P3
Resolution:
Duplicate
Affected Versions:
hs17,hs20,6u25-rev
Fixed Versions:
hs22

Related Reports
Duplicate:
Duplicate:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
jmap does not work with G1:

Exception in thread "main" java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at sun.tools.jmap.JMap.runTool(JMap.java:179)
	at sun.tools.jmap.JMap.main(JMap.java:110)
Caused by: sun.jvm.hotspot.utilities.AssertionFailure: Expecting GenCollectedHeap or ParallelScavengeHeap, but got sun.jvm.hotspot.gc_interface.CollectedHeap
	at sun.jvm.hotspot.utilities.Assert.that(Assert.java:32)
	at sun.jvm.hotspot.oops.ObjectHeap.collectLiveRegions(ObjectHeap.java:592)
	at sun.jvm.hotspot.oops.ObjectHeap.iterate(ObjectHeap.java:249)
	at sun.jvm.hotspot.utilities.AbstractHeapGraphWriter.write(AbstractHeapGraphWriter.java:51)
	at sun.jvm.hotspot.utilities.HeapHprofBinWriter.write(HeapHprofBinWriter.java:416)
	at sun.jvm.hotspot.tools.HeapDumper.run(HeapDumper.java:56)
	at sun.jvm.hotspot.tools.Tool.start(Tool.java:221)
	at sun.jvm.hotspot.tools.HeapDumper.main(HeapDumper.java:77)

                                    

Comments
EVALUATION

The failure happens in the sun.jvm.hotspot classes which are used by jmap and jstack. It looks as if there is some HotSpot functionality mirrored in Java classes in that package and it has not been extended to know about the G1CollectedHeap.

This is a serviceability issues, so I'm re-assigning the CR accordingly.
                                     
2010-08-20
EVALUATION

The SA work to get jmap to work with G1 is being done as part of 7059019.
The work to get a few inconsistencies in the jstat data resolved is being done as part of 7075646.
These two should resolved the issues reported in this CR. If they do, we'll close this as a dup.
                                     
2011-08-12
PUBLIC COMMENTS

We have resolved the jmap issues after adding Serviceability Agent support to G1, with:

1) 7059019: G1: add G1 support to the SA

Also, jstat now works with G1 since this CR was pushed:

2) 6946417: G1: Java VisualVM does not support G1 properly

and also after pushing some extra fixed for jstat:

3) 7075646: G1: fix inconsistencies in the monitoring data

1) and 3) with into hs23 but we are expecting them to be transplanted to hs22. I'm closing this as a dup (I arbitrarily chose the first CR to put in the Duplicate Of field).
                                     
2011-09-26



Hardware and Software, Engineered to Work Together