runtime: [Regression] Header value duplicated
I am running the Grpc.Net.Client tests on .NET 6. I have noticed some intermittent errors caused by SocketsHttpHandler
returning two values for an HTTP/2 header that should only ever have one value.
Headers in the client (note the duplicate “14” values):
I have confirmed the server is only returning the header once:
This error is intermittent. Is it a thread-safety/race condition?
Wireshark trace: duplicate-footer-value.zip
.NET SDK (reflecting any global.json):
Version: 6.0.100-preview.6.21328.10
Commit: 2630e4ccfe
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 20 (20 by maintainers)
Commits related to this issue
- Use HttpHeaders.NonValidated in .NET 6 — committed to JamesNK/grpc-dotnet by JamesNK 3 years ago
It can’t validate them as part of giving access to them?
Can you elaborate on why gRPC ends up consuming the headers concurrently? I’m glad you’re using NonValidated; it’s better for perf. But technically it has the same issue, and the fact that it works concurrently today is an implementation detail we don’t actually guarantee. We could choose to document it as such, but I’m hesitant to do so as it can back us into a corner.
Interesting analysis and find @MihaZupan! If it is true, then we should consider where to do the fix … in gRPC or try to provide similar (unintended) guarantees in .NET Core … @JamesNK @stephentoub @geoffkizer what do you think?