RFR: 8253794: TestAbortVMOnSafepointTimeout never timeouts [v2]

Daniel D.Daugherty dcubed at openjdk.java.net
Mon Oct 5 15:35:50 UTC 2020


On Fri, 2 Oct 2020 09:00:54 GMT, Robbin Ehn <rehn 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.
>
> Robbin Ehn has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update with input from reviews

Changes requested by dcubed (Reviewer).

src/hotspot/share/prims/whitebox.cpp line 77:

> 75: #include "runtime/jniHandles.inline.hpp"
> 76: #include "runtime/os.hpp"
> 77: #include "runtime/safepoint.hpp"

I don't think you need this include change anymore.

test/hotspot/jtreg/runtime/Safepoint/TestAbortVMOnSafepointTimeout.java line 74:

> 72:             Integer waitTime = Integer.parseInt(args[0]);
> 73:             WhiteBox wb = WhiteBox.getWhiteBox();
> 74:             // While no safepoint timeout.

Perhaps: // Loop here to cause a safepoint timeout.

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

PR: https://git.openjdk.java.net/jdk/pull/465


More information about the hotspot-runtime-dev mailing list