RFR: 8376405: Virtual thread crash: assert(!_current->is_suspended()) failed: must be

Serguei Spitsyn sspitsyn at openjdk.org
Tue Feb 3 23:43:40 UTC 2026


On Fri, 30 Jan 2026 07:08:06 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

>> src/hotspot/share/runtime/continuation.cpp line 92:
>> 
>>> 90:     assert(!_current->is_suspended() ||
>>> 91:            (_current->is_vthread_transition_disabler() && _result != freeze_ok), "must be");
>>> 92: #endif
>> 
>> Suggestion:
>> 
>>     assert(!_current->is_suspended() 
>>            JVMTI_ONLY(|| (_current->is_vthread_transition_disabler() && _result != freeze_ok))
>>            , "must be");
>> 
>> Is this a worthwhile distinction? I guess these days the only way to suspend is through JVMTI. ??
>
>> Is this a worthwhile distinction? I guess these days the only way to suspend is through JVMTI. ??
> 
> Good suggestion. JVMTI is the only way to suspend threads.

In fact, we have more suspend/resume related places that could be moved under INCLUDE_JVMTI. Then we may want to do a separate cleanup for this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29473#discussion_r2761515742


More information about the serviceability-dev mailing list