RFR: JDK-8222741: jdi/EventQueue/remove/remove004 fails due to VMDisconnectedException

Chris Plummer chris.plummer at oracle.com
Fri Apr 19 17:58:17 UTC 2019


Hi Gary,

Can you add the backtrace of the exception to the CR. It will make it a 
bit easier to understand when/why this bug is happening.

If I understand correctly, the second time through the loop the debuggee 
should be at a breakpoint, but we do the vm.resume() before we check for 
the breakpoint event, and this sometimes leads to the debuggee exiting 
before the call to eventIterator.nextEvent(), and this is where the 
exception occurs.

Also, I assume with the old implementation that the vm.resume() done at 
lines 321 or 329 actually is not doing anything on the 2nd and 
subsequent iterations since the debuggee is already resumed by the 
resume() at the top of the loop. With your fix, they now are providing a 
needed resume().

If my understanding is correct, then your fix looks good.

thanks,

Chris

On 4/19/19 10:06 AM, Gary Adams wrote:
> Prevent the debuggee from exiting too quickly by
> holding it at the breakpoint until the end of processing
> flag has been read by the main thread from the debugger process.
>
>   Webrev: http://cr.openjdk.java.net/~gadams/8222741/webrev/
>   Issue: https://bugs.openjdk.java.net/browse/JDK-8222741





More information about the serviceability-dev mailing list