RFR: 8353496: SuspendResume1.java and SuspendResume2.java timeout after JDK-8319447

Chris Plummer cjplummer at openjdk.org
Wed May 14 03:32:50 UTC 2025


On Mon, 12 May 2025 23:19:58 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

> The tests `SuspendResume1`, `SuspendResume2` and `SuspendResumeAll` are intermittently failed with a timeout (deadlock). The tests run with `-Djdk.virtualThreadScheduler.maxPoolSize=1` so there is only one carrier. The short sleep in `TestedThread.run` isn't sufficient to make progress. This will happen if tasks pushed by the delayed scheduler are executing before the tasks for the newly started virtual thread. FJP won't search other submission queues until the queue it keeps going back to is empty or there is contention. These deadlocks can be made better reproducible if the sleep in `TestedThread.run` is made minimal (1 millisecond).
> The fix is to increase the sleep to 50 milliseconds and also to decrease the busy part of the busy loop.
> 
> Testing:
> - Mach5 test runs of the fixed tests

Looks good.

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

Marked as reviewed by cjplummer (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25194#pullrequestreview-2838614934


More information about the serviceability-dev mailing list