On Tue, 21 Jul 2026 06:23:09 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).

This pull request has now been integrated.

Changeset: 87ed2ec4
Author:    David Holmes <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/87ed2ec4fa1d83d81f0dd9986a50520b13e0cac4
Stats:     162 lines in 2 files changed: 162 ins; 0 del; 0 mod

8387045: JDK with transformer agent hangs on shutdown

Reviewed-by: sspitsyn, pchilanomate, lmesnik

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

PR: https://git.openjdk.org/jdk/pull/31982

Reply via email to