-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
gRPC Server Sends RST_STREAM without trailers when TCP Reassembly occurs #7623
Comments
As the rst code is 0, it looks like the server successfully responded to the request. It seems strange that the gRPC Go server didn't write the HEADER frame with the trailer metadata. This is the code that handles writing the trailer before sending RST_FRAME with code 0 grpc-go/internal/transport/http2_server.go Lines 1076 to 1086 in cf1fb0a
I did find some issues related to the http handler transport:
@DerekTBrown are you using a http handler transport using ServeHTTP or a regular one using Server.Serve? |
@arjan-bal Thanks for the quick rely. This is using |
There is another code wherein an RST_STREAM with code 0 is sent when the server receives an RST_STREAM from the client first. This doesn't seem to be the case here. I can't figure out a reason why gRPC Go would not send the trailer just by analysing the code. @DerekTBrown can you please provide the gRPC Go server logs from the time this issue happens? See the docs for enabling logs. If you can provide a way to repro this issue, it would be even better. |
It may also be helpful to look at traffic for stream ID 0 which is used for connection level communication. If a GOAWAY received on stream 0, it can cause all other streams to terminate. |
To give you a sense of the cardinality of the issue, we see this ~8 times per day out of 3M requests to this particular service. This just happens to be a very stateful service where errors are difficult to manage. Given the request rate, it has been very hard to correlate the Looking at
Is there something in particular I should be looking for in the logs? |
I checked the code paths responsible for logs in #7623 (comment), but can't find a place where grpc Go returns RST_CODE 0 without trailers. I found this issue on the grpc-node repo with similar symptoms: grpc/grpc-node#2569 The envoy issue had the same symptoms as the one seen here, i.e. an RST_FRAME without a header frame. At this point I don't know where to look next. Let me check with other maintainers. |
@DerekTBrown : Are you seeing this behavior with a unary RPC or a streaming RPC? Thanks. |
Unary RPCs |
@DerekTBrown we don't have sufficient information to continue investigating. Can you try to repro the issue without envoy proxies b/w the client and server? |
What version of gRPC are you using?
v1.59.0
What version of Go are you using (
go version
)?1.22.0
What operating system (Linux, Windows, …) and version?
alpine 3.18
AMD64Error description
I have a
grpc-js
client that communicates with via anistio
service mesh to a service implemented using thegrpc-go
backend. The client observes an error:Upon inspection, I see that the gRPC server is sending
RST_STREAM
mid-response:I would expect to see gRPC server send a
HEADERS
message containing trailers indicating the cause of the failure.A few additional anecdotes:
The text was updated successfully, but these errors were encountered: