cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: FTP Upload problems with Multi interface

From: <koettermarkus_at_gmx.de>
Date: Sun, 16 Nov 2008 14:53:46 +0100

Daniel Stenberg wrote:
> Hm, that would then truly indicate a generic timeout bug. But I fail to
> see how the failure to read an FTP server response is due to a timeout
> flaw.

I increased the ftp-multi-upload.c select sleep timeout by 1 second, (we
are talking about timing issues all time, so it made sense to me).

Now I sometimes get a different behaviour:

wireshark:

sessiuon #0
------------------
...
PASV
227 Entering Passive Mode (192,168,53,25,74,211)
STOR file06
150 Ok to send data.
PASV
------------------

double passive, as requested by the bug reporter.

curl debug log:
pretty long, as I think one needs the previous transferrd file by the
connection as well.

WE USE URL(3) ftp://192.168.53.25/incoming/curl/file04
* STATE: INIT => CONNECT handle 0xb74858; (connection #-5000)
* Re-using existing connection! (#0) with host 192.168.53.25
* Connected to 192.168.53.25 (192.168.53.25) port 21 (#0)
* STATE: CONNECT => DO handle 0xb74858; (connection #0)
* Request has same path as previous transfer
* DO phase starts
> PASV
* FTP 0xb7dfb8 state change from STOP to PASV
* Connect data stream passively
* STATE: DO => DOING handle 0xb74858; (connection #0)
* STATE: PERFORM => DONE handle 0xb7d4c8; (connection #1)
* Expire cleared
* Remembering we are in dir "incoming/curl/"
< 226 File receive OK.
* Connection #1 to host 192.168.53.25 left intact
* STATE: DONE => COMPLETED handle 0xb7d4c8; (connection #-5000)
< 227 Entering Passive Mode (192,168,53,25,218,153)
* Trying 192.168.53.25... * Connecting to 192.168.53.25
(192.168.53.25) port 55961
* FTP 0xb7dfb8 state change from PASV to STOP
* DO phase is complete
* STATE: DOING => DO_MORE handle 0xb74858; (connection #0)
WE USE URL(4) ftp://192.168.53.25/incoming/curl/file05
* DO-MORE phase starts
* FTP 0xb7dfb8 state change from STOP to STOR_TYPE
> STOR file04
* FTP 0xb7dfb8 state change from STOR_TYPE to STOR
< 150 Ok to send data.
* FTP 0xb7dfb8 state change from STOR to STOP
* DO-MORE phase ends with 0
* STATE: DO_MORE => DO_DONE handle 0xb74858; (connection #0)
* STATE: INIT => CONNECT handle 0xb7d4c8; (connection #-5000)
* STATE: DO_DONE => WAITPERFORM handle 0xb74858; (connection #0)
* Re-using existing connection! (#1) with host 192.168.53.25
* Connected to 192.168.53.25 (192.168.53.25) port 21 (#1)
* STATE: CONNECT => DO handle 0xb7d4c8; (connection #1)
* Conn 0 recv pipe 1 inuse 0 athead 1
* STATE: WAITPERFORM => PERFORM handle 0xb74858; (connection #0)
* Request has same path as previous transfer
* DO phase starts
> PASV
* FTP 0xb7ea18 state change from STOP to PASV
* Connect data stream passively
* STATE: DO => DOING handle 0xb7d4c8; (connection #1)
* STATE: PERFORM => DONE handle 0xb74858; (connection #0)
* Expire cleared
* Remembering we are in dir "incoming/curl/"
< 226 File receive OK.
* Connection #0 to host 192.168.53.25 left intact
* STATE: DONE => COMPLETED handle 0xb74858; (connection #-5000)
< 227 Entering Passive Mode (192,168,53,25,102,173)
* Trying 192.168.53.25... * Connecting to 192.168.53.25
(192.168.53.25) port 26285
* FTP 0xb7ea18 state change from PASV to STOP
* DO phase is complete
* STATE: DOING => DO_MORE handle 0xb7d4c8; (connection #1)
WE USE URL(5) ftp://192.168.53.25/incoming/curl/file06
* DO-MORE phase starts
* FTP 0xb7ea18 state change from STOP to STOR_TYPE
> STOR file05
* FTP 0xb7ea18 state change from STOR_TYPE to STOR
< 150 Ok to send data.
* FTP 0xb7ea18 state change from STOR to STOP
* DO-MORE phase ends with 0
* STATE: DO_MORE => DO_DONE handle 0xb7d4c8; (connection #1)
* STATE: INIT => CONNECT handle 0xb74858; (connection #-5000)
* STATE: DO_DONE => WAITPERFORM handle 0xb7d4c8; (connection #1)
* Re-using existing connection! (#0) with host 192.168.53.25
* Connected to 192.168.53.25 (192.168.53.25) port 21 (#0)
* STATE: CONNECT => DO handle 0xb74858; (connection #0)
* Conn 1 recv pipe 1 inuse 0 athead 1
* STATE: WAITPERFORM => PERFORM handle 0xb7d4c8; (connection #1)
* Request has same path as previous transfer
* DO phase starts
> PASV
* FTP 0xb7dfb8 state change from STOP to PASV
* Connect data stream passively
* STATE: DO => DOING handle 0xb74858; (connection #0)
< 227 Entering Passive Mode (192,168,53,25,74,211)
* Trying 192.168.53.25... * Connecting to 192.168.53.25
(192.168.53.25) port 19155
* FTP 0xb7dfb8 state change from PASV to STOP
* DO phase is complete
* STATE: DOING => DO_MORE handle 0xb74858; (connection #0)
* DO-MORE phase starts
* FTP 0xb7dfb8 state change from STOP to STOR_TYPE
> STOR file06
* FTP 0xb7dfb8 state change from STOR_TYPE to STOR
< 150 Ok to send data.
* FTP 0xb7dfb8 state change from STOR to STOP
* DO-MORE phase ends with 0
* STATE: DO_MORE => DO_DONE handle 0xb74858; (connection #0)
* STATE: DO_DONE => WAITPERFORM handle 0xb74858; (connection #0)
* Conn 0 recv pipe 1 inuse 0 athead 1
* STATE: WAITPERFORM => PERFORM handle 0xb74858; (connection #0)
* STATE: PERFORM => DONE handle 0xb7d4c8; (connection #1)
* Expire cleared
* Remembering we are in dir "incoming/curl/"
< 226 File receive OK.
* Connection #1 to host 192.168.53.25 left intact
* STATE: DONE => COMPLETED handle 0xb7d4c8; (connection #-5000)
WE USE URL(6) ftp://192.168.53.25/incoming/curl/file07
* STATE: INIT => CONNECT handle 0xb7d4c8; (connection #-5000)
* Re-using existing connection! (#1) with host 192.168.53.25
* Connected to 192.168.53.25 (192.168.53.25) port 21 (#1)
* STATE: CONNECT => DO handle 0xb7d4c8; (connection #1)
* Request has same path as previous transfer
* DO phase starts
> PASV
* FTP 0xb7ea18 state change from STOP to PASV
* Connect data stream passively
< 227 Entering Passive Mode (192,168,53,25,138,217)
* Trying 192.168.53.25... * Connecting to 192.168.53.25
(192.168.53.25) port 35545
* FTP 0xb7ea18 state change from PASV to STOP
* DO phase is complete
* STATE: DO => DO_MORE handle 0xb7d4c8; (connection #1)
* DO-MORE phase starts
* FTP 0xb7ea18 state change from STOP to STOR_TYPE
> STOR file07
* FTP 0xb7ea18 state change from STOR_TYPE to STOR
< 150 Ok to send data.
* FTP 0xb7ea18 state change from STOR to STOP
* DO-MORE phase ends with 0
* STATE: DO_MORE => DO_DONE handle 0xb7d4c8; (connection #1)
* STATE: DO_DONE => WAITPERFORM handle 0xb7d4c8; (connection #1)
* Conn 1 recv pipe 1 inuse 0 athead 1
* STATE: WAITPERFORM => PERFORM handle 0xb7d4c8; (connection #1)
* STATE: PERFORM => DONE handle 0xb7d4c8; (connection #1)
* Expire cleared
* Remembering we are in dir "incoming/curl/"
< 226 File receive OK.
* Connection #1 to host 192.168.53.25 left intact
* STATE: DONE => COMPLETED handle 0xb7d4c8; (connection #-5000)
WE USE URL(7) ftp://192.168.53.25/incoming/curl/file08
* STATE: INIT => CONNECT handle 0xb7d4c8; (connection #-5000)
* STATE: PERFORM => DONE handle 0xb74858; (connection #0)
* Re-using existing connection! (#0) with host 192.168.53.25
* Connected to 192.168.53.25 (192.168.53.25) port 21 (#0)
* STATE: CONNECT => DO handle 0xb7d4c8; (connection #0)
* Expire cleared
* STATE: DONE => COMPLETED handle 0xb74858; (connection #-5000)
* Request has same path as previous transfer
* DO phase starts
> PASV
* FTP 0xb7dfb8 state change from STOP to PASV
* Connect data stream passively
* STATE: DO => DOING handle 0xb7d4c8; (connection #0)
WE USE URL(8) ftp://192.168.53.25/incoming/curl/file09

The transition for connection #0 DONE => COMPLETED seems to be part of a
timeout, as there is no 226 note in the log, but a "Expire cleared"
right infront.

MfG
Markus
Received on 2008-11-16