RFR: 8311557: [JVMCI] deadlock with JVMTI thread suspension [v4]
David Holmes
dholmes at openjdk.org
Tue Aug 15 20:51:19 UTC 2023
On Thu, 10 Aug 2023 17:26:28 GMT, Tom Rodriguez <never at openjdk.org> wrote:
>> 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 incrementally with one additional commit since the last revision:
>
> LibJVMCICompilerThreadHidden should just be EXPERIMENTAL
src/hotspot/share/jvmci/jvmci_globals.hpp line 160:
> 158: "[default: ./" LIBJVMCI_ERR_FILE "] (%p replaced with pid)") \
> 159: \
> 160: product(bool, LibJVMCICompilerThreadHidden, true, EXPERIMENTAL, \
This sounds more like a diagnostic flag than experimental.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14799#discussion_r1295099859
More information about the hotspot-compiler-dev
mailing list