RFR: 8352178: Add precondition in VMThread::execute to prevent deadlock [v2]
David Holmes
dholmes at openjdk.org
Thu Mar 20 06:24:08 UTC 2025
On Tue, 18 Mar 2025 14:50:39 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> src/hotspot/share/runtime/handshake.cpp line 359:
>>
>>> 357: // deadlock.
>>> 358: assert(!current_thread->is_suspendible_thread(), "precondition");
>>> 359: assert(!current_thread->is_indirectly_suspendible_thread(), "precondition");
>>
>> Why not move the asserts to VMThread::execute() to cover any operation, not just VM_HandshakeAllThreads?
>
> Moved to `VMThread::execute` and edited the title.
Aren't Handshakes a superset of VMoperations? `VMThread::execute` will only affect VM_Operations, not direct Handshakes with other threads. Is the problem limited to a STS thread trying to execute a safepoint VM operation?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24088#discussion_r2004898247
More information about the hotspot-runtime-dev
mailing list