Bug 23423 - runtime eclipse does not come up - VMDisconnectException
Summary: runtime eclipse does not come up - VMDisconnectException
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M1   Edit
Assignee: Darin Swanson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 23641 23786 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-09-11 11:51 EDT by Adam Kiezun CLA
Modified: 2002-09-18 16:25 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2002-09-11 11:51:38 EDT
20020910
com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine
at org.eclipse.jdi.internal.connect.PacketSendManager.sendPacket
(PacketSendManager.java:63)
at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:163)
at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:185)
at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:215)
at org.eclipse.jdi.internal.ReferenceTypeImpl.signature
(ReferenceTypeImpl.java:809)
at org.eclipse.jdi.internal.ReferenceTypeImpl.name(ReferenceTypeImpl.java:795)
at org.eclipse.jdt.internal.debug.core.breakpoints.JavaBreakpoint.getTypeName
(JavaBreakpoint.java:730)
at org.eclipse.jdt.internal.debug.core.breakpoints.JavaBreakpoint.addToTarget
(JavaBreakpoint.java:415)
at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.breakpointAdded
(JDIDebugTarget.java:989)
at org.eclipse.jdt.internal.debug.ui.JavaDebugOptionsManager.notifyTarget
(JavaDebugOptionsManager.java:360)
at org.eclipse.jdt.internal.debug.ui.JavaDebugOptionsManager.handleDebugEvents
(JavaDebugOptionsManager.java:563)
at org.eclipse.debug.core.DebugPlugin.fireDebugEventSet(DebugPlugin.java
(Compiled Code))
at org.eclipse.jdt.internal.debug.core.model.JDIDebugElement.fireEvent
(JDIDebugElement.java:133)
at org.eclipse.jdt.internal.debug.core.model.JDIDebugElement.fireCreationEvent
(JDIDebugElement.java:123)
at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.initialize
(JDIDebugTarget.java:338)
at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.<init>
(JDIDebugTarget.java:237)
at org.eclipse.jdt.debug.core.JDIDebugModel$1.run(JDIDebugModel.java:134)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1361)
at org.eclipse.jdt.debug.core.JDIDebugModel.newDebugTarget
(JDIDebugModel.java:138)
at org.eclipse.jdt.debug.core.JDIDebugModel.newDebugTarget
(JDIDebugModel.java:98)
at org.eclipse.jdt.internal.launching.StandardVMDebugger.run
(StandardVMDebugger.java:145)
at 
org.eclipse.pde.internal.ui.launcher.WorkbenchLaunchConfigurationDelegate.doLaun
ch(WorkbenchLaunchConfigurationDelegate.java:279)
at 
org.eclipse.pde.internal.ui.launcher.WorkbenchLaunchConfigurationDelegate.launch
(WorkbenchLaunchConfigurationDelegate.java:87)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch
(LaunchConfiguration.java:140)
at org.eclipse.debug.internal.ui.actions.RelaunchActionDelegate.relaunch
(RelaunchActionDelegate.java:56)
at org.eclipse.debug.internal.ui.actions.RelaunchActionDelegate.relaunch
(RelaunchActionDelegate.java:32)
at org.eclipse.debug.internal.ui.actions.RelaunchHistoryLaunchAction$1.run
(RelaunchHistoryLaunchAction.java:59)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:66)
at org.eclipse.debug.internal.ui.actions.RelaunchHistoryLaunchAction.run
(RelaunchHistoryLaunchAction.java:57)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:749)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:407)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent
(ActionContributionItem.java:361)
at org.eclipse.jface.action.ActionContributionItem.access$0
(ActionContributionItem.java:352)
at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java:47)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled Code))
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Compiled Code))
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled 
Code))
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled Code))
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compiled Code))
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1239)
at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:775)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
at java.lang.reflect.Method.invoke(Native Method)
at org.eclipse.core.launcher.Main.basicRun(Main.java:247)
at org.eclipse.core.launcher.Main.run(Main.java:703)
at org.eclipse.core.launcher.Main.main(Main.java:539)
Comment 1 Adam Kiezun CLA 2002-09-11 11:52:08 EDT
major - i have to go back to 2.0.1
Comment 2 Adam Kiezun CLA 2002-09-11 12:00:18 EDT
restarting eclipse made it work again
sorry for the severity mess
Comment 3 Darin Swanson CLA 2002-09-11 12:41:23 EDT
I can get a similar problem:
Debug a self hosted workspace
Put a breakpoint at line 87 of BreakpointsViewEventHandler
Debug a program in the target, that will cause a breakpoint to be installed.
The breakpoint in the host is hit
Hit resume, the breakpoint is hit again in the host
In the self-host target, terminate the program
Hit resume in the host (takes a couple of times) and you will stop at the 
VMDisconnectedException (if stopping at uncaught exceptions)
Terminate and Remove in the self-host target to cleanup the zombie launch.

Any further attempts to debug a program in the self-host target fail with the 
IOException-->VMDisconnectedException.
Like Adam, restarting the self-host target fixes the problem.
Comment 4 Darin Swanson CLA 2002-09-12 17:37:51 EDT
Turns out this was a problem with breakpoints not being removed from a target 
that has shutdown unexpectedly.  A breakpoint would hold onto a ReferenceType 
(in fInstalledType).  In #addToTarget(JDITarget) one of the first things we do 
is call #getTypeName().  This would blow up with a VMDisconnectedException as 
we were asking the old ReferenceType.  So this is the reason for all future 
launches failing.

