RFR: JDK-8305507 Add support for grace period before AbortVMOnSafepointTimeout triggers [v2]

David Holmes dholmes at openjdk.org
Tue Jul 4 01:27:59 UTC 2023


On Mon, 3 Jul 2023 10:49:47 GMT, pete23hsbc <duke at openjdk.org> wrote:

>> test/hotspot/jtreg/runtime/Safepoint/TestAbortVMOnSafepointTimeout.java line 81:
>> 
>>> 79:         OutputAnalyzer output = new OutputAnalyzer(pb.start());
>>> 80:         output.shouldContain(TestWithDelay.PRE_STALL_TEXT);
>>> 81:         verifyAbortVmApplied(output);
>> 
>> Surely in this case there is no abort ??? Otherwise how are you actually testing the delay?
>
> @dholmes-ora I've read through the Test and think I now understand it, don't believe it needs a change but maybe I've missed something.
> 
> Process is started with 1500ms arming delay and 50ms safepoint timeout, with abort on timeout set.
> 
> A 999ms pause is induced. This would trigger the timeout and hence abort, but we are still within the arming delay window. We output PRE_STALL_TEXT so that the test can verify the arming delay succeeded. (tested on line 80).
> 
> A further 999ms pause is induced. This will take us past the end of the arming delay and therefore should trigger the VM abort. This is why we still expect the VM to abort (tested line 81).
> 
> tl;dr The test is checking that the abort timeout is initially disarmed, and also that it is correctly rearmed, hence why we still get an abort.

@pete23hsbc thank you for that explanation. I see now how the test is expecting to work.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13386#discussion_r1251376827


More information about the hotspot-runtime-dev mailing list