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

SA TestHeapDumpForInvokeDynamic.java fails when CDS archive is relocated

    XMLWordPrintable

Details

    • b20
    • x86_64
    • os_x

    Description

      The following test fails in the JDK15 CI:

      serviceability/sa/TestHeapDumpForInvokeDynamic.java

      Here's a snippet from the log file:

      ----------System.out:(34/3137)----------
      [0.032s][info][cds] Archive was created with UseCompressedOops = 1, UseCompressedClassPointers = 1
      [0.032s][debug][cds] Reserved archive_space_rs [0x0000000800000000 - 0x0000000800b50000] (11862016) bytes
      [0.032s][debug][cds] Reserved class_space_rs [0x0000000800b50000 - 0x0000000840b50000] (1073741824) bytes
      [0.032s][info ][cds] Mapped static region #0 at base 0x0000000800000000 top 0x0000000800007000 (MiscCode)
      [0.032s][info ][cds] Mapped static region #1 at base 0x0000000800007000 top 0x0000000800430000 (ReadWrite)
      [0.032s][info ][cds] Mapped static region #2 at base 0x0000000800430000 top 0x0000000800b50000 (ReadOnly)
      [0.032s][info ][cds] ArchiveRelocationMode == 1: always map archive(s) at an alternative address
      [0.032s][info ][cds] Unmapping region #0 at base 0x0000000800000000 (MiscCode)
      [0.032s][info ][cds] Unmapping region #1 at base 0x0000000800007000 (ReadWrite)
      [0.032s][info ][cds] Unmapping region #2 at base 0x0000000800430000 (ReadOnly)
      [0.032s][debug][cds] Released shared space (archive) 0x0000000800000000
      [0.032s][debug][cds] Released shared space (classes) 0x0000000800b50000
      [0.033s][info ][cds] Try to map archive(s) at an alternative address
      [0.033s][debug][cds] Reserved archive_space_rs [0x0000000125d31000 - 0x0000000126881000] (11862016) bytes
      [0.033s][debug][cds] Reserved class_space_rs [0x0000000126881000 - 0x0000000166881000] (1073741824) bytes
      [0.033s][info ][cds] Mapped static region #0 at base 0x0000000125d31000 top 0x0000000125d38000 (MiscCode)
      [0.033s][info ][cds] Mapped static region #1 at base 0x0000000125d38000 top 0x0000000126161000 (ReadWrite)
      [0.033s][info ][cds] Mapped static region #2 at base 0x0000000126161000 top 0x0000000126881000 (ReadOnly)
      [0.054s][info ][cds] CDS archive was created with max heap size = 128M, and the following configuration:
      [0.054s][info ][cds] narrow_klass_base = 0x0000000125d31000, narrow_klass_shift = 3
      [0.054s][info ][cds] narrow_oop_mode = 1, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 3
      [0.054s][info ][cds] The current max heap size = 1968M, HeapRegion::GrainBytes = 1048576
      [0.054s][info ][cds] narrow_klass_base = 0x0000000125d31000, narrow_klass_shift = 3
      [0.054s][info ][cds] narrow_oop_mode = 1, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 3
      [0.054s][info ][cds] CDS heap data relocation delta = 0 bytes
      [0.054s][info ][cds] Trying to map heap data: region[4] at 0x00000007bff00000, size = 495616 bytes
      [0.054s][info ][cds] Trying to map heap data: region[6] at 0x00000007bfe00000, size = 323584 bytes
      Adding 'sudo -E -n' to the command.
      sudo -E -n /scratch/mesos/jib-master/install/jdk-15+15-610/macosx-x64-debug.jdk/jdk-15/fastdebug/bin/jhsdb jmap --binaryheap --dumpfile lambdaHeapDump.bin --pid 22398
      [2020-03-18T11:28:43.466909Z] Gathering output for process 22400
      [2020-03-18T11:28:56.767855Z] Waiting for completion for process 22400
      [2020-03-18T11:28:56.768266Z] Waiting for completion finished for process 22400
      [2020-03-18T11:28:56.768760Z] Waiting for completion for process 22400
      [2020-03-18T11:28:56.769008Z] Waiting for completion finished for process 22400
      ----------System.err:(84/7050)----------
      Command line: ['/scratch/mesos/jib-master/install/jdk-15+15-610/macosx-x64-debug.jdk/jdk-15/fastdebug/bin/java' '-XX:+UsePerfData' '-Xmx512m' '-XX:MaxRAMPercentage=12' '-XX:+UnlockDiagnosticVMOptions' '-XX:ArchiveRelocationMode=1' '-Xlog:cds=debug' '-XX:NativeMemoryTracking=detail' '-cp' '/scratch/mesos/slaves/b0d836b1-c68c-4dbd-8b78-5085890ddd4c-S1007/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/6ce3a776-c1b9-4b1a-a330-a54d7d3229e3/runs/53405c3b-8592-404a-bea6-0629dbc288ef/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_cds_relocation/classes/0/serviceability/sa/TestHeapDumpForInvokeDynamic.d:/scratch/mesos/slaves/b0d836b1-c68c-4dbd-8b78-5085890ddd4c-S1007/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/6ce3a776-c1b9-4b1a-a330-a54d7d3229e3/runs/53405c3b-8592-404a-bea6-0629dbc288ef/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_cds_relocation/classes/0/test/lib' 'LingeredAppWithInvokeDynamic' '930ccb30-15a8-4f7d-86a2-4e8bfa618c18.lck' ]
       stdout: [Attaching to process ID 22398, please wait...
      Debugger attached successfully.
      Server compiler detected.
      JVM version is 15-ea+15-610
      dumpStack: not java Thread returning
      ];
       stderr: [java.lang.NullPointerException
      at jdk.hotspot.agent/sun.jvm.hotspot.memory.FileMapInfo$FileMapHeader.inCopiedVtableSpace(FileMapInfo.java:152)
      at jdk.hotspot.agent/sun.jvm.hotspot.memory.FileMapInfo.inCopiedVtableSpace(FileMapInfo.java:132)
      at jdk.hotspot.agent/sun.jvm.hotspot.types.basic.BasicTypeDataBase.findDynamicTypeForAddress(BasicTypeDataBase.java:302)
      at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VirtualBaseConstructor.instantiateWrapperFor(VirtualBaseConstructor.java:102)
      at jdk.hotspot.agent/sun.jvm.hotspot.oops.Metadata.instantiateWrapperFor(Metadata.java:74)
      at jdk.hotspot.agent/sun.jvm.hotspot.oops.java_lang_Class.asKlass(java_lang_Class.java:67)
      at jdk.hotspot.agent/sun.jvm.hotspot.utilities.HeapHprofBinWriter.writeClass(HeapHprofBinWriter.java:613)
      at jdk.hotspot.agent/sun.jvm.hotspot.utilities.AbstractHeapGraphWriter$1.doObj(AbstractHeapGraphWriter.java:82)
      at jdk.hotspot.agent/sun.jvm.hotspot.oops.ObjectHeap.iterateLiveRegions(ObjectHeap.java:258)
      at jdk.hotspot.agent/sun.jvm.hotspot.oops.ObjectHeap.iterate(ObjectHeap.java:101)
      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:321)
      at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:406)
      ]
       exitValue = 1

       LingeredApp stdout: [[0.032s][info][cds] Archive was created with UseCompressedOops = 1, UseCompressedClassPointers = 1
      [0.033s][debug][cds] Reserved archive_space_rs [0x0000000800000000 - 0x0000000800b50000] (11862016) bytes
      [0.033s][debug][cds] Reserved class_space_rs [0x0000000800b50000 - 0x0000000840b50000] (1073741824) bytes
      [0.033s][info ][cds] Mapped static region #0 at base 0x0000000800000000 top 0x0000000800007000 (MiscCode)
      [0.033s][info ][cds] Mapped static region #1 at base 0x0000000800007000 top 0x0000000800430000 (ReadWrite)
      [0.033s][info ][cds] Mapped static region #2 at base 0x0000000800430000 top 0x0000000800b50000 (ReadOnly)
      [0.033s][info ][cds] ArchiveRelocationMode == 1: always map archive(s) at an alternative address
      [0.033s][info ][cds] Unmapping region #0 at base 0x0000000800000000 (MiscCode)
      [0.033s][info ][cds] Unmapping region #1 at base 0x0000000800007000 (ReadWrite)
      [0.033s][info ][cds] Unmapping region #2 at base 0x0000000800430000 (ReadOnly)
      [0.033s][debug][cds] Released shared space (archive) 0x0000000800000000
      [0.033s][debug][cds] Released shared space (classes) 0x0000000800b50000
      [0.033s][info ][cds] Try to map archive(s) at an alternative address
      [0.033s][debug][cds] Reserved archive_space_rs [0x000000012330e000 - 0x0000000123e5e000] (11862016) bytes
      [0.033s][debug][cds] Reserved class_space_rs [0x0000000123e5e000 - 0x0000000163e5e000] (1073741824) bytes
      [0.033s][info ][cds] Mapped static region #0 at base 0x000000012330e000 top 0x0000000123315000 (MiscCode)
      [0.033s][info ][cds] Mapped static region #1 at base 0x0000000123315000 top 0x000000012373e000 (ReadWrite)
      [0.033s][info ][cds] Mapped static region #2 at base 0x000000012373e000 top 0x0000000123e5e000 (ReadOnly)
      [0.054s][info ][cds] CDS archive was created with max heap size = 128M, and the following configuration:
      [0.054s][info ][cds] narrow_klass_base = 0x000000012330e000, narrow_klass_shift = 3
      [0.054s][info ][cds] narrow_oop_mode = 1, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 3
      [0.054s][info ][cds] The current max heap size = 512M, HeapRegion::GrainBytes = 1048576
      [0.054s][info ][cds] narrow_klass_base = 0x000000012330e000, narrow_klass_shift = 3
      [0.054s][info ][cds] narrow_oop_mode = 1, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 3
      [0.054s][info ][cds] CDS heap data need to be relocated because
      [0.054s][info ][cds] the desired range 0x00000007bfe00000 - 0x00000007bff79000
      [0.054s][info ][cds] is outside of the heap 0x00000007e0000000 - 0x0000000800000000
      [0.054s][info ][cds] CDS heap data relocation delta = 1073741824 bytes
      [0.054s][info ][cds] Trying to map heap data: region[4] at 0x00000007fff00000, size = 495616 bytes
      [0.054s][info ][cds] Trying to map heap data: region[6] at 0x00000007ffe00000, size = 323584 bytes
      Hello
      Hello Hello
      false
      ];
       LingeredApp stderr: []
       LingeredApp exitValue = 0
      java.lang.RuntimeException: Expected to get exit value of [0]

      at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:455)
      at TestHeapDumpForInvokeDynamic.attachDumpAndVerify(TestHeapDumpForInvokeDynamic.java:106)
      at TestHeapDumpForInvokeDynamic.main(TestHeapDumpForInvokeDynamic.java:130)
      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:127)
      at java.base/java.lang.Thread.run(Thread.java:832)

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

      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Expected to get exit value of [0]
      ----------rerun:(42/6562)*----------

      This failure first popped up in jdk-15+15-610-tier4 which
      includes the fix for this bug: JDK-8238268

      Attachments

        Issue Links

          There are no Sub-Tasks for this issue.

          Activity

            People

              iklam Ioi Lam
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: