RFR: 8335269: [Graal] occasional timeout in java/lang/StringBuffer/TestSynchronization.java with loom [v2]

Patricio Chilano Mateo pchilanomate at openjdk.org
Mon Jul 8 20:08:05 UTC 2024


On Mon, 8 Jul 2024 08:25:47 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Patricio Chilano Mateo has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   use VThreadPinner
>
> test/jdk/java/lang/Thread/virtual/ThreadYield.java line 29:
> 
>> 27:  * @summary Test that Thread.yield loop polls for safepoints
>> 28:  * @requires vm.continuations
>> 29:  * @modules java.base/java.lang:+open
> 
> I assume the `@modules` isn't needed as this test doesn't need to open java.lang.

Right, removed.

> test/jdk/java/lang/Thread/virtual/ThreadYield.java line 47:
> 
>> 45: import static org.junit.jupiter.api.Assertions.*;
>> 46: 
>> 47: class ThreadYield {
> 
> This isn't a unit test for Thread.yield so I think it would be better to rename to something specific like ThreadYieldPollsSafepoint (or better name).

How about ThreadPollOnYield?

> test/jdk/java/lang/Thread/virtual/ThreadYield.java line 49:
> 
>> 47: class ThreadYield {
>> 48:     static void foo(AtomicBoolean done) {
>> 49:         synchronized (done) {
> 
> When this test makes it to the loom repo then we'll need to change it to pin by other means.

I changed it to use VThreadPinner. I verified the test still times out with Graal.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20016#discussion_r1669230583
PR Review Comment: https://git.openjdk.org/jdk/pull/20016#discussion_r1669229847
PR Review Comment: https://git.openjdk.org/jdk/pull/20016#discussion_r1669231244


More information about the hotspot-dev mailing list