JDK-8232593 : [TESTBUG] runtime/cds/CheckDefaultArchiveFile.java fails when cds is disabled
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 14
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-10-18
  • Updated: 2021-02-03
  • Resolved: 2019-10-18
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 14
14 b20Fixed
Related Reports
Relates :  
Description
* Reproduce
-------------------------------------
bash configure --disable-cds ...
make test TEST="runtime/cds/CheckDefaultArchiveFile.java"
-------------------------------------

* Symptom
-------------------------------------
ACTION: main -- Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: default CDS archive supported, but classes.jsa path null
REASON: User specified action: run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI CheckDefaultArchiveFile
TIME:   0.276 seconds
messages:
command: main -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI CheckDefaultArchiveFile
reason: User specified action: run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI CheckDefaultArchiveFile
Mode: othervm [/othervm specified]
elapsed time (seconds): 0.276
configuration:
STDOUT:
classes.jsa location:null
STDERR:
java.lang.RuntimeException: default CDS archive supported, but classes.jsa path null
        at CheckDefaultArchiveFile.main(CheckDefaultArchiveFile.java:52)
        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:830)

JavaTest Message: Test threw exception: java.lang.RuntimeException: default CDS archive supported, but classes.jsa path null
JavaTest Message: shutting down test
-------------------------------------

* Fix
-------------------------------------
diff -r 9f5b92d5a1b2 test/hotspot/jtreg/runtime/cds/CheckDefaultArchiveFile.java
--- a/test/hotspot/jtreg/runtime/cds/CheckDefaultArchiveFile.java       Fri Oct 18 09:57:20 2019 +0900
+++ b/test/hotspot/jtreg/runtime/cds/CheckDefaultArchiveFile.java       Fri Oct 18 13:43:41 2019 +0800
@@ -25,6 +25,7 @@
  * @test Default CDS archive file
  * @summary JDK platforms/binaries do not support default CDS archive should
  *          not contain classes.jsa in the default location.
+ * @requires vm.cds
  * @library /test/lib
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
-------------------------------------
Comments
Test seems to be added by JDK-8202951.
03-02-2021

URL: https://hg.openjdk.java.net/jdk/jdk/rev/2e0462f4cf4e User: dholmes Date: 2019-10-18 07:35:56 +0000
18-10-2019

RFR: https://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2019-October/036451.html
18-10-2019