RFR: 8342295: compiler/jvmci/TestJVMCISavedProperties.java fails due to garbage in output
Tomáš Zezula
duke at openjdk.org
Fri Oct 18 13:59:23 UTC 2024
The `compiler/jvmci/TestJVMCISavedProperties` test fails due to overlapping output from the saved system properties. The initialization of `savedProperties` in `jdk.vm.ci.services.Services` is correctly synchronized, the issue suggests that two separate libjvmci compiler isolates are each printing their own set of saved properties.
In a successful test run, the `CompileBroker` thread aborts the VM before it completes initialization, displaying the error message `Cannot use JVMCI compiler: Value of jvmci.Compiler is “null”` (due to the `-Djvmci.Compiler=null` setting), and the message `DONE IN MAIN` is never printed. However, in the failed test output, the `DONE IN MAIN` message appears, indicating that the VM initialization completed and created the `JVMCIRuntime` instance. The `CompileBroker` thread might have concurrently initialized `JVMCIRuntime` in another isolate. Since each `JVMCIRuntime` initialization outputs system properties, this is likely the cause of the overlapping output.
The proposed solution is to use the `-XX:+EnableJVMCI` flag instead of `-XX:+UseJVMCICompiler`, to avoid this issue.
-------------
Commit messages:
- 8342295: compiler/jvmci/TestJVMCISavedProperties.java fails due to garbage in output
Changes: https://git.openjdk.org/jdk/pull/21583/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21583&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8342295
Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/21583.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/21583/head:pull/21583
PR: https://git.openjdk.org/jdk/pull/21583
More information about the hotspot-compiler-dev
mailing list