-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 8.6.0 adds 1s delay for FTP SSL connections #12901
Comments
Thanks for the report. What I can see here is the regular curl 1 second check on transfers. As you see, the read after the 1sec returns The read shortly afterwards (probably triggered by a POLLIN) returns data and the TLS handshake continues. It looks like the server is slow responding. |
I see no additional second when trying |
It's not visible which FD it's trying to recv from. I guess it's read on the control vs read on the data channel?
FWICT it's the client. I was able to reproduce it with
The delay is caused by |
Sure! Using 476adfe:
It checks for POLLIN for FD 6 but then reads from FD 5. Full output
|
Thanks, that is very helpful! Could you check if #12913 fixes the issue for you? The problem was the during setup of the data connection, we stopped polling of the control. This leads to the 1 second timeout until curl auto-checks control again and sees the data from the server. This only stalls transfers if the server stalls the TLS handshake while it is still working on control. |
Works! 🎉
You mean that vsftpd waited until control data was sent before proceeding with the handshake on the data connection? |
I did this
time curl -k -l --ssl-reqd ftp://127.0.0.1
I expected the following
With 8.5.0 it's always below 0.1s:
With 8.6.0 or git master it's reproducably 1s slower:
Looking at the
--trace-config all --trace -
output, the delay happens during the control channel handshake:Unfortunately it appears to be a bit fragile: It is not reproducible when using
localhost
instead of127.0.0.1
(I guess because of SNI) or when using strace (which slows down syscalls slightly). git bisect points to a0f9480.curl/libcurl version
curl 8.6.0-DEV (x86_64-suse-linux-gnu) libcurl/8.6.0-DEV OpenSSL/3.1.4 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.4)
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli HSTS HTTPS-proxy IDN IPv6 Largefile libz NTLM PSL SSL threadsafe TLS-SRP UnixSockets zst
operating system
openSUSE Tumbleweed
The text was updated successfully, but these errors were encountered: