On Wed, 22 Jul 2026 02:08:22 GMT, David Holmes <[email protected]> wrote:

>> Thanks for looking at this Patricio.
>> 
>> The issues you raise were discussed a lot when JDK-8355631 was being fixed 
>> (initially it only dealt with the late phase change problem). The problem, 
>> as I understand it, is that in-progress callbacks can generate further 
>> events which are then happening after vm_death - contrary to spec. But 
>> without full synchronization it is inherently racy and you can't get 100% 
>> compliance. The current polling loop for 60s is a compromise, but we/I 
>> overlooked the interaction with safepoints. It is very easy to get into a 
>> temporary "deadlock" with safepoints, hence the simple point fix here.
>
> There is another self-hang reported in 
> [JDK-8385823](https://bugs.openjdk.org/browse/JDK-8385823)

> but my reading of the JVMTI spec is that VMDeath guarantees no new events 
> occur after it,

I did not review JDK-8355631 so I don't know if we considered using an atomic 
flag
to prevent the posting of further events once we reach VMDeath. We cannot do
anything reasonable about in-progress callbacks, but we could also check the 
same
atomic flag in the code that invokes the callbacks to return when the atomic 
flag is
set...

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31982#discussion_r3631331958

Reply via email to