-
-
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
curl hangs on h2c GET #192
Comments
Thanks! Can you repeat this problem against a public URL or do we need to run a local version of mod_h2? |
One of these days I have to setup a public mod_h2 installation, but currently I do not have one. You could try to build the sandbox or wait until you are back from vacation. Now that I know the nature of the problem, I just disabled the affected test cases and can continue working. |
I tried mod_h2-0.4.2 with latest curl + nghttp2 both on debian machine, upgrade worked fine. |
Well, unfortunately, it seems not so simple. I had the effect also when the client and server ran on the same ubuntu image. Only tcpdump did not work so nicely then. The problem was originally reported by another dev working on another ubuntu image. It seems timing sensitive. The slower the machine (less CPU core, more detailed logging) the more often it happens. That is why I suspected some flush behaviour where the ACK frame lingers in some buffer somewhere.... The nghttp client always works in all my configurations. It's really the SETTINGS+ACK from the client to the server that is not happening and everything stalls. Or so I read it. I was on it the whole yesterday and today and my brain is a bit foggy... |
You are right, this is timing dependent. |
Tatsuhiro-sama, that's it! The SETTINGS is indeed sent before the preface arrives. Champagne! :-D
bytes GmbH |
PR #194 |
It works like a dream. All go for pull from my side. |
Previously in Curl_http2_switched, we called nghttp2_session_mem_recv to parse incoming data which were already received while curl was handling upgrade. But we didn't call nghttp2_session_send, and it led to make curl not send any response to the received frames. Most likely, we received SETTINGS from server at this point, so we missed opportunity to send SETTINGS + ACK. This commit adds missing nghttp2_session_send call in Curl_http2_switched to fix this issue. Bug: #192 Reported-by: Stefan Eissing
PR #194 has been merged, case closed! |
Previously in Curl_http2_switched, we called nghttp2_session_mem_recv to parse incoming data which were already received while curl was handling upgrade. But we didn't call nghttp2_session_send, and it led to make curl not send any response to the received frames. Most likely, we received SETTINGS from server at this point, so we missed opportunity to send SETTINGS + ACK. This commit adds missing nghttp2_session_send call in Curl_http2_switched to fix this issue. Bug: curl#192 Reported-by: Stefan Eissing
Testing mod_h2 with curl reduced my overall hair count over the last two days. Fortunately, it also made me learn things about tcpdump and wireshark,
The culprits:
curl 7.42.0-DEV (x86_64-unknown-linux-gnu) libcurl/7.42.0-DEV OpenSSL/1.0.1f zlib/1.2.8 nghttp2/0.7.9
andcurl 7.41.0 (x86_64-apple-darwin14.1.0) libcurl/7.41.0 OpenSSL/1.0.2a zlib/1.2.8 nghttp2/0.7.9
with command line:
curl -v --http2 http://10.211.55.19:12345/index.html
from osx to ubuntu andcurl -v --http2 http://10.211.55.2:12345/index.html
from ubuntu to osx.The client on OSX works fine as show in this wireshark shot:
The client on Ubuntu however does not send anything after the HTTP2 preface. Just silent, no ACK for the SETTINGS from the server:
At this point the connection just hangs as the server is unwilling to send the response before an ACK to the SETTINGS. Is there a flush missing somewhere maybe?
The text was updated successfully, but these errors were encountered: