On Fri, 12 Dec 2025 04:20:11 GMT, David Holmes <[email protected]> wrote:

> As discussed in JBS the deadlock occurs when the call to 
> `ReleasePrimitiveArrayCritical` performs the transition from native to VM, 
> and in the process checks for special runtime exit conditions - which 
> includes the `obj_deopt_suspend` request. The simple solution is to define a 
> custom JNI ENTRY with custom `ThreadInVMfromNative` that elides the exit 
> check.
> 
> The change is limited to `ReleasePrimitiveArrayCritical` and 
> `ReleaseStringCritical`.
> 
> UPDATE: we are now employing a much simpler solution.
> 
> There is no regression test as this has only been seen in long running stress 
> tests.
> 
> Testing:
>    -tiers 1-6

This pull request has now been integrated.

Changeset: 25e87144
Author:    David Holmes <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/25e87144c20fcf5aca99b92f061a0051096c2605
Stats:     5 lines in 1 file changed: 4 ins; 0 del; 1 mod

8369515: Deadlock between JVMTI and JNI ReleasePrimitiveArrayCritical

Co-authored-by: Richard Reingruber <[email protected]>
Reviewed-by: rrich, fbredberg, pchilanomate

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

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

Reply via email to