Integrated: 8353496: SuspendResume1.java and SuspendResume2.java timeout after JDK-8319447
Serguei Spitsyn
sspitsyn at openjdk.org
Wed May 14 08:25:20 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
This pull request has now been integrated.
Changeset: 265bc5f4
Author: Serguei Spitsyn <sspitsyn at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/265bc5f47d4c0b973fd09d3c2d7576f5f786399f
Stats: 12 lines in 3 files changed: 0 ins; 0 del; 12 mod
8353496: SuspendResume1.java and SuspendResume2.java timeout after JDK-8319447
Reviewed-by: cjplummer, alanb
-------------
PR: https://git.openjdk.org/jdk/pull/25194
More information about the serviceability-dev
mailing list