On Wed, 15 Jun 2022 17:42:42 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

> One issue I have with this fix is that is doesn't fix the "delay" issue. It 
> helps it, and ensures the CLASS_UNLOAD events are sent before the debuggee 
> exits, but it doesn't guarantee that they are sent in a time manner.
> 
Yes, it improves timing in some cases, but not for all.

> Your test is somewhat contrived in that the debuggee only runs for as long as 
> it takes to look up all the test classes. Then it exits, generating a 
> VM_DEATH, and guaranteeing that by that point all CLASS_UNLOAD events have 
> been sent (and without delay). However, we also have the issue of a 
> [JDK-8257705](https://bugs.openjdk.org/browse/JDK-8257705), which is a test 
> that times out waiting for a CLASS_UNLOAD event, because there isn't another 
> event to trigger sending it. Since the debuggee does not exit until after the 
> test is done (and has timed out), the VM_DEATH comes too late.
> 
> [JDK-8256811](https://bugs.openjdk.org/browse/JDK-8256811) offers other 
> suggestions for the fix, albeit more complex than your. Please consider the 
> one mentioned in the first comment, which is basically adding a watchdog 
> thread.

I could not seem to find the other solution in 
[JDK-8256811](https://bugs.openjdk.org/browse/JDK-8256811) comments.

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

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

Reply via email to