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

regression after push of 8187403: "AssertionFailure: addr should be OopHandle"

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10
    • Component/s: core-svc
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b31

      Description

      The following serviceability/sa tests are failed:

        serviceability/sa/TestHeapDumpForInvokeDynamic.java
        serviceability/sa/TestHeapDumpForLargeArray.java
        serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java

      Stack traces are:
        serviceability/sa/TestHeapDumpForInvokeDynamic.java
        serviceability/sa/TestHeapDumpForLargeArray.java:

      [Exception in thread "main" sun.jvm.hotspot.utilities.AssertionFailure: addr should be OopHandle
      at jdk.hotspot.agent/sun.jvm.hotspot.utilities.Assert.that(Assert.java:32)
      at jdk.hotspot.agent/sun.jvm.hotspot.gc.g1.HeapRegion.(HeapRegion.java:81)
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
      at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VMObjectFactory.newObject(VMObjectFactory.java:58)
      at jdk.hotspot.agent/sun.jvm.hotspot.gc.g1.G1HeapRegionTable.at(G1HeapRegionTable.java:79)
      at jdk.hotspot.agent/sun.jvm.hotspot.gc.g1.G1HeapRegionTable.access$100(G1HeapRegionTable.java:44)
      at jdk.hotspot.agent/sun.jvm.hotspot.gc.g1.G1HeapRegionTable$HeapRegionIterator.positionToNext(G1HeapRegionTable.java:102)
      at jdk.hotspot.agent/sun.jvm.hotspot.gc.g1.G1HeapRegionTable$HeapRegionIterator.(G1HeapRegionTable.java:126)
      at jdk.hotspot.agent/sun.jvm.hotspot.gc.g1.G1HeapRegionTable.heapRegionIterator(G1HeapRegionTable.java:131)
      at jdk.hotspot.agent/sun.jvm.hotspot.gc.g1.HeapRegionManager.heapRegionIterator(HeapRegionManager.java:82)
      at jdk.hotspot.agent/sun.jvm.hotspot.gc.g1.G1CollectedHeap.heapRegionIterator(G1CollectedHeap.java:114)
      at jdk.hotspot.agent/sun.jvm.hotspot.gc.g1.G1CollectedHeap.heapRegionIterate(G1CollectedHeap.java:118)
      at jdk.hotspot.agent/sun.jvm.hotspot.oops.ObjectHeap.collectLiveRegions(ObjectHeap.java:440)
      at jdk.hotspot.agent/sun.jvm.hotspot.oops.ObjectHeap.iterate(ObjectHeap.java:172)
      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:440)
      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:260)
      at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.start(Tool.java:223)
      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:326)
      at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:455)
      ]
       exitValue = 1

      java.lang.RuntimeException: Expected to get exit value of [0]

      at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:380)
      at TestHeapDumpForInvokeDynamic.attachDumpAndVerify(TestHeapDumpForInvokeDynamic.java:106)
      at TestHeapDumpForInvokeDynamic.main(TestHeapDumpForInvokeDynamic.java:136)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
      at java.base/java.lang.Thread.run(Thread.java:844)

      JavaTest Message: Test threw exception: java.lang.RuntimeException: Expected to get exit value of [0]

        serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java:

      [Exception in thread "main" sun.jvm.hotspot.utilities.AssertionFailure: addr should be OopHandle
      at jdk.hotspot.agent/sun.jvm.hotspot.utilities.Assert.that(Assert.java:32)
      at jdk.hotspot.agent/sun.jvm.hotspot.gc.g1.HeapRegion.(HeapRegion.java:81)
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
      at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VMObjectFactory.newObject(VMObjectFactory.java:58)
      at jdk.hotspot.agent/sun.jvm.hotspot.gc.g1.G1HeapRegionTable.at(G1HeapRegionTable.java:79)
      at jdk.hotspot.agent/sun.jvm.hotspot.gc.g1.G1HeapRegionTable.access$100(G1HeapRegionTable.java:44)
      at jdk.hotspot.agent/sun.jvm.hotspot.gc.g1.G1HeapRegionTable$HeapRegionIterator.positionToNext(G1HeapRegionTable.java:102)
      at jdk.hotspot.agent/sun.jvm.hotspot.gc.g1.G1HeapRegionTable$HeapRegionIterator.(G1HeapRegionTable.java:126)
      at jdk.hotspot.agent/sun.jvm.hotspot.gc.g1.G1HeapRegionTable.heapRegionIterator(G1HeapRegionTable.java:131)
      at jdk.hotspot.agent/sun.jvm.hotspot.gc.g1.HeapRegionManager.heapRegionIterator(HeapRegionManager.java:82)
      at jdk.hotspot.agent/sun.jvm.hotspot.gc.g1.G1CollectedHeap.heapRegionIterator(G1CollectedHeap.java:114)
      at jdk.hotspot.agent/sun.jvm.hotspot.gc.g1.G1CollectedHeap.heapRegionIterate(G1CollectedHeap.java:118)
      at jdk.hotspot.agent/sun.jvm.hotspot.oops.ObjectHeap.collectLiveRegions(ObjectHeap.java:440)
      at jdk.hotspot.agent/sun.jvm.hotspot.oops.ObjectHeap.iterate(ObjectHeap.java:172)
      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:440)
      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:260)
      at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.start(Tool.java:223)
      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:326)
      at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:455)
      ]
       exitValue = 1

      java.lang.RuntimeException: Expected to get exit value of [0]

      at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:380)
      at JMapHProfLargeHeapTest.testHProfFileFormat(JMapHProfLargeHeapTest.java:114)
      at JMapHProfLargeHeapTest.main(JMapHProfLargeHeapTest.java:67)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:230)
      at java.base/java.lang.Thread.run(Thread.java:844)

      JavaTest Message: Test threw exception: java.lang.RuntimeException
      JavaTest Message: shutting down test

      result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Expected to get exit value of [0]


      The following fragment in the fix of 8187403 caused this regression:

      http://cr.openjdk.java.net/~ysuenaga/JDK-8187403/webrev.02/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/HeapRegion.java.udiff.html

           public HeapRegion(Address addr) {
               super(addr);
      +
      + if (Assert.ASSERTS_ENABLED) {
      + Assert.that(addr instanceof OopHandle, "addr should be OopHandle");
      + }
      +
      + Address typeAddr = addr.addOffsetToAsOopHandle(typeFieldOffset);
      + type = (HeapRegionType)VMObjectFactory.newObject(HeapRegionType.class, typeAddr);
           }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ysuenaga Yasumasa Suenaga
                Reporter:
                sspitsyn Serguei Spitsyn
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: