RFR: 8311557: [JVMCI] deadlock with JVMTI thread suspension [v2]

Tom Rodriguez never at openjdk.org
Wed Aug 9 20:57:29 UTC 2023


> Java based JVMCI compiler threads are more like normal Java threads so they aren't `hidden_from_external_view` like the native compilers.  This can leak to deadlocks if you use JVMTI to suspend all threads since this will block the compiler queue and can block execution if background compilation is disabled.  It's reasonable to treat libgraal threads like native threads in this regard.  Making jargraal threads hidden too would interfere with using profiling and debugging tool on them so I've left that alone but it might be worth changing the JVMTI suspend and resume functions to explicitly skip compiler threads as well.

Tom Rodriguez has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - Refactor logic and add LibJVMCICompilerThreadHidden
 - Merge branch 'master' into tkr-jvmci-hidden
 - 8311557: [JVMCI] deadlock with JVMTI thread suspension

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/14799/files
  - new: https://git.openjdk.org/jdk/pull/14799/files/59b9edab..1f08dcc4

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

  Stats: 74808 lines in 1968 files changed: 39246 ins; 26179 del; 9383 mod
  Patch: https://git.openjdk.org/jdk/pull/14799.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14799/head:pull/14799

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


More information about the hotspot-compiler-dev mailing list