RFR: 8253794: TestAbortVMOnSafepointTimeout never timeouts
Daniel D.Daugherty
dcubed at openjdk.java.net
Thu Oct 1 20:14:06 UTC 2020
On Thu, 1 Oct 2020 19:40:04 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> The issue is that this test doesn't consider Handshake All operation.
>> Depending if/when such operation is scheduled it can lockup the VM thread.
>> And the safepoint that should timeout never happens.
>> See issue for more information.
>>
>> So I changed the test to "try timeout" the safepoint, but if there was no safepoint (blocked by a handshake all), we
>> retry. We sleep unsafe much longer than the interval SafepointALot generates operations, which 'guarantees' we will
>> timeout if there is no handshake all. (some extreme case of kernel scheduling causing a very long context switch could
>> also make us not timeout) Passes t1, t3, and repeat runs of the test.
>
> test/hotspot/jtreg/runtime/Safepoint/TestAbortVMOnSafepointTimeout.java line 49:
>
>> 47: System.out.println("This message would occur after some time.");
>> 48: } else {
>> 49: testWith(50, 1, 999);
>
> Please consider:
>
> `testWith(50 /* sfpt_interval */, 1 /* timeout_delay */, 999 /* unsafe_wait */);`
Also, I think the test would be more clear if this testWith() part
was in a `if (args.length == 0)` block at the top and the else
part was the rest of the test. After all, code flow wise, you
execute the `(args.length == 0)` case first and then come
back for the case with the unsafe_wait value.
-------------
PR: https://git.openjdk.java.net/jdk/pull/465
More information about the hotspot-runtime-dev
mailing list