-
Notifications
You must be signed in to change notification settings - Fork 1k
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
long headers from the server hang tonic #1834
Comments
On some level, the problem happens in h2:
|
This comment was marked as outdated.
This comment was marked as outdated.
Related issue: grpc/grpc-go#4265. I think that failing with an inscrutable error is not great, but would be fine. The real problem here is that somewhere along the way we're messing up the lifecycle of these requests. It's the hangs that aren't really okay. |
The client side closes the stream and then the request seems to get nothing, no error. Maybe one thing here is that the server should be rejecting the header that's too big given it's the one sending the size limit? Something is definitely messed up here, but I don't think I'll be able to debug it further right now. |
There is a bug such that if the client sends a response with a header value that exceeds the max_header_list_size, then RPCs just hang (hyperium#1834). When tonic upgraded to hyper 1, it picked up [hyper#3622] which changed the default from 16MiB to 16KiB for this configuration value. Error messages in gRPC use headers. That means that services which ever sent error messages in excess of 16KiB (including in their error details!) will just hang. This commit adds the ability for the client to configure this value to something larger (perhaps the old default of 16MiB) to mitigate the above-referenced bug. [hyper#3622]: hyperium/hyper#3622
This appears to be a hyper issue. I'll close this and open something over there. |
There is a bug such that if the client sends a response with a header value that exceeds the max_header_list_size, then RPCs just hang (#1834). When tonic upgraded to hyper 1, it picked up [hyper#3622] which changed the default from 16MiB to 16KiB for this configuration value. Error messages in gRPC use headers. That means that services which ever sent error messages in excess of 16KiB (including in their error details!) will just hang. This commit adds the ability for the client to configure this value to something larger (perhaps the old default of 16MiB) to mitigate the above-referenced bug. [hyper#3622]: hyperium/hyper#3622
Bug Report
Version
0.12.1
Platform
Linux pc 6.5.0-42-generic #42-Ubuntu SMP PREEMPT_DYNAMIC Mon Jun 10 09:28:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Description
Long error messages corrupt h2 streams in some way. I noticed this primarily because the upgrade in 9c1f2f9 / #1670 changed the default maximum header size from 16MiB to 16KiB. For bidirectional streaming, I first get the error message,
"h2 protocol error: http2 error"
, but later streams on that connection seem somewhat busted. For unary RPCs, it seems that even the first request just hangs as opposed to the client getting an error. When I've debugged this, I've found that the client resets the stream, but then things just hang.I've written a simple test that just hangs to demonstrate the issue:
tests/integration_tests/tests/status.rs
The text was updated successfully, but these errors were encountered: