"InternalError: Metadata does not appear to be polymorphic" When Running jmap, jstack, or jinfo

Solution Unverified - Updated -

Issue

  • We see the following error:

    # /usr/lib/jvm/java-1.8.0/bin/jmap -F -dump:format=b,file=dump.hprof 6503
    Attaching to process ID 6503, please wait...
    Debugger attached successfully.
    Server compiler detected.
    JVM version is 25.65-b01
    Dumping heap to java_pid6503_va1rprdljap7496.hprof ...
    Exception in thread "main" java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            ...
            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: java.lang.InternalError: Metadata does not appear to be polymorphic
            at sun.jvm.hotspot.types.basic.BasicTypeDataBase.findDynamicTypeForAddress(BasicTypeDataBase.java:278)
            at sun.jvm.hotspot.runtime.VirtualBaseConstructor.instantiateWrapperFor(VirtualBaseConstructor.java:102)
            at sun.jvm.hotspot.oops.Metadata.instantiateWrapperFor(Metadata.java:68)
            ...
            at sun.jvm.hotspot.tools.HeapDumper.main(HeapDumper.java:83)
            ... 6 more
    
  • Results in the following exception:

    java.lang.RuntimeException: Unable to deduce type of thread from address 0x00007fac6c4f3000 (expected type JavaThread, CompilerThread, ServiceThread, JvmtiAgentThread, or SurrogateLockerThread)
            at sun.jvm.hotspot.runtime.Threads.createJavaThreadWrapper(Threads.java:166)
            ...
            at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:45)
            ...
            at sun.jvm.hotspot.tools.JStack.main(JStack.java:92)
            ...
            at sun.tools.jstack.JStack.main(JStack.java:106)
    Caused by: sun.jvm.hotspot.types.WrongTypeException: No suitable match for type of address 0x00007fac6c4f3000
            at sun.jvm.hotspot.runtime.InstanceConstructor.newWrongTypeException(InstanceConstructor.java:62)
            at sun.jvm.hotspot.runtime.VirtualConstructor.instantiateWrapperFor(VirtualConstructor.java:80)
            at sun.jvm.hotspot.runtime.Threads.createJavaThreadWrapper(Threads.java:162)
            ... 17 more
    Exception in thread "main" java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            ...
            at sun.tools.jstack.JStack.main(JStack.java:106)
    Caused by: java.lang.InternalError: Metadata does not appear to be polymorphic
            at sun.jvm.hotspot.types.basic.BasicTypeDataBase.findDynamicTypeForAddress(BasicTypeDataBase.java:278)
            at sun.jvm.hotspot.runtime.VirtualBaseConstructor.instantiateWrapperFor(VirtualBaseConstructor.java:102)
            at sun.jvm.hotspot.oops.Metadata.instantiateWrapperFor(Metadata.java:68)
            ...
            at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:45)
            ...
            at sun.jvm.hotspot.tools.JStack.main(JStack.java:92)
            ... 6 more
    

Environment

  • Oracle JDK
    • 1.8
  • OpenJDK
    • 1.8
  • jinfo -sysprops
  • jmap
  • jstack -F -l

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In