RFR: 8362203: assert(state == nullptr || state->get_thread_oop() != nullptr) failed: incomplete state
Leonid Mesnik
lmesnik at openjdk.org
Tue Jul 15 03:07:40 UTC 2025
On Tue, 15 Jul 2025 00:17:04 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
>> The problem happens if post_early_vm_start is triggered.
>> The fix is to complete initialization once threadObj become available.
>>
>> I'vent observed that recompute_enable and hitting assertion might happens before this step. However it might be makes sense to check state in assertion if needed.
>
> src/hotspot/share/prims/jvmtiExport.cpp line 678:
>
>> 676: EVT_TRIG_TRACE(JVMTI_EVENT_VM_START, ("Trg VM start event triggered" ));
>> 677:
>> 678: // The thread state might be incomplete if initialized in post_early_vm_start
>
> Nit: Better to say "The JvmtiThreadState might be incomplete" to avoid confusion with other means of thread state.
updated
> src/hotspot/share/prims/jvmtiThreadState.cpp line 1045:
>
>> 1043:
>> 1044: void JvmtiThreadState::update_thread_oop(JavaThread* thread) {
>> 1045: assert(thread->threadObj() != nullptr, "Should threadObj be already initialized");
>
> Nit: Better just to say: "Sanity check".
updated
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26303#discussion_r2206182954
PR Review Comment: https://git.openjdk.org/jdk/pull/26303#discussion_r2206182861
More information about the hotspot-dev
mailing list