On Mon, 14 Jul 2025 23:42:03 GMT, Leonid Mesnik <lmes...@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. Changes requested by sspitsyn (Reviewer). 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. 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". ------------- PR Review: https://git.openjdk.org/jdk/pull/26303#pullrequestreview-3018124707 PR Review Comment: https://git.openjdk.org/jdk/pull/26303#discussion_r2206025058 PR Review Comment: https://git.openjdk.org/jdk/pull/26303#discussion_r2206028317