RFR: 8352178: Add precondition in VMThread::execute to prevent deadlock [v2]

Albert Mingkun Yang ayang at openjdk.org
Tue Mar 18 14:55:14 UTC 2025


On Tue, 18 Mar 2025 13:38:01 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

>> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update src/hotspot/share/runtime/handshake.cpp
>>   
>>   Co-authored-by: David Holmes <62092539+dholmes-ora at users.noreply.github.com>
>
> 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.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24088#discussion_r2001241626


More information about the hotspot-runtime-dev mailing list