JDK-8292313 : 2 runtime/cds/appcds tests fail after JDK-8284313
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 20
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • OS: linux
  • CPU: aarch64
  • Submitted: 2022-08-13
  • Updated: 2022-08-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 20
20Unresolved
Related Reports
Relates :  
Sub Tasks
JDK-8292319 :  
Description
The following two tests failed in the JDK20 CI:

runtime/cds/appcds/WrongClasspath.java
runtime/cds/appcds/dynamicArchive/WrongTopClasspath.java

Here's a log file snippet from the WrongClasspath.java test:

----------System.err:(33/3347)----------
 stdout: [[0.026s][info][cds] trying to map /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S48914/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8fb45215-e524-463d-a4ae-7544184428ed/runs/0b0fc7f4-3df2-46dc-a866-e3ba115b8612/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_cds_relocation/scratch/3/appcds-22h57m52s186.jsa
[0.026s][info][cds] Opened archive /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S48914/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8fb45215-e524-463d-a4ae-7544184428ed/runs/0b0fc7f4-3df2-46dc-a866-e3ba115b8612/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_cds_relocation/scratch/3/appcds-22h57m52s186.jsa.
[0.026s][info][cds] Archive was created with UseCompressedOops = 1, UseCompressedClassPointers = 1
[0.026s][info][cds] Core region alignment: 65536
[0.026s][info][cds] Reserved archive_space_rs [0x0000000800000000 - 0x0000000801000000] (16777216) bytes
[0.026s][info][cds] Reserved class_space_rs   [0x0000000801000000 - 0x0000000841000000] (1073741824) bytes
[0.026s][info][cds] Mapped static  region #0 at base 0x0000000800000000 top 0x0000000800500000 (ReadWrite)
[0.026s][info][cds] Mapped static  region #1 at base 0x0000000800500000 top 0x0000000800cf0000 (ReadOnly)
[0.026s][info][cds] UseSharedSpaces: A jar file is not the one used while building the shared archive file: /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S48914/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8fb45215-e524-463d-a4ae-7544184428ed/runs/0b0fc7f4-3df2-46dc-a866-e3ba115b8612/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_cds_relocation/scratch/3/jar2.jar
[0.026s][warning][cds] /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S48914/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8fb45215-e524-463d-a4ae-7544184428ed/runs/0b0fc7f4-3df2-46dc-a866-e3ba115b8612/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_cds_relocation/scratch/3/jar2.jar timestamp has changed.
[0.026s][info   ][cds] Unmapping region #0 at base 0x0000000800000000 (ReadWrite)
[0.026s][info   ][cds] Unmapping region #1 at base 0x0000000800500000 (ReadOnly)
[0.026s][info   ][cds] ArchiveRelocationMode == 1: always map archive(s) at an alternative address
[0.026s][info   ][cds] UseSharedSpaces: Unable to map shared spaces
Hello World
];
 stderr: [java version "20-ea" 2023-03-21
Java(TM) SE Runtime Environment (fastdebug build 20-ea+11-617)
Java HotSpot(TM) 64-Bit Server VM (fastdebug build 20-ea+11-617, mixed mode)
]
 exitValue = 0

java.lang.RuntimeException: '.warning..cds. A jar file is not the one used while building the shared archive file:.*jar2.jar' missing from stdout/stderr
	at jdk.test.lib.process.OutputAnalyzer.shouldMatch(OutputAnalyzer.java:340)
	at WrongClasspath.main(WrongClasspath.java:78)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
	at java.base/java.lang.Thread.run(Thread.java:1589)

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

result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: '.warning..cds. A jar file is not the one used while building the shared archive file:.*jar2.jar' missing from stdout/stderr


Here's a log file snippet from the WrongTopClasspath.java test:

