[jdk17] Integrated: 8271251: JavaThread::java_suspend() fails with "fatal error: Illegal threadstate encountered: 6"
Patricio Chilano Mateo
pchilanomate at openjdk.java.net
Wed Jul 28 17:03:39 UTC 2021
On Mon, 26 Jul 2021 18:23:39 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:
> Hi,
>
> Please review this small patch. When self-suspending, a JavaThread might reach SafepointSynchronize::block() with a state of _thread_in_vm which is not listed as a valid state for safepoint polling. There are a couple of simple ways to fix this. As suggested by @dholmes-ora we can avoid the handshake machinery altogether and directly self-suspend. Since this issue is intermittent and in tier7 which I didn't run as many times as other lower tiers it escaped my testing of 8270085.
>
> Testing in mach5 tiers1-7. I also reproduced the test failures locally and verified that now both hs202t002.java and ThreadSuspendSelf.java are passing.
>
> Thanks,
> Patricio
This pull request has now been integrated.
Changeset: 6878b05f
Author: Patricio Chilano Mateo <pchilanomate at openjdk.org>
URL: https://git.openjdk.java.net/jdk17/commit/6878b05f8fbc7bd72e79ec29a868008dde2321c6
Stats: 24 lines in 1 file changed: 13 ins; 6 del; 5 mod
8271251: JavaThread::java_suspend() fails with "fatal error: Illegal threadstate encountered: 6"
Reviewed-by: dholmes, dcubed
-------------
PR: https://git.openjdk.java.net/jdk17/pull/283
More information about the hotspot-runtime-dev
mailing list