JDK-8281678 : appcds/dynamicArchive/ArchiveConsistency.java fails after JDK-8279997
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 19
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-02-12
  • Updated: 2022-02-23
  • Resolved: 2022-02-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 19
19 b10Fixed
Related Reports
Relates :  
Relates :  
Description
JDK-8279997 added two new test cases and they are failing in tier 5 with release builds:

----------System.err:(30/1746)----------
java version "19-ea" 2022-09-20
Java(TM) SE Runtime Environment (fastdebug build 19-ea+10-544)
Java HotSpot(TM) 64-Bit Server VM (fastdebug build 19-ea+10-544, mixed mode)
 stdout: [Hello World
];
 stderr: [java version "19-ea" 2022-09-20
Java(TM) SE Runtime Environment (fastdebug build 19-ea+10-544)
Java HotSpot(TM) 64-Bit Server VM (fastdebug build 19-ea+10-544, mixed mode, sharing)
]
 exitValue = 0

java.lang.RuntimeException: 'warning: -XX:+AutoCreateSharedArchive is unsupported when base CDS archive is not loaded' missing from stdout/stderr 

	at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:221)
	at ArchiveConsistency.lambda$doTest$3(ArchiveConsistency.java:218)
	at jdk.test.lib.cds.CDSTestUtils$Result.assertNormalExit(CDSTestUtils.java:149)
	at ArchiveConsistency.doTest(ArchiveConsistency.java:217)
	at ArchiveConsistency.testCustomBase(ArchiveConsistency.java:61)
	at DynamicArchiveTestBase.runTest(DynamicArchiveTestBase.java:76)
	at ArchiveConsistency.main(ArchiveConsistency.java:53)
Comments
From the PR: The test case deletes `baseArchiveName` and then try to use the `-XX:+AutoCreateSharedArchive` flag, etc, to trigger a dynamic dump, which usually will fail (because the base archive doesn't exist) and print out the expected warning. However, when `-vmoption:-Xshare:off` is specified, `isUseSharedSpacesDisabled()` returns true, and the `run` method will internally recreated a base archive. This behavior is intended to make all the tests in the `dynamicArchive/` subdirectory work even if `-Xshare:off` is specified, but this would cause the two newly added test cases to fail.
14-02-2022

Changeset: 16f649b9 Author: Ioi Lam <iklam@openjdk.org> Date: 2022-02-14 18:53:50 +0000 URL: https://git.openjdk.java.net/jdk/commit/16f649b9c5b480d2a8499b1a92939cdf53ecc8dc
14-02-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7457 Date: 2022-02-14 07:38:36 +0000
14-02-2022

Reproduced with both debug and release build: $ jtreg -vmoptions:-Xshare:off test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/ArchiveConsistency.java .... Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: 'warning: -XX:+AutoCreateSharedArchive is unsupported when base CDS archive is not loaded' missing from stdout/stderr
14-02-2022