RFR: 8359472: JVM crashes when attaching a dynamic agent before JVMTI_PHASE_LIVE
Francesco Andreuzzi
fandreuzzi at openjdk.org
Tue Oct 14 08:12:47 UTC 2025
On Mon, 13 Oct 2025 11:52:06 GMT, Kerem Kat <krk at openjdk.org> wrote:
>> In this PR I add a check to prevent debug builds to crash when an agent tries to attach while the JVM is not in live phase.
>>
>> Passes tier1 and tier2 (fastdebug).
>
> src/hotspot/share/prims/jvmtiAgentList.cpp line 201:
>
>> 199: if (JvmtiEnvBase::get_phase() != JVMTI_PHASE_LIVE) {
>> 200: st->print_cr("Not in live phase");
>> 201: return;
>
> Will the agent be loaded later?
No, but the client can retry later.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27766#discussion_r2426122346
More information about the serviceability-dev
mailing list