-
Bug
-
Resolution: Fixed
-
P4
-
11, 17, 21, 22
-
b03
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8317826 | 21.0.2 | Goetz Lindenmaier | P4 | Resolved | Fixed | b03 |
JDK-8316127 | 17.0.10-oracle | Vikrant Agarwal | P4 | Resolved | Fixed | b01 |
JDK-8317883 | 17.0.10 | Goetz Lindenmaier | P4 | Resolved | Fixed | b01 |
results in these tests failing:
compiler/jvmci/events/JvmciShutdownEventTest.java
compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java
compiler/jvmci/meta/StableFieldTest.java
Adding TEST_MODE=othervm makes the tests pass:
make LOG=info TEST="compiler/jvmci" TEST_OPTS=VM_OPTIONS="-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI" JTREG=TEST_MODE=othervm test
As far as I can tell, this has something to do with these tests using the ClassFileInstaller to install a JVMCI specific test class AND requiring JVMCI modules to be exported. For example:
/**
* @test
* @bug 8151664
* @requires vm.jvmci
* @library /test/lib /
* @modules java.base/jdk.internal.misc
* @modules java.base/jdk.internal.vm.annotation
* jdk.internal.vm.ci/jdk.vm.ci.hotspot
* jdk.internal.vm.ci/jdk.vm.ci.meta
* jdk.internal.vm.ci/jdk.vm.ci.runtime
*
* @compile StableFieldTest.java
* @run driver jdk.test.lib.helpers.ClassFileInstaller compiler.jvmci.meta.StableFieldTest
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler -Xbootclasspath/a:. compiler.jvmci.meta.StableFieldTest
*/
I think what happens is that `TEST_OPTS=VM_OPTIONS="-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI"` causes `@requires vm.jvmci` to evaluate to true but when ` jdk.test.lib.helpers.ClassFileInstaller compiler.jvmci.meta.StableFieldTest` is run, the java subprocess does not inherit the `-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI` options and so it fails when trying to export the JVMCI modules:
ACTION: driver -- Error. Can't init module exports: module not found: jdk.internal.vm.ci
REASON: User specified action: run driver jdk.test.lib.helpers.ClassFileInstaller compiler.jvmci.meta.StableFieldTest
TIME: 0.213 seconds
messages:
command: driver jdk.test.lib.helpers.ClassFileInstaller compiler.jvmci.meta.StableFieldTest
reason: User specified action: run driver jdk.test.lib.helpers.ClassFileInstaller compiler.jvmci.meta.StableFieldTest
started: Tue Jun 13 22:47:43 CEST 2023
Mode: agentvm
Agent id: 2
Additional exports to unnamed modules from @modules: java.base/jdk.internal.misc java.base/jdk.internal.vm.annotation jdk.internal.vm.ci/jdk.vm.ci.hotspot jdk.internal.vm.ci/jdk.vm.ci.meta jdk.internal.vm.ci/jdk.vm.ci.runtime
finished: Tue Jun 13 22:47:44 CEST 2023
elapsed time (seconds): 0.213
- backported by
-
JDK-8316127 some JVMCI tests fail when VM options include -XX:+EnableJVMCI
- Resolved
-
JDK-8317826 some JVMCI tests fail when VM options include -XX:+EnableJVMCI
- Resolved
-
JDK-8317883 some JVMCI tests fail when VM options include -XX:+EnableJVMCI
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/baf717ff
-
Commit openjdk/jdk21u/f73a8e13
-
Commit openjdk/jdk/8b4af46b
-
Review openjdk/jdk17u-dev/1855
-
Review openjdk/jdk21u/230
-
Review openjdk/jdk/14476