-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
libcurl 7.88.0 - Connection failed maybe due to the refactor of detecting if a connection is dead. #10646
Comments
@SendSonS what platform are you running on? |
- refs curl#10646 where reuse was attempted on closed connections in the cache, leading to an exhaustion of retries on a transfer - the mistake was that poll events like POLLHUP, POLLERR, etc were regarded as "not dead". - change cf-socket filter check to regard such events as inidication of corpsiness. - vtls filter checks: fixed interpretation of backend check result when inconclusive to interrogate status further down the filter chain.
Thanks for the report and the logs. Could your check that #10652 fixes the problem for you as well? |
I assume the requests involved use |
Please find in #10690 my latest fix for putting a lid not this issue. Background: the refactoring from 7.87 to 7.88 failed to properly preserve the handling of pending input on connection reuse. For For https: connections the most common case of pending input is a TLS notify close message, e.g. the server was done with it. The PR restores the previous way of checking for this. |
@SendSonS could you try the current master? |
Thanks! We're keen on updating curl to v7.88, but this issue makes us a little hesitant since we have a number of users who use proxy servers. Will there be a curl 7.88.2 with this fix? |
The next release is 8.0.0, due in 6 days. |
- refs curl#10646 where reuse was attempted on closed connections in the cache, leading to an exhaustion of retries on a transfer - the mistake was that poll events like POLLHUP, POLLERR, etc were regarded as "not dead". - change cf-socket filter check to regard such events as inidication of corpsiness. - vtls filter checks: fixed interpretation of backend check result when inconclusive to interrogate status further down the filter chain. Reported-by: SendSonS on github Fixes curl#10646 Closes curl#10652
With libcurl 7.88.0/7.88.1, we sometimes encountered this issue, that the sending request was 'Expire cleared', it tried to reuse connections but ' Connection died, tried 5 times before giving up'.
Refer to the attached logs:
logs_libcurl_7_87_0.txt
logs_libcurl_7_88_0.txt
There're 6 connections in the cache but they are all dead.
With 7.87.0, when handling a new request, it fount that the connection is already dead before sending data (Connection 2 seems to be dead), then it remove all dead connections.
With 7.88.0, when handling a new request, it did not remove any dead connection before sending data, but failed to send data (we are done reading and this is set to close, stop send), then it retry the next died connection (Connection died, retrying a fresh connect (retry count: 1), finally it failed after retried with 5 times.
We checked the history and found that, before
create_conn
it willprune_dead_connections
, the detecting method was changed at here:71b7e01#diff-a8a54563608f8155973318f4ddb61d7328dab512b8ff2b5cc48cc76979d4204c
Looks like it cannot find the connection that is already dead before sending data.
The text was updated successfully, but these errors were encountered: