Open DerekTBrown opened 1 week ago
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 https://github.com/grpc/grpc-go/blob/cf1fb0a6e81e30f7130bfb20fd40d7929c5d3363/internal/transport/http2_server.go#L1076-L1086
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 Server.Serve
.
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.
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: