RFR: 8367313: CTW: Execute in AWT headless mode

Aleksey Shipilev shade at openjdk.org
Wed Sep 10 08:20:33 UTC 2025


I have been doing CTW parallelization improvements, and noticed that some of the AWT clinits run and initialize graphics stack. This is awkward for a few reasons:

 1. We might be running on headless environment and these clinits could fail, shrinking the CTW testing scope.
 2. There are dependencies in graphics stack initialization that break -- in one case in my parallelization tests, I have seen the VM crash due to uninitialized AWT lock, because randomized CTW runner managed to execute clinits in unusual order. Running in headless mode avoids dealing with that path altogether.

I think we should be running CTW tests in AWT headless mode to begin with. 

Additional testing:
 - [x] Linux x86_64 server fastdebug, `applications/ctw/modules`

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

Commit messages:
 - Fix

Changes: https://git.openjdk.org/jdk/pull/27187/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27187&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8367313
  Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/27187.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27187/head:pull/27187

PR: https://git.openjdk.org/jdk/pull/27187


More information about the hotspot-compiler-dev mailing list