RFR: 8359472: JVM crashes when attaching a dynamic agent before JVMTI_PHASE_LIVE [v13]

Leonid Mesnik lmesnik at openjdk.org
Mon Oct 20 20:43:06 UTC 2025


On Fri, 17 Oct 2025 20:16:28 GMT, Francesco Andreuzzi <fandreuzzi 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).
>
> Francesco Andreuzzi has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix tool call

Changes requested by lmesnik (Reviewer).

test/hotspot/jtreg/serviceability/attach/EarlyDynamicLoad/TestEarlyDynamicLoad.java line 66:

> 64:     @AfterAll
> 65:     static void stopChild() throws Exception {
> 66:         child.destroy();

Is it possible to let the process to complete normally instead of killing it?  (by writing into stream?)
So test can verify that process is exited with code 0 and nothing is broken by this attaching attempt.

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

PR Review: https://git.openjdk.org/jdk/pull/27766#pullrequestreview-3357862476
PR Review Comment: https://git.openjdk.org/jdk/pull/27766#discussion_r2446072341


More information about the serviceability-dev mailing list