Now the reason the breakpoints were not removed from the target.
The EventDispatcher attempts to resume the event set.  This can fail with a 
VMDisconnectedException.  This caused all event dispatching to fail...including 
the pending notification that the VM had disconnected-->the target is not 
notified and the breakpoints are not removed.
Comment 5 Darin Swanson CLA 2002-09-12 17:42:09 EDT
Fixed in EventDispatcher.
Comment 6 Darin Wright CLA 2002-09-12 22:35:57 EDT
Verified explanation and code fix. Was not able to reproduce problem.
Comment 7 Darin Wright CLA 2002-09-18 10:40:06 EDT
I'm still getting this problem in the latest code:

!ENTRY org.eclipse.ui 4 0 Sep 18, 2002 09:57:29.680
!MESSAGE Got IOException from Virtual Machine
!STACK 0
com.sun.jdi.VMDisconnectedException: Got IOException from Virtual Machine
	at org.eclipse.jdi.internal.connect.PacketReceiveManager.getReply
(PacketReceiveManager.java:123)
	at org.eclipse.jdi.internal.connect.PacketReceiveManager.getReply
(PacketReceiveManager.java:137)
	at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:167)
	at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:185)
	at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:215)
	at org.eclipse.jdi.internal.ReferenceTypeImpl.signature
(ReferenceTypeImpl.java:809)
	at org.eclipse.jdi.internal.ReferenceTypeImpl.name
(ReferenceTypeImpl.java(Compiled Code))
	at 
org.eclipse.jdt.internal.debug.core.breakpoints.JavaBreakpoint.getTypeName
(JavaBreakpoint.java:807)
	at 
org.eclipse.jdt.internal.debug.core.breakpoints.JavaBreakpoint.addToTarget
(JavaBreakpoint.java:452)
	at 
org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.breakpointAdded
(JDIDebugTarget.java:999)
	at 
org.eclipse.jdt.internal.debug.ui.JavaDebugOptionsManager.notifyTarget
(JavaDebugOptionsManager.java:360)
	at 
org.eclipse.jdt.internal.debug.ui.JavaDebugOptionsManager.handleDebugEvents
(JavaDebugOptionsManager.java:563)
	at org.eclipse.debug.core.DebugPlugin.fireDebugEventSet(DebugPlugin.java
(Compiled Code))
	at org.eclipse.jdt.internal.debug.core.model.JDIDebugElement.fireEvent
(JDIDebugElement.java:133)
	at 
org.eclipse.jdt.internal.debug.core.model.JDIDebugElement.fireCreationEvent
(JDIDebugElement.java:123)
	at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.initialize
(JDIDebugTarget.java:338)
	at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.<init>
(JDIDebugTarget.java:237)
	at org.eclipse.jdt.debug.core.JDIDebugModel$1.run
(JDIDebugModel.java:134)
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1378)
	at org.eclipse.jdt.debug.core.JDIDebugModel.newDebugTarget
(JDIDebugModel.java:138)
	at org.eclipse.jdt.debug.core.JDIDebugModel.newDebugTarget
(JDIDebugModel.java:98)
	at org.eclipse.jdt.internal.launching.StandardVMDebugger.run
(StandardVMDebugger.java:145)
	at 
org.eclipse.jdt.internal.launching.JavaLocalApplicationLaunchConfigurationDelega
te.launch(JavaLocalApplicationLaunchConfigurationDelegate.java:97)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch
(LaunchConfiguration.java:140)
	at org.eclipse.debug.internal.ui.actions.RelaunchActionDelegate.relaunch
(RelaunchActionDelegate.java:56)
	at org.eclipse.debug.internal.ui.actions.RelaunchLastAction$1.run
(RelaunchLastAction.java:60)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:66)
	at org.eclipse.debug.internal.ui.actions.RelaunchLastAction.run
(RelaunchLastAction.java:58)
	at org.eclipse.ui.internal.PluginAction.runWithEvent
(PluginAction.java:210)
	at org.eclipse.ui.internal.WWinPluginAction.runWithEvent
(WWinPluginAction.java:196)
	at 
org.eclipse.ui.internal.registry.AcceleratorScope$AcceleratorAction.run
(AcceleratorScope.java:289)
	at org.eclipse.ui.internal.registry.AcceleratorScope.processKey
(AcceleratorScope.java:249)
	at org.eclipse.ui.internal.KeyBindingMenu$3.handleEvent
(KeyBindingMenu.java:90)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1239)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:775)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:247)
	at org.eclipse.core.launcher.Main.run(Main.java:703)
	at org.eclipse.core.launcher.Main.main(Main.java:539)
Comment 8 Darin Wright CLA 2002-09-18 10:57:48 EDT
I think the problem is that when multiple targets are run, the install count 
can be greater than 0, and we cache an installed type from a terminated VM.
Comment 9 Darin Wright CLA 2002-09-18 11:07:02 EDT
Changed code to cache the type name, rather than the actual ReferenceType. This 
fixes the problem.
Comment 10 Darin Wright CLA 2002-09-18 11:07:24 EDT
Fixed. Please verify, Darin S.
Comment 11 Darin Swanson CLA 2002-09-18 11:11:08 EDT
Verified code.
Comment 12 Darin Wright CLA 2002-09-18 11:36:32 EDT
*** Bug 23641 has been marked as a duplicate of this bug. ***
Comment 13 Darin Wright CLA 2002-09-18 16:25:49 EDT
*** Bug 23786 has been marked as a duplicate of this bug. ***