Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314771 - RemoteTools Connection raises ConcurrentModificationException while trying to stop a resource manager hanging
Summary: RemoteTools Connection raises ConcurrentModificationException while trying to...
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: Remote Tools (show other bugs)
Version: 3.0.1   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Greg Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 315905
Blocks:
  Show dependency tree
 
Reported: 2010-05-27 16:13 EDT by Emmanuel Geay CLA
Modified: 2010-08-25 10:03 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emmanuel Geay CLA 2010-05-27 16:13:01 EDT
1) Creates a resource manager that hangs, ie. stays in STARTING state.
2) Try to stop it. This will raise the next following concurrent modification exception.

java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
at java.util.AbstractList$Itr.next(AbstractList.java:343)
at org.eclipse.ptp.remotetools.internal.ssh.Connection.disconnect(Connection.java:385)
at org.eclipse.ptp.remotetools.environment.control.SSHTargetControl.disconnect(SSHTargetControl.java:461)
at org.eclipse.ptp.remotetools.environment.control.SSHTargetControl.kill(SSHTargetControl.java:367)
at org.eclipse.ptp.remote.remotetools.core.environment.PTPTargetControl.kill(PTPTargetControl.java:236)
at org.eclipse.ptp.remote.remotetools.core.RemoteToolsConnection.close(RemoteToolsConnection.java:87)
at org.eclipse.ptp.rm.core.rtsystem.AbstractRemoteProxyRuntimeClient.shutdown(AbstractRemoteProxyRuntimeClient.java:91)
at org.eclipse.ptp.rm.core.rtsystem.AbstractRemoteProxyRuntimeSystem.shutdown(AbstractRemoteProxyRuntimeSystem.java:37)
at org.eclipse.ptp.rmsystem.AbstractRuntimeResourceManager.doShutdown(AbstractRuntimeResourceManager.java:968)
at org.eclipse.ptp.rmsystem.AbstractResourceManager.shutdown(AbstractResourceManager.java:577)
at org.eclipse.ptp.ui.actions.StopResourceManagersObjectActionDelegate.run(StopResourceManagersObjectActionDelegate.java:60)
at org.eclipse.ptp.ui.actions.AbstractResourceManagerSelectionActionDelegate.runWithEvent(AbstractResourceManagerSelectionActionDelegate.java:51)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:241)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3543)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1250)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1273)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3441)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3100)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Comment 1 Greg Watson CLA 2010-05-27 22:41:04 EDT
Why is the resource manager hanging? I presume it's something to do with opening a connection, but to track this down it really needs to be isolated to the remotetools connection code.
Comment 2 Emmanuel Geay CLA 2010-05-28 09:15:37 EDT
In fact, I just noticed that even with a valid resource manager, ie one that reached the STARTED state normally, when I try to stop it I get this same exception.
Comment 3 Emmanuel Geay CLA 2010-06-02 13:09:02 EDT
The problem appears to be a regression between Galileo and Helios.
On Helios, the problems seems not to occur. The fix is still important for us since at this point Helios is not officially released and a lot of end-users will continue using Galileo for a while.
Comment 4 Greg Watson CLA 2010-06-14 09:39:53 EDT
It doesn't look like you are running the latest version of 3.0 as the line numbers are incorrect in the stack trace, so it's hard to know exactly what was causing this.

In any case I've modified Connection#disconnect to avoid a potential exception. Please test.
Comment 5 Emmanuel Geay CLA 2010-06-14 10:54:36 EDT
I tested it. Seems fine now. Thanks.
Comment 6 Greg Watson CLA 2010-06-14 11:23:20 EDT
Closing