[jdk17] RFR: 8271251: JavaThread::java_suspend() fails with "fatal error: Illegal threadstate encountered: 6" [v3]
Patricio Chilano Mateo
pchilanomate at openjdk.java.net
Mon Jul 26 22:40:53 UTC 2021
> 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
Patricio Chilano Mateo has updated the pull request incrementally with one additional commit since the last revision:
move log statement back inside loop
-------------
Changes:
- all: https://git.openjdk.java.net/jdk17/pull/283/files
- new: https://git.openjdk.java.net/jdk17/pull/283/files/4ecb736e..a73c0094
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk17&pr=283&range=02
- incr: https://webrevs.openjdk.java.net/?repo=jdk17&pr=283&range=01-02
Stats: 2 lines in 1 file changed: 1 ins; 1 del; 0 mod
Patch: https://git.openjdk.java.net/jdk17/pull/283.diff
Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/283/head:pull/283
PR: https://git.openjdk.java.net/jdk17/pull/283
More information about the hotspot-runtime-dev
mailing list