1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 18:56:02 +02:00

Bug 300394 - [ftp] Deadlock due to NOOP command not receiving response on the main thread

This commit is contained in:
Martin Oberhuber 2010-03-15 21:44:38 +00:00
parent 6d6b04e7ca
commit bba9934da2
9 changed files with 22 additions and 28 deletions

View file

@ -4,7 +4,7 @@ feature@org.eclipse.rse=v201003151933,:pserver:anonymous:none@dev.eclipse.org:/c
feature@org.eclipse.rse.core=v201003151933,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.core-feature
feature@org.eclipse.rse.dstore=v201003010830,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.dstore-feature
feature@org.eclipse.rse.examples=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/examples/org.eclipse.rse.examples-feature
feature@org.eclipse.rse.ftp=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.ftp-feature
feature@org.eclipse.rse.ftp=v201003151933,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.ftp-feature
feature@org.eclipse.rse.local=v201003010830,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.local-feature
feature@org.eclipse.rse.sdk=v201003151933,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.sdk-feature
feature@org.eclipse.rse.ssh=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.ssh-feature
@ -35,7 +35,7 @@ plugin@org.eclipse.rse.importexport=v201003010830,:pserver:anonymous:none@dev.ec
plugin@org.eclipse.rse.processes.ui=v201003010830,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.processes.ui
plugin@org.eclipse.rse.sdk=v201003151933,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.sdk
plugin@org.eclipse.rse.services.dstore=v201003151238,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore
plugin@org.eclipse.rse.services.files.ftp=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.files.ftp
plugin@org.eclipse.rse.services.files.ftp=v201003151933,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.files.ftp
plugin@org.eclipse.rse.services.local=v201003010830,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.local
plugin@org.eclipse.rse.services.ssh=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.ssh
plugin@org.eclipse.rse.services.telnet=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.telnet

View file

@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2006, 2009 IBM Corporation and others.
# Copyright (c) 2006, 2010 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@ -27,7 +27,7 @@ implementation of the file services defined by the RSE API.
# "copyright" property - text of the "Feature Update Copyright"
copyright=\
Copyright (c) 2000, 2009 Symbian Software Ltd. and others.\n\
Copyright (c) 2000, 2010 Symbian Software Ltd. and others.\n\
All rights reserved. This program and the accompanying materials\n\
are made available under the terms of the Eclipse Public License v1.0\n\
which accompanies this distribution, and is available at\n\

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <!--
Copyright (c) 2005, 2009 IBM Corporation and others.
Copyright (c) 2005, 2010 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
@ -12,7 +12,7 @@
<feature
id="org.eclipse.rse.ftp"
label="%featureName"
version="3.0.101.qualifier"
version="3.0.200.qualifier"
provider-name="%providerName"
plugin="org.eclipse.rse.services.files.ftp">

View file

@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2006, 2009 IBM Corporation and others.
# Copyright (c) 2006, 2010 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@ -29,7 +29,7 @@ implementation of the file services defined by the RSE API.
# "copyright" property - text of the "Feature Update Copyright"
copyright=\
Copyright (c) 2000, 2009 Symbian Software Ltd. and others.\n\
Copyright (c) 2000, 2010 Symbian Software Ltd. and others.\n\
All rights reserved. This program and the accompanying materials\n\
are made available under the terms of the Eclipse Public License v1.0\n\
which accompanies this distribution, and is available at\n\

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <!--
Copyright (c) 2005, 2009 IBM Corporation and others.
Copyright (c) 2005, 2010 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
@ -9,7 +9,7 @@
IBM Corporation - initial API and implementation
-->
<feature id="org.eclipse.rse.ftp.source" version="3.0.100.qualifier" label="%featureName" provider-name="%providerName" plugin="org.eclipse.rse.services.files.ftp.source">
<feature id="org.eclipse.rse.ftp.source" version="3.0.200.qualifier" label="%featureName" provider-name="%providerName" plugin="org.eclipse.rse.services.files.ftp.source">
<description >
%description
</description>

View file

@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2000, 2009 IBM Corporation and others.
# Copyright (c) 2000, 2010 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@ -21,6 +21,6 @@ blurb=RSE FTP Service Source\n\
Version: {featureVersion}\n\
Build id: {0}\n\
\n\
(c) Copyright Symbian Software Ltd. and others 2000, 2009. All rights reserved.\n\
(c) Copyright Symbian Software Ltd. and others 2000, 2010. All rights reserved.\n\
Visit http://www.eclipse.org/dsdp/tm

View file

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.services.files.ftp;singleton:=true
Bundle-Version: 3.0.101.qualifier
Bundle-Version: 3.0.200.qualifier
Bundle-Activator: org.eclipse.rse.internal.services.files.ftp.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin

View file

@ -1,5 +1,5 @@
################################################################################
# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
# Copyright (c) 2006, 2010 Wind River Systems, Inc. and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@ -25,7 +25,7 @@ blurb=RSE FTP Service\n\
Version: {featureVersion}\n\
Build id: {0}\n\
\n\
(c) Copyright Symbian Software Ltd. and others 2000, 2009. All rights reserved.\n\
(c) Copyright Symbian Software Ltd. and others 2000, 2010. All rights reserved.\n\
Visit http://www.eclipse.org/dsdp/tm\n\
\n\
This product includes software developed by the\n\

View file

@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2006, 2009 IBM Corporation and others. All rights reserved.
* Copyright (c) 2006, 2010 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@ -83,6 +83,7 @@
* Martin Oberhuber (Wind River) - [217472][ftp] Error copying files with very short filenames
* Martin Oberhuber (Wind River) - [285942] Throw exception when listing a non-folder
* Martin Oberhuber (Wind River) - [285948] Avoid recursive deletion over symbolic links
* Martin Oberhuber (Wind River) - [300398] Avoid product hang-up on isConnected()
********************************************************************************/
package org.eclipse.rse.internal.services.files.ftp;
@ -109,7 +110,6 @@ import org.apache.commons.net.ProtocolCommandListener;
import org.apache.commons.net.ftp.FTP;
import org.apache.commons.net.ftp.FTPClient;
import org.apache.commons.net.ftp.FTPClientConfig;
import org.apache.commons.net.ftp.FTPConnectionClosedException;
import org.apache.commons.net.ftp.FTPFile;
import org.apache.commons.net.ftp.FTPReply;
import org.eclipse.core.runtime.IProgressMonitor;
@ -721,17 +721,11 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
if(_ftpClient!=null) {
isConnected = _ftpClient.isConnected();
if (isConnected){ // make sure that there hasn't been a timeout
try {
_ftpClient.noop();
}
catch (FTPConnectionClosedException e){
return false;
}
catch (IOException e2){
return false;
}
}
// Bug 300394: isConnected() is called on the main thread, so it must
// return fast without really checking the remote. In FTP, we deal
// with "virtual connections" which can automatically re-connect
// through the getFTPClient() method at any time. Sending NOOP as
// keepalive is a separate thing to be done.
}
return isConnected;