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
curl 7.77.0 proxy tunnel CONNECT busy loop waiting for reply #7155
Comments
Please give us a lot more details. What protocol, what components, what platform and most importantly: how can we reproduce. We cannot act on this issue until we get data. |
curl --proxy 'http://185.169.198.98:3128' 'https://www.google.com/favicon.ico' -o - >>/dev/null &
curl --proxy 'http://208.115.109.250:443' 'https://www.google.com/favicon.ico' -o - >>/dev/null &
curl --proxy 'http://165.22.81.30:42663' 'https://www.google.com/favicon.ico' -o - >>/dev/null &
curl --proxy 'http://157.230.103.189:40151' 'https://www.google.com/favicon.ico' -o - >>/dev/null &
curl --proxy 'http://150.136.178.43:80' 'https://www.google.com/favicon.ico' -o - >>/dev/null &
curl --proxy 'http://181.3.93.87:10809' 'https://www.google.com/favicon.ico' -o - >>/dev/null &
curl --proxy 'http://34.230.61.238:80' 'https://www.google.com/favicon.ico' -o - >>/dev/null &
curl --proxy 'http://54.166.131.99:80' 'https://www.google.com/favicon.ico' -o - >>/dev/null &
curl --proxy 'http://51.81.82.175:2003' 'https://www.google.com/favicon.ico' -o - >>/dev/null &
curl --proxy 'http://167.172.180.46:39898' 'https://www.google.com/favicon.ico' -o - >>/dev/null & the problem manifests itself when using HTTP proxy |
We need curl version |
curl -V the problem is not in the site, but when using an http proxy |
Ok. That's what i meant, is there one particular proxy causing the problem? This is going to be hard to debug unless we can isolate it to a single process. |
curl --proxy 'http://185.169.198.98:3128' 'https://www.google.com/favicon.ico' -o - >>/dev/null |
I can't reproduce this in Windows or Ubuntu. |
this is a public proxy, it does not work now, curl --proxy 'http://167.172.110.165:9090' 'https://www.google.com/favicon.ico' -o - >>/dev/null |
I get connection refused and no load |
for clarity, run in a loop
|
bisected to 51c0ebc socat tcp-listen:8000,reuseaddr,fork - Lines 184 to 188 in 6b951a6
Lines 141 to 155 in 6b951a6
the commit changed the logic by having multi check if http->sending is !=0 during CONNECT then assume we're still writing and wait for the socket to be writable instead of readable, whereas before it would just check if it was readable. i assume this was necessary to implement partial CONNECT send. however in the CONNECT init phase (TUNNEL_INIT) Curl_buffer_send is called which sends out the actual CONNECT to the server and then sets http->sending to HTTPSEND_BODY immediately afterward. so it just busy loops checking for write when it should actually be checking for read. @bagder |
... so that Curl_connect_getsock() will know how to wait for the socket to become readable and not writable after the entire CONNECT request has been issued. Regression added in 7.77.0 Reported-by: zloi-user on github Assisted-by: Jay Satiro Fixes #7155
the problem is not solved, curl still loads the cpu on version 7.76.1, the problem is not observed, all versions after loading the cpu 100%
|
curl loads the cpu, with many threads this is especially noticeable
on version 7.76.1 the problem is not observed
similar problem #5532
The text was updated successfully, but these errors were encountered: