Community
Participate
Working Groups
Occurs during shutdown Log: Wed Jan 16 13:35:55 CST 2002 4 org.eclipse.jdt.debug 120 Internal error logged from JDI Debug: com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine at org.eclipse.jdi.internal.request.EventRequestImpl.disable (EventRequestImpl.java:173) at org.eclipse.jdi.internal.request.EventRequestManagerImpl.deleteEventRequest (EventRequestManagerImpl.java:266) at org.eclipse.jdt.internal.debug.core.JavaBreakpoint.removeFromTarget (JavaBreakpoint.java:473) at org.eclipse.jdt.internal.debug.core.JDIDebugTarget.removeAllBreakpoints (JDIDebugTarget.java:1191) at org.eclipse.jdt.internal.debug.core.JDIDebugTarget.cleanup (JDIDebugTarget.java:1163) at org.eclipse.jdt.internal.debug.core.JDIDebugTarget.shutdown (JDIDebugTarget.java:1356) at org.eclipse.jdt.internal.debug.core.JDIDebugPlugin.shutdown (JDIDebugPlugin.java:107) at org.eclipse.core.internal.plugins.PluginRegistry$2.run (PluginRegistry.java:265) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:821) at org.eclipse.core.internal.plugins.PluginRegistry$1.visit (PluginRegistry.java:274) at org.eclipse.core.internal.plugins.PluginRegistry.accept (PluginRegistry.java:45) at org.eclipse.core.internal.plugins.PluginRegistry.shutdownPlugins (PluginRegistry.java:277) at org.eclipse.core.internal.plugins.PluginRegistry.shutdown (PluginRegistry.java:252) at org.eclipse.core.internal.runtime.InternalPlatform.loaderShutdown (InternalPlatform.java:532) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.internal.boot.InternalBootLoader.shutdown (InternalBootLoader.java:954) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:883) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:321) at SlimLauncher.main(SlimLauncher.java:14)
The sequence of events here is as follows: - JDIDebugTarget#shutdown - JDIDebugTarget#terminate (sends request to VM) - JDIDebugTarget#removeBreakpoint - VM terminates (packet does not reach us yet) - JavaBreakpoint checks if the VM is terminated (we don't know that it is yet) and then tries to remove the event request - We get a VMDisconnectedException and handle it quietly (writing to the log) - VMDeathEvent arrives - JDIDebugTarget's state is updated to terminated Possible fixes include: - JDIDebugTarget#isTerminated() can return true if isTerminating() is true (this would negatively affect current logic inside the debug target) - The isTerminating() method can be promoted to API. Client could then check this flag as well as isTerminated() and isDisconnected() - A new "isAvailable()" method could be added to the API. This method would answer true if the debug target is available to handle requests. This would allow clients to check only one method. Our implementation could then return isTerminated() || isTerminating() || isDisconnected() || etc. I prefer the last option as I think it is what debug target clients want most of the time. A quick browse of our code base shows that we call (isTerminated() || isDisconnected()) all over the place. It would be nice to centralize this logic to answer the real question, isAvailable().
The "client" (i.e. breakpoint) is internal to the implementation - no API is required.
Implemented isAvailable() method on JDIDebugTarget and updated internal packages of org.eclipse.jdt.debug to call this method.
Please verify.
Verified. Added targetRequestFailed call in JDIStackFrame#isObsolete()
*** Bug 7975 has been marked as a duplicate of this bug. ***
*** Bug 6659 has been marked as a duplicate of this bug. ***
*** Bug 467643 has been marked as a duplicate of this bug. ***
*** Bug 467644 has been marked as a duplicate of this bug. ***
*** Bug 466897 has been marked as a duplicate of this bug. ***