Found by a customer: https://twitter.com/stevejgordon/status/1169995743568048129
This is a high impact bug. A user will cancel a streaming gRPC call on the client, but the server will never be notified. If the server is checking CancellationToken.IsCancellationRequested then it will hang open forever.
This is a regression of https://github.com/dotnet/corefx/issues/38391
Related: https://github.com/dotnet/corefx/issues/39049
Repro:
git clone https://github.com/JamesNK/grpc-dotnet.git
git checkout jamesnk/duplex-cancellation-regression
dotnet test test\FunctionalTests --filter Name~ServerStreaming_CancellationOnClient_SentToServer
Logic in the test is something like:
- Client makes a server streaming call to the server. This means the client is sending one message in the request's HttpContent, which then completes.
- Server streams multiple messages to the client
- Client triggers the cancellation token given to gRPC client. HttpClient.SendAsync token is canceled
- The HttpClient should be sending RST_STREAM to the server, and the server should report the call is canceled. This isn't happening so the server will stream messages forever.
Wireshark log: cancellation-regression.zip
Found by a customer: https://twitter.com/stevejgordon/status/1169995743568048129
This is a high impact bug. A user will cancel a streaming gRPC call on the client, but the server will never be notified. If the server is checking
CancellationToken.IsCancellationRequestedthen it will hang open forever.This is a regression of https://github.com/dotnet/corefx/issues/38391
Related: https://github.com/dotnet/corefx/issues/39049
Repro:
git clone https://github.com/JamesNK/grpc-dotnet.gitgit checkout jamesnk/duplex-cancellation-regressiondotnet test test\FunctionalTests --filter Name~ServerStreaming_CancellationOnClient_SentToServerLogic in the test is something like:
Wireshark log: cancellation-regression.zip