#1155 multi interface blocking with certain ftp servers

closed-fixed
ftp (93)
6
2014-10-03
2012-10-22
No

Using the multi interface (tested with libcurl 7.27.0 and 7.25.0
on openSUSE 12.2) libcurl blocks when talking to certain FTP
servers until a libcurl timeout is reached after a couple of
minutes. This is problematic because it freezes the whole
application and all other running transfers. Apparently the
problem is related to passive mode, i.e. happens after switching
to passive mode, but only for certain hosts as for the vast
majority it works fine.
After tracing it with gdb it seems that libcurl gets
stuck in the while loop in ftp_easy_statemach() calling
Curl_pp_easy_statemach() -> Curl_socket_check() -> poll()
repeatedly until a timeout in Curl_pp_easy_statemach() is
reached. A minimal example (adapted from multi-app.c) that
connects to a server triggering the problem is attached. It
produces the following verbose output:

----8<----
ping
ping
ping
ping
ping
ping
ping
* About to connect() to ftp.caudium.net port 21 (#0)
* Trying 193.218.105.12...
ping
ping
ping
ping
* Connected to ftp.caudium.net (193.218.105.12) port 21 (#0)
* Connected to ftp.caudium.net (193.218.105.12) port 21 (#0)
ping
< 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
< 220-You are user number 2 of 50 allowed.
< 220-Local time is now 09:03. Server port: 21.
< 220-Only anonymous FTP is allowed here
< 220 You will be disconnected after 15 minutes of inactivity.
> USER anonymous
ping
< 230-############################################################################
< 230-
< 230- W E L C O M E A S S O C I A T I O N K A Z A R F T P S E R V E R
< 230-
< 230-############################################################################
< 230-
< 230-This public FTP is repository of some OpenSource Projects and also a
< 230-public library.
< 230-
< 230-Please notice that bandwith is limited globaly not by sessions.
< 230-If you'd like to have more bandwith, please peer with us using Public IX.
< 230-To see where we can peer, please see http://as35189.net/, or have a look
< 230-at Panap, PouIX and GeIX IX pages.
< 230-
< 230-Also see our web site : http://kazar.net/
< 230-
< 230-Thanks
< 230-
< 230- Association KAZAR Team
< 230-
< 230 Anonymous user logged in
> PWD
ping
< 257 "/" is your current location
* Entry path is '/'
> CWD caudium
ping
< 250 OK. Current directory is /caudium
> CWD source
ping
< 250 OK. Current directory is /caudium/source
> EPSV
* Connect data stream passively
ping
< 229 Extended Passive mode OK (|||60138|)
* Trying 193.218.105.12...
* Connecting to 193.218.105.12 (193.218.105.12) port 60138
> TYPE A
< 200 TYPE is now ASCII
> LIST
* server response timeout
* Failure sending ABOR command: Timeout was reached
* Closing connection #0
---->8----

Discussion

  • Guido Berhoerster

    minimal example for reproducing

     
  • Daniel Stenberg

    Daniel Stenberg - 2012-10-29
    • priority: 5 --> 6
     
  • Daniel Stenberg

    Daniel Stenberg - 2012-10-29

    Thanks for your report, I've managed to repeat the problem...

     
  • Daniel Stenberg

    Daniel Stenberg - 2012-11-04
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks