RFR: 8271931: Make AbortVMOnVMOperationTimeout more resilient to OS scheduling
Aleksey Shipilev
shade at openjdk.java.net
Thu Aug 5 10:30:30 UTC 2021
On Thu, 5 Aug 2021 10:24:52 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Perform VM-op timeout also on the VM thread. If a VM-op is stuck, the existing watcher-thread based machinery will kick in and detect it.
>>
>> Test: tier1
>
> src/hotspot/share/runtime/vmThread.cpp line 428:
>
>> 426: fatal("%s VM operation took too long: completed in " JLONG_FORMAT " ms (timeout: " INTX_FORMAT " ms)",
>> 427: _cur_vm_operation->name(), delay, AbortVMOnVMOperationTimeoutDelay);
>> 428: }
>
> This duplicates `VMOperationTimeoutTask::task` body. So I think this is better to be moved to a separate method, e.g. `VMOperationTimeoutTask::check_and_fail`, which we can then call from both `::task` and `::disarm`.
After this, we would also not need any other changes here: it would allow to check that task is `NULL` all the same.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5016
More information about the hotspot-runtime-dev
mailing list