----------System.err:(74/7736)----------
 stdout: [[0.000s][info][cds] optimized module handling: disabled because bootclasspath was appended
[0.026s][info][cds] trying to map /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S48914/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8fb45215-e524-463d-a4ae-7544184428ed/runs/0b0fc7f4-3df2-46dc-a866-e3ba115b8612/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_cds_relocation/scratch/0/base-22h52m27s348.jsa
[0.026s][info][cds] Opened archive /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S48914/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8fb45215-e524-463d-a4ae-7544184428ed/runs/0b0fc7f4-3df2-46dc-a866-e3ba115b8612/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_cds_relocation/scratch/0/base-22h52m27s348.jsa.
[0.026s][info][cds] Archive was created with UseCompressedOops = 1, UseCompressedClassPointers = 1
[0.026s][info][cds] Core region alignment: 65536
[0.026s][info][cds] trying to map /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S48914/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8fb45215-e524-463d-a4ae-7544184428ed/runs/0b0fc7f4-3df2-46dc-a866-e3ba115b8612/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_cds_relocation/scratch/0/top-22h52m27s324.jsa
[0.026s][info][cds] Opened archive /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S48914/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8fb45215-e524-463d-a4ae-7544184428ed/runs/0b0fc7f4-3df2-46dc-a866-e3ba115b8612/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_cds_relocation/scratch/0/top-22h52m27s324.jsa.
[0.026s][info][cds] Archive was created with UseCompressedOops = 1, UseCompressedClassPointers = 1
[0.026s][info][cds] optimized module handling: disabled because archive was created without optimized module handling
[0.026s][info][cds] full module graph: disabled because archive was created without full module graph
[0.027s][info][cds] Reserved archive_space_rs [0x0000000800000000 - 0x0000000801000000] (16777216) bytes
[0.027s][info][cds] Reserved class_space_rs   [0x0000000801000000 - 0x0000000841000000] (1073741824) bytes
[0.027s][info][cds] Mapped static  region #0 at base 0x0000000800000000 top 0x0000000800500000 (ReadWrite)
[0.027s][info][cds] Mapped static  region #1 at base 0x0000000800500000 top 0x0000000800cf0000 (ReadOnly)
[0.027s][info][cds] Mapped dynamic region #0 at base 0x0000000800cf0000 top 0x0000000800d10000 (ReadWrite)
[0.027s][info][cds] Mapped dynamic region #1 at base 0x0000000800d10000 top 0x0000000800d30000 (ReadOnly)
[0.027s][info][cds] UseSharedSpaces: shared class paths mismatch (hint: enable -Xlog:class+path=info to diagnose the failure)
[0.027s][info][cds] Unmapping region #0 at base 0x0000000800cf0000 (ReadWrite)
[0.027s][info][cds] Unmapping region #1 at base 0x0000000800d10000 (ReadOnly)
[0.027s][info][cds] ArchiveRelocationMode == 1: always map archive(s) at an alternative address
[0.027s][info][cds] Unmapping region #0 at base 0x0000000800000000 (ReadWrite)
[0.027s][info][cds] Unmapping region #1 at base 0x0000000800500000 (ReadOnly)
[0.027s][info][cds] Try to map archive(s) at an alternative address
[0.027s][info][cds] Reserved archive_space_rs [0x0000000100000000 - 0x0000000101000000] (16777216) bytes
[0.027s][info][cds] Reserved class_space_rs   [0x0000000101000000 - 0x0000000141000000] (1073741824) bytes
[0.027s][info][cds] Mapped static  region #0 at base 0x0000000100000000 top 0x0000000100500000 (ReadWrite)
[0.027s][info][cds] Mapped static  region #1 at base 0x0000000100500000 top 0x0000000100cf0000 (ReadOnly)
[0.027s][info][cds] Mapped static  region #2 at base 0x0000fffce8020000 top 0x0000fffce8060000 (Bitmap)
[0.032s][info][cds] Mapped dynamic region #0 at base 0x0000000100cf0000 top 0x0000000100d10000 (ReadWrite)
[0.032s][info][cds] Mapped dynamic region #1 at base 0x0000000100d10000 top 0x0000000100d30000 (ReadOnly)
[0.032s][info][cds] Mapped dynamic region #2 at base 0x0000fffce8010000 top 0x0000fffce8020000 (Bitmap)
[0.032s][info][cds] UseSharedSpaces: shared class paths mismatch (hint: enable -Xlog:class+path=info to diagnose the failure)
[0.032s][info][cds] Unmapping region #0 at base 0x0000000100cf0000 (ReadWrite)
[0.032s][info][cds] Unmapping region #1 at base 0x0000000100d10000 (ReadOnly)
[0.032s][info][cds] Unmapping region #2 at base 0x0000fffce8010000 (Bitmap)
[0.032s][warning][cds,dynamic] Unable to use shared archive. The top archive failed to load: /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S48914/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/8fb45215-e524-463d-a4ae-7544184428ed/runs/0b0fc7f4-3df2-46dc-a866-e3ba115b8612/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_cds_relocation/scratch/0/top-22h52m27s324.jsa
[0.032s][info   ][cds        ] CDS archive was created with max heap size = 1984M, and the following configuration:
[0.032s][info   ][cds        ]     narrow_klass_base = 0x0000000100000000, narrow_klass_shift = 0
[0.032s][info   ][cds        ]     narrow_oop_mode = 0, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 0
[0.032s][info   ][cds        ]     heap range = [0x0000000084000000 - 0x0000000100000000]
[0.032s][info   ][cds        ] The current max heap size = 1984M, HeapRegion::GrainBytes = 1048576
[0.032s][info   ][cds        ]     narrow_klass_base = 0x0000000100000000, narrow_klass_shift = 0
[0.032s][info   ][cds        ]     narrow_oop_mode = 0, narrow_oop_base = 0x0000000000000000, narrow_oop_shift = 0
[0.033s][info   ][cds        ]     heap range = [0x0000000084000000 - 0x0000000100000000]
[0.033s][info   ][cds        ] CDS heap data relocation delta = 0 bytes
[0.033s][info   ][cds        ] Trying to map heap data: region[3] at 0x00000000fff00000, size =   589824 bytes
[0.033s][info   ][cds        ] Trying to map heap data: region[5] at 0x00000000ffe00000, size =   524288 bytes
[0.033s][info   ][cds        ] optimized module handling: disabled
[0.033s][info   ][cds        ] full module graph: disabled
[0.033s][info   ][cds        ] Unmapping region #2 at base 0x0000fffce8020000 (Bitmap)
GenericTestApp started. WhiteBox = jdk.test.whitebox.WhiteBox@5acf9800
cdsMemoryMappingFailed() = false
passed: assertShared:java.lang.Object
passed: assertNotShared:GenericTestApp
];
 stderr: []
 exitValue = 0

