-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
HTTP2 requests through multi interface might not properly finish #12971
Comments
As an additional note, the same behavior is observed even if the |
icing
added a commit
to icing/curl
that referenced
this issue
Feb 22, 2024
- refs curl#12971 - add the event bitmask to data->state.select_bits instead of overwriting them. They are cleared again on use.
Could you verify if #12972 fixes the issue for you? |
Yep, I can confirm that it fixes the issue. Thanks! |
Thanks for verifying. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I did this
The issue is observed after upgrading curl from 8.5.0 to 8.6.0.
Specifically, the behavior change is seen from d7b6ce6.
When issuing queries, we might not get the state change from PERFORMING to DONE.
The currently seen behavior on failure is*:
curl_multi_add_handle(...)
.drain_steam(...)
(https://github.com/curl/curl/blob/master/lib/http2.c#L212) is called.data->state.select_bits
is set toCURL_CSELECT_IN
.Curl_expire(data, 0, EXPIRE_RUN_NOW);
is called.epoll
returns the socket to be writable but not readable.curl_multi_socket_action(..., CURL_CSELECT_OUT, ...)
is called by the client.data->state.select_bits
is set toCURL_CSELECT_OUT
(overriding libcurl operation on step 2).CURLMOPT_TIMERFUNCTION
is called as a result of step 2.readwrite_data(...)
is not called becausedata->state.select_bits == CURL_CSELECT_OUT
andk->keepon == KEEP_RECV
.The currently seen behavior on success is*:
curl_multi_add_handle(...)
.drain_steam(...)
(https://github.com/curl/curl/blob/master/lib/http2.c#L212) is called.data->state.select_bits
is set toCURL_CSELECT_IN
.Curl_expire(data, 0, EXPIRE_RUN_NOW);
is called.CURLMOPT_TIMERFUNCTION
is called as a result of step 2.readwrite_data(...)
is called becausedata->state.select_bits == CURL_CSELECT_IN
andk->keepon == KEEP_RECV
.EndOfSteam
(EOS) /nread == 0
fromreadwrite_data(...)
.*The difference is whether
curl_multi_socket_action(..., CURL_CSELECT_OUT, ...)
orCURLMOPT_TIMERFUNCTION
is called first.The previous behavior is (< 8.6.0):
curl_multi_add_handle(...)
.drain_steam(...)
(https://github.com/curl/curl/blob/master/lib/http2.c#L212) is called.data->state.select_bits
is set toCURL_CSELECT_IN
.Curl_expire(data, 0, EXPIRE_RUN_NOW);
is called.multi_socket(...)
calls as step 2.curl_multi_socket_action(..., CURL_CSELECT_OUT, ...)
.From my understanding, the behavior change is the result of 2944e46.
I expected the following
Curl to always finish the request even if
curl_multi_socket_action(..., CURL_CSELECT_OUT, ...)
is called.curl/libcurl version
WARNING: this libcurl is Debug-enabled, do not use in production
curl 8.6.0-DEV (x86_64-cros-linux-gnu) libcurl/8.6.0-DEV OpenSSL/3.2.0 zlib/1.2.13 c-ares/1.19.1 libpsl/0.21.1 nghttp2/1.57.0
Release-Date: [unreleased]
Protocols: dict file http https ipfs ipns mqtt
Features: alt-svc AsynchDNS Debug GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL threadsafe TLS-SRP TrackMemory UnixSockets
operating system
ChromeOS
$ uname -a
Linux localhost 5.15.147-21486-g7e7afc4ef5b4 #1 SMP PREEMPT Tue, 16 Jan 2024 22:08:30 +0000 x86_64 Intel(R) Core(TM) i3-10110U CPU @ 2.10GHz GenuineIntel GNU/Linux
The text was updated successfully, but these errors were encountered: