jmap crashes with "can not get class data for"
Asked Answered
S

1

9

Had a Java core dump; running jmap with:

/usr/java/jdk1.8.0_25/bin/jmap -dump:format=b,file=dump.hprof  /usr/bin/java core.31497 

Gives the following exception:

Attaching to core core.31497 from executable /usr/bin/java, please wait...
...
JVM version is 25.25-b02
...
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:483)
    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/nio/ch/ThreadPool$$Lambda$10x00000007c0214428
    at sun.jvm.hotspot.utilities.Assert.that(Assert.java:32)
    at sun.jvm.hotspot.utilities.HeapHprofBinWriter.writeInstance(HeapHprofBinWriter.java:803)
    ...
    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)

Any thoughts?

Sungkiang answered 12/11, 2014 at 8:11 Comment(4)
Since lambda is new from Java 8, could it be a Java7/8 issue? Is /usr/bin/java pointing to a Java 7 distribution?Cuprite
I had thought that too. I was using a version of JDK8 explicitly: /some/path/to/software/jdk8/jmap and thought that perhaps because JDK7's java was in my $PATH that it was causing the issue. But I got all old java versions out of my path, and still experience the same bug reported by Gregory.Te
Discovered this. Looks relevant: bugs.openjdk.java.net/browse/JDK-8044416Te
@Magnilex: No, the java is the 8 one.Sungkiang
N
3

As @sethwm mentioned this is a known bug.

It has been fixed starting with Java 8 Update 60.

Noxious answered 16/9, 2015 at 17:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.