[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
On Mon, 26 Jul 2021 22:28:04 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> So for the resume log statement, once the target wakes up from wait() the _suspended flag could be set not necessarily because of a spurious wakeup but because another JT suspended the target right after the resume. But I can add a log statement in HandshakeState::resume() to track all resumes.
>> As for the suspend log statement I thought about not moving it but then I saw that we are already logging suspends in HandshakeState::suspend_with_handshake(), and since all these logging statements are done under _lock held there is already a sequence of suspend/resume events (if adding log in HandshakeState::resume()).
>> What do you think?
>
> I would not change any of the logging in the JDK17 fix unless there's a very
> good reason. We want the JDK17 fix to be as minimal as possible.
Sounds good, I added the log statement back into the loop.
-------------
PR: https://git.openjdk.java.net/jdk17/pull/283
More information about the hotspot-runtime-dev
mailing list