Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8213140

Heap dump generation fails with WrongTypeException

XMLWordPrintable

    • svc
    • x86_64
    • linux

      ADDITIONAL SYSTEM INFORMATION :
      SLES 11.4, Linux <hostname> 3.0.101-108.35-default #1 SMP Mon Feb 19 21:13:08 UTC 2018 (251ec24) x86_64 x86_64 x86_64 GNU/Linux

      java version "1.8.0_141"
      Java(TM) SE Runtime Environment (build 1.8.0_141-b15)
      Java HotSpot(TM) 64-Bit Server VM (build 25.141-b15, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      jmap heap dump generation fails with:

      Attaching to process ID 97078, please wait...
      Debugger attached successfully.
      Server compiler detected.
      JVM version is 25.141-b15
      Dumping heap to <hprof-file> ...
      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:498)
              at sun.tools.jmap.JMap.runTool(JMap.java:201)
              at sun.tools.jmap.JMap.main(JMap.java:130)
      Caused by: sun.jvm.hotspot.types.WrongTypeException: No suitable match for type of address 0x00000005c11e4e40
              at sun.jvm.hotspot.runtime.InstanceConstructor.newWrongTypeException(InstanceConstructor.java:62)
              at sun.jvm.hotspot.runtime.VirtualBaseConstructor.instantiateWrapperFor(VirtualBaseConstructor.java:109)
              at sun.jvm.hotspot.oops.Metadata.instantiateWrapperFor(Metadata.java:68)
              at sun.jvm.hotspot.oops.Oop.getKlassForOopHandle(Oop.java:211)
              at sun.jvm.hotspot.oops.ObjectHeap.newOop(ObjectHeap.java:251)
              at sun.jvm.hotspot.oops.OopField.getValue(OopField.java:61)
              at sun.jvm.hotspot.oops.Klass.getJavaMirror(Klass.java:104)
              at sun.jvm.hotspot.utilities.HeapHprofBinWriter.writeInstance(HeapHprofBinWriter.java:799)
              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

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Try generating heap dump with jmap:

      > jmap -F -dump:format=b,file=<hprof-file> <pid>

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Heap dump gets generated
      ACTUAL -
      Heap dump doesn't get generated, exception stack trace is displayed.

      FREQUENCY : often


            fmatte Fairoz Matte
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: