RFR: 8352178: Add precondition in Handshake::execute to prevent deadlock
David Holmes
dholmes at openjdk.org
Mon Mar 17 23:33:07 UTC 2025
On Mon, 17 Mar 2025 19:57:43 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Simple patch of adding `SuspendibleThreadSet` related precondition to `Handshake::execute` in order to prevent deadlock.
> All existing callsites satisfy this precondition already.
>
> Test: tier1-5
Looks fine. One comment typo.
Thanks
src/hotspot/share/runtime/handshake.cpp line 356:
> 354: // The current thread must not belong to the SuspendibleThreadSet, because an
> 355: // on-the-fly safepoint can be waiting for the current thread, and the
> 356: // current thread will be blocked in VMThread::execute, resulting into
Suggestion:
// current thread will be blocked in VMThread::execute, resulting in
-------------
Marked as reviewed by dholmes (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/24088#pullrequestreview-2692352157
PR Review Comment: https://git.openjdk.org/jdk/pull/24088#discussion_r1999839180
More information about the hotspot-runtime-dev
mailing list