On Thu, 23 Jul 2026 06:02:33 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:
> 
>   Fix test nits

Marked as reviewed by sspitsyn (Reviewer).

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

> 116:             transform_running = true; // Release main thread
> 117:             try {
> 118:                 while(!starting_exit); // Wait for main thread to be 
> ready

Nit: This still misses space after `while`.

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

PR Review: https://git.openjdk.org/jdk/pull/31982#pullrequestreview-4761673894
PR Review Comment: https://git.openjdk.org/jdk/pull/31982#discussion_r3636257444

Reply via email to