JDK-8279970 : two AppCDS tests fail after JDK-8261455
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 19
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2022-01-13
  • Updated: 2022-01-25
  • Resolved: 2022-01-19
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 19
19 masterFixed
Related Reports
Relates :  
Sub Tasks
JDK-8280045 :  
Description
The following two tests failed in the JDK19 CI:

runtime/cds/appcds/dynamicArchive/TestAutoCreateSharedArchive.java
runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java#custom-cl-zgc

Here's a snippet from the linux-x64 TestAutoCreateSharedArchive.java
log file:

java.lang.RuntimeException: 'AutoCreateSharedArchive is ignored because runtime.cds.appcds.dynamicArchive.TestAutoCreateSharedArchive.java-base.jsa is a static archive' missing from stdout/stderr 

	at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:221)
	at TestAutoCreateSharedArchive.lambda$testAutoCreateSharedArchive$4(TestAutoCreateSharedArchive.java:247)
	at jdk.test.lib.cds.CDSTestUtils$Result.assertNormalExit(CDSTestUtils.java:149)
	at TestAutoCreateSharedArchive.testAutoCreateSharedArchive(TestAutoCreateSharedArchive.java:244)
	at DynamicArchiveTestBase.runTest(DynamicArchiveTestBase.java:75)
	at TestAutoCreateSharedArchive.main(TestAutoCreateSharedArchive.java:130)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:833)

JavaTest Message: Test threw exception: java.lang.RuntimeException: 'AutoCreateSharedArchive is ignored because runtime.cds.appcds.dynamicArchive.TestAutoCreateSharedArchive.java-base.jsa is a static archive' missing from stdout/stderr 


Here's a snippet from the linux-x64
DynamicLoaderConstraintsTest.java#custom-cl-zgc log file:

----------System.err:(33/2406)----------
java version "19-ea" 2022-09-20
Java(TM) SE Runtime Environment (fastdebug build 19-ea+6-214)
Java HotSpot(TM) 64-Bit Server VM (fastdebug build 19-ea+6-214, mixed mode)
 stdout: [[0.123s][info][cds] trying to map /opt/mach5/mesos/work_dir/slaves/ff806ead-2cac-495d-9cbc-62116f99bf14-S13752/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/766f2d41-6c57-458f-83a4-a0fcbe3df250/runs/1b117e24-74fa-419d-a973-f824b3a332ab/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_runtime/scratch/2/tempBaseArchive-11h06m15s512.jsa
[0.123s][info][cds] Opened archive /opt/mach5/mesos/work_dir/slaves/ff806ead-2cac-495d-9cbc-62116f99bf14-S13752/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/766f2d41-6c57-458f-83a4-a0fcbe3df250/runs/1b117e24-74fa-419d-a973-f824b3a332ab/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_runtime/scratch/2/tempBaseArchive-11h06m15s512.jsa.
[0.123s][info][cds] Archive was created with UseCompressedOops = 1, UseCompressedClassPointers = 1
Error occurred during initialization of VM
Unable to use shared archive.
];
 stderr: [An error has occurred while processing the shared archive file.
Unable to use shared archive.
The saved state of UseCompressedOops and UseCompressedClassPointers is different from runtime, CDS will be disabled.
]
 exitValue = 1

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

	at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:489)
	at jdk.test.lib.cds.CDSTestUtils$Result.assertNormalExit(CDSTestUtils.java:198)
	at DynamicLoaderConstraintsTest.doTest(DynamicLoaderConstraintsTest.java:167)
	at DynamicLoaderConstraintsTest.doTest(DynamicLoaderConstraintsTest.java:116)
	at DynamicArchiveTestBase.runTest(DynamicArchiveTestBase.java:75)
	at DynamicLoaderConstraintsTest.main(DynamicLoaderConstraintsTest.java:108)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:833)

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

Since this looks like a regression introduced by:

JDK-8261455 Automatically generate the CDS archive if necessary

I'm starting this bug at P2.
Comments
Changeset: b0496b0d Author: Yumin Qi <minqi@openjdk.org> Date: 2022-01-19 03:21:19 +0000 URL: https://git.openjdk.java.net/jdk/commit/b0496b0df60cf19a0666f1f1c382f7bcd01e15bb
19-01-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7070 Date: 2022-01-13 21:14:05 +0000
13-01-2022

The failures seem to happen when -vmoptions:'-Xshare:off' is passed to jtreg when running these tests.
13-01-2022