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

sun/tools/jhsdb/HeapDumpTestWithActiveProcess.java fails with sun.jvm.hotspot.types.WrongTypeException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 15
    • 15
    • hotspot
    • None
    • b20

      After fixing JDK-8230731, and removing HeapDumpTestWithActiveProcess.java from the problem list, it now fails with:

      sun.jvm.hotspot.types.WrongTypeException: No suitable match for type of address 0x0000000800000068
      at jdk.hotspot.agent/sun.jvm.hotspot.runtime.InstanceConstructor.newWrongTypeException(InstanceConstructor.java:62)
      at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VirtualBaseConstructor.instantiateWrapperFor(VirtualBaseConstructor.java:109)
      at jdk.hotspot.agent/sun.jvm.hotspot.oops.Metadata.instantiateWrapperFor(Metadata.java:74)
      at jdk.hotspot.agent/sun.jvm.hotspot.oops.Oop.getKlassForOopHandle(Oop.java:210)
      at jdk.hotspot.agent/sun.jvm.hotspot.oops.ObjectHeap.newOop(ObjectHeap.java:182)
      at jdk.hotspot.agent/sun.jvm.hotspot.oops.ObjectHeap.iterateLiveRegions(ObjectHeap.java:248)
      at jdk.hotspot.agent/sun.jvm.hotspot.oops.ObjectHeap.iterate(ObjectHeap.java:102)
      at jdk.hotspot.agent/sun.jvm.hotspot.utilities.AbstractHeapGraphWriter.write(AbstractHeapGraphWriter.java:51)
      at jdk.hotspot.agent/sun.jvm.hotspot.utilities.HeapHprofBinWriter.write(HeapHprofBinWriter.java:445)
      at jdk.hotspot.agent/sun.jvm.hotspot.tools.JMap.writeHeapHprofBin(JMap.java:182)
      at jdk.hotspot.agent/sun.jvm.hotspot.tools.JMap.run(JMap.java:97)
      at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:262)
      at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.start(Tool.java:225)
      at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
      at jdk.hotspot.agent/sun.jvm.hotspot.tools.JMap.main(JMap.java:176)
      at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runJMAP(SALauncher.java:331)
      at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:483)

      This is basically the same issue as JDK-8235220. There's just a different location that needs to deal with the WrongTypeException. It's in ObjectHeap.iterateLiveRegions(). A WrongTypeException handler is needed:

            catch (AddressException e) {
              // This is okay at the top of these regions
                }
            catch (UnknownOopException e) {
              // This is okay at the top of these regions
            }

            cjplummer Chris Plummer
            cjplummer Chris Plummer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: