On Wed, 11 Mar 2026 15:05:15 GMT, Patricio Chilano Mateo 
<[email protected]> wrote:

> Please review the following small test fix. Test `SuspendResume3.java` can 
> deadlock due to `worker2` being suspended at the wrong place. This can happen 
> because `arriveAndAwaitAdvance()` may trigger additional class 
> loading/initialization, during which the thread can also appear as `BLOCKED` 
> and thus be suspended later on. If the main thread tries to access those same 
> classes before resuming `worker2` then the test will deadlock. I added the 
> specific scenario involving class `ForkJoinPool` to JBS including the 
> relevant stack traces.
> 
> The fix is to use the management API to check `worker2` is blocked on the 
> specific monitor.
> 
> The issue was observed by running local tests. I was able to reproduce it 
> locally and verified the issue is now fixed.
> 
> Thanks,
> Patricio

Marked as reviewed by sspitsyn (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/30199#pullrequestreview-3934536279

Reply via email to