Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 213619 - RemoteTools raises ConcurrentModificationException when disconnecting with open port forwarding
Summary: RemoteTools raises ConcurrentModificationException when disconnecting with op...
Status: CLOSED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: Remote Tools (show other bugs)
Version: 2.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Greg Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-20 13:25 EST by Daniel Felix Ferber CLA
Modified: 2011-01-31 07:51 EST (History)
2 users (show)

See Also:


Attachments
A patch that fixes the bug. (2.30 KB, patch)
2007-12-20 13:33 EST, Daniel Felix Ferber CLA
g.watson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Felix Ferber CLA 2007-12-20 13:25:45 EST
Build ID: I20070625-1500

Steps To Reproduce:
1. Use RemoteTools to create a SSH connection.
2. Create local one or more port forwardings.
3. (optinal) Execute commands on the remote host.
4. Disconnect from remote host (without first closing the port forwardings).

More information:
The bug is found in the org.eclipse.ptp.remotetools.internal.ssh.Connection.disconnect() method, that is responsible for closing any remaining ssh channels that are still open when called.

The exception that is thrown:
java.util.ConcurrentModificationException
	at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
	at java.util.HashMap$KeyIterator.next(HashMap.java:877)
	at org.eclipse.ptp.remotetools.internal.ssh.ExecutionManager.close(ExecutionManager.java:155)
	at org.eclipse.ptp.remotetools.internal.ssh.Connection.disconnect(Connection.java:288)
	at remotetoolstest.actions.PortTestAction.run(PortTestAction.java:91)
Comment 1 Daniel Felix Ferber CLA 2007-12-20 13:33:23 EST
Created attachment 85676 [details]
A patch that fixes the bug.

The patch changes how RemoteTools iterates over the data structures that store open port forwardings.
Comment 2 Greg Watson CLA 2007-12-20 14:52:03 EST
Committed. Having bugs fixed as soon as they're opened is great!
Comment 3 Daniel Felix Ferber CLA 2007-12-21 13:24:10 EST
The code on cvs seems to be ok, I am closing this bug.