On Thu, 23 Jul 2026 00:20:04 GMT, David Holmes <[email protected]> wrote:

>> Before posting the VM_DEATH event the JVMTI code spins for up to 60 seconds 
>> to allow in-progress callbacks to complete. If one of those callbacks 
>> requires a safepoint while executing, then it will not be able to  attain it 
>> until the 60s spin is over - thus causing an apparent "hang" at VM 
>> termination. The simple fix is to insert a `ThreadBlockInVM` in the loop so 
>> that safepoint requests are honored.
>> 
>> Testing:
>> - tiers 1-5
>> - new regression test
>> 
>> Thanks.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> David Holmes has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Remove unnecessary @compile

This looks good. Thank you for taking care about it!
I've posted a couple of nits for new test.

test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/TransformerShutdownDeadlockTest.java
 line 57:

> 55:                     TransformerShutdownDeadlockTest.Agent.class.getName() 
> + "\n"
> 56:                     + "Can-Retransform-Classes: true\n"
> 57:                     + "Can-Retransform-Classes: true\n";

Nit: The manifest property is set twice. Should one of them be: 
"Can-Redefine-Classes: true\n" ?

test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/TransformerShutdownDeadlockTest.java
 line 59:

> 57:                     + "Can-Retransform-Classes: true\n";
> 58: 
> 59:     private static String CP = System.getProperty("test.classes");

Nit: The `CP` is unused, so the line can be removed.

test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/TransformerShutdownDeadlockTest.java
 line 155:

> 153:             t.start();
> 154: 
> 155:             while(!transform_running); // Wait for transform to start

Nit: Space is missed after `while` at lines: 121 and 155.

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

Marked as reviewed by sspitsyn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/31982#pullrequestreview-4760796965
PR Review Comment: https://git.openjdk.org/jdk/pull/31982#discussion_r3635566290
PR Review Comment: https://git.openjdk.org/jdk/pull/31982#discussion_r3635573680
PR Review Comment: https://git.openjdk.org/jdk/pull/31982#discussion_r3635580769

Reply via email to