java.lang.RuntimeException: '[warning][cds] shared class paths mismatch (hint: enable -Xlog:class+path=info to diagnose the failure)' missing from stdout/stderr
	at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:221)
	at jdk.test.lib.cds.CDSTestUtils.checkMatches(CDSTestUtils.java:494)
	at jdk.test.lib.cds.CDSTestUtils$Result.assertNormalExit(CDSTestUtils.java:197)
	at WrongTopClasspath.test(WrongTopClasspath.java:85)
	at DynamicArchiveTestBase.runTest(DynamicArchiveTestBase.java:86)
	at WrongTopClasspath.main(WrongTopClasspath.java:44)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:1589)

JavaTest Message: Test threw exception: java.lang.RuntimeException: '[warning][cds] shared class paths mismatch (hint: enable -Xlog:class+path=info to diagnose the failure)' missing from stdout/stderr

These two tests failed in jdk-20+11-617-tier4 and there's only
one new changeset in that build-ID:

JDK-8284313 Improve warning messages when CDS archive fails to load
Comments
Neither of the two tests execute in Tier1. Both tests run once each in Tier2 on all five platforms and all of those runs passed. Both tests run in Tier3 7 times each spread across 3 platforms and all of those runs passed. runtime/cds/appcds/WrongClasspath.java runs 16 times in Tier4 and there were 4 failures, 1 on each of 4 platforms. runtime/cds/appcds/dynamicArchive/WrongTopClasspath.java runs 12 times in Tier4 and there were 4 failures, 1 on each of 4 platforms. All 8 of the failing runs seem to have these options: -XX:+UnlockDiagnosticVMOptions -XX:ArchiveRelocationMode=1 -Xlog:cds -XX:NativeMemoryTracking=detail
13-08-2022

This bug is generating 8 failures per Tier4, 4 for each test, which is rather noisy so I've bumped the priority to P3.
13-08-2022

[~ccheung] - Please take a look at these new Tier4 failures. I think they are caused by: JDK-8284313 Improve warning messages when CDS archive fails to load
13-08-2022