[jdk17] RFR: 8270085: Suspend during block transition may deadlock if lock held [v3]
Coleen Phillimore
coleenp at openjdk.java.net
Wed Jul 21 22:03:48 UTC 2021
On Wed, 21 Jul 2021 16:58:07 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:
>> We should document the order of events why this code is needed in a future RFE, because this comment doesn't really explain it to me and knowing where to put all these process_if_requested() and process() calls is far from obvious. I believe you and Robbin, but there are too many mysteries.
>
> I commented the line and run all the serviceability/ tests to look for issues. The only test that failed was SuspendWithCurrentThread.java due to the recent 8264663 change (https://github.com/openjdk/jdk/commit/b5c6351315eeec64fe9c06fc7c8719efa08dc8a6). The patch aimed to verify that the self-suspending thread actually suspended and didn't exited, but the check is too restrictive because it doesn't consider that the JT will still suspend when going back to Java. That check can be moved to Java to verify the suspender didn't return from suspendTestedThreads().
> Maybe I should do that in another RFE along with removing this code?
Yes, that would be good to clear up in a future RFE.
-------------
PR: https://git.openjdk.java.net/jdk17/pull/257
More information about the hotspot-runtime-dev
mailing list