0

When trying to extract an hprof from a Windows minidump of a crashed JVM (-XX:+CreateMinidumpOnCrash) with jmap, I'm receiving an InvocationTargetException at about 31 MB of hprof file written (the mdmp file is 1700+ MB large):

jmap -dump:format=b,file=hs_err_pid15916.hprof "C:\Program Files\Java\jdk1.8.0_40\jre\bin\java.exe" hs_err_pid15916.mdmp
Attaching to core hs_err_pid15916.mdmp from executable C:\Program Files\Java\jdk1.8.0_40\jre\bin\java.exe, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.40-b25
Dumping heap to hs_err_pid15916.hprof ...
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at sun.tools.jmap.JMap.runTool(JMap.java:201)
        at sun.tools.jmap.JMap.main(JMap.java:130)
Caused by: sun.jvm.hotspot.utilities.AssertionFailure: can not get class data for sun/net/ExtendedOptionsImpl$$Lambda$10x00000001001afc2
        at sun.jvm.hotspot.utilities.Assert.that(Assert.java:32)
        at sun.jvm.hotspot.utilities.HeapHprofBinWriter.writeInstance(HeapHprofBinWriter.java:803)
        at sun.jvm.hotspot.utilities.AbstractHeapGraphWriter$1.doObj(AbstractHeapGraphWriter.java:95)
        at sun.jvm.hotspot.oops.ObjectHeap.iterateLiveRegions(ObjectHeap.java:353)
        at sun.jvm.hotspot.oops.ObjectHeap.iterate(ObjectHeap.java:171)
        at sun.jvm.hotspot.utilities.AbstractHeapGraphWriter.write(AbstractHeapGraphWriter.java:51)
        at sun.jvm.hotspot.utilities.HeapHprofBinWriter.write(HeapHprofBinWriter.java:433)
        at sun.jvm.hotspot.tools.HeapDumper.run(HeapDumper.java:62)
        at sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:260)
        at sun.jvm.hotspot.tools.Tool.start(Tool.java:223)
        at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
        at sun.jvm.hotspot.tools.HeapDumper.main(HeapDumper.java:83)
        ... 6 more

The exception is thrown regardless of the jmap variant used (1.8.0_40 Oracle JDK vs 1.8.0_40 Zulu).

How can I further diagnose this problem?

Update:

If I use a more recent jmap version (1.8.0_92 vs 1.8.0_40), can't pull out any hprof, either:

sun.jvm.hotspot.runtime.VMVersionMismatchException: Supported versions are 25.92-b14. Target VM is 25.40-b25
Bass
  • 4,977
  • 2
  • 36
  • 82
  • Look at the "caused by" line: `can not get class data for sun/net/ExtendedOptionsImpl`. Is your classpath correct? – Thomas Weller Jun 13 '16 at 21:03
  • Are you running a 64 bit or 32 bit version of Java? If it's a 32 bit version, try the 64 bit version. This might solve an internal OutOfMemoryException. 1700 MB en block is probably too much for 32 bit – Thomas Weller Jun 13 '16 at 21:04
  • @ThomasWeller **1** `sun.net.ExtendedOptionsImpl` is indeed missing from `rt.jar`, but this is a regular stock 1.8.0_40 version. **2** I'm using a 64-bit `jmap` and attaching to a 64-bit `java.exe` – Bass Jun 14 '16 at 10:38

0 Answers0