RFR: 8335269: [Graal] occasional timeout in java/lang/StringBuffer/TestSynchronization.java with loom [v3]
Alan Bateman
alanb at openjdk.org
Tue Jul 9 16:48:34 UTC 2024
On Tue, 9 Jul 2024 16:38:13 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:
>> Please review the following simple fix. A pinned virtual thread calling Thread.yield() in a loop might never poll for safepoints if the compiler relies on a poll in native method Continuation.doYield while optimizing. This is a special native method that doesn't always poll for safepoints, and in particular it doesn't if the virtual thread is pinned due to owning monitors. Currently this scenario can be reproduced with the Graal compiler.
>>
>> I included a test which reproduces the issue with Graal (couldn't reproduce the issue with c2). The test times out without the fix and passes with it. I also run the patch through mach5 tiers1-3.
>>
>> Thanks,
>> Patricio
>
> Patricio Chilano Mateo has updated the pull request incrementally with one additional commit since the last revision:
>
> Rename test to ThreadPollOnYield.java
Marked as reviewed by alanb (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/20016#pullrequestreview-2166891851
More information about the hotspot-dev
mailing list