RFR: 8342295: compiler/jvmci/TestJVMCISavedProperties.java fails due to garbage in output [v2]

Tomáš Zezula duke at openjdk.org
Fri Oct 18 17:03:28 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.

Tomáš Zezula has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:

  8342295: compiler/jvmci/TestJVMCISavedProperties.java fails due to garbage in output

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/21583/files
  - new: https://git.openjdk.org/jdk/pull/21583/files/306efecb..7849ba67

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=21583&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=21583&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 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