-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
HTTP/2 stress test TaskCanceledException when client hasn't cancelled #42472
Comments
Tagging subscribers to this area: @dotnet/ncl |
Yeah, this is ugly. We should be reporting some sort of exception here that indicates the server sent us a GOAWAY that killed these requests. Otherwise it's super confusing. |
I believe there is another case where you can get The client sends the headers first, after that it kicks off two tasks, one for sending the data frame and one for reading response headers. An RST_FRAME can be received by the client due to a stream limit being hit on the server which should cause a retry but |
The root cause of this issue is the same as #42200, but it seems this is more about a proper error reporting than fixing the root cause itself. |
) If server sends `GO_AWAY` to client, `Http2Connection` handles it and sets a correct `Http2ConnectionException` to `_resetException` field followed by resetting all active Http2Streams. Each of these streams is expected to rethrow that `_resetException` to communicate the original protocol error to the application code. However, the method `Http2Stream.SendDataAsync` currently doesn't take into account that field, thus when it gets cancelled as part of a stream reset it just throws `OperationCanceledException` which doesn't contain any details. This PR fixes that and makes `Http2Stream.SendDataAsync` throw the original `Http2ConnectionException` wrapped by `IOException`. Fixes #42472
When a server receives DATA frame after RST (known issue #1510, probably caused by the same problem as #42200) it makes the connection faulted and sends GO_AWAY. On the client, the connections is getting closed, all the streams getting reset, triggering
Http2Stream._requestBodyCancellationSource
. This CTS will cancel ongoing request body withTaskCancelledException
eventually propagating out ofSendAsync
. This is magnified by #38774 that tried to propagate errors from faulty request content to the user, therefore is mostly visible inPOST ExpectContinue
stress test operation.The text was updated successfully, but these errors were encountered: