-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix HTTP/2 race condition with concurrent window update #38065
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
Conversation
If a window update is received from the server between the time when we were creating an Http2Stream (initializing its available credit with the current initial window size) and when we stored the stream into the streams dictionary, we might miss out on updating the stream's window size, which could in turn lead to stalls.
|
Tagging subscribers to this area: @dotnet/ncl |
|
I'm guessing this is hard to unit test. Since testing is hard, what about adding this scenario - POSTing large content with the request - be added to the HttpClient stability tests? I don't think it needs to be done now, but an issue to follow up later might be a good idea. |
We have such tests for that. The only way I was able to repro this fairly consistently was artificially slowing it down so much that there was a large enough time window between two lines of code pretty close to each other such that a specific response from the server could sneak in between them. We do have stress tests, but I don't think they're currently running regularly. @alnikola, would you know? |
|
@stephentoub We have HttpStress and SslStress pipeline running nightly and on demand. You can you use the following command to run them on PR.
|
|
@alnikola, where do I see/ how do I navigate to the logs for the most recent runs? |
|
You can find them here: Please note however, that stress infra was broken for a while and have been fixed only today by #35011 So, if you need fresh results, I'd suggest to run them explicitly on this PR. |
I actually wanted to see if they flag the issue this is fixing, so running then on this PR won't help. I'll run them locally.
Thanks. How does someone discover those? Are they linked from somewhere? |
Unfortunately, currently there are no any dashboards available. |
If a window update is received from the server between the time when we were creating an Http2Stream (initializing its available credit with the current initial window size) and when we stored the stream into the streams dictionary, we might miss out on updating the stream's window size, which could in turn lead to stalls.
@JamesNK, this addresses the repro for the hang I observed. Hopefully it's the same one you're seeing :)
Fixes dotnet/aspnetcore#22101
cc: @JamesNK, @geoffkizer