You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What operating system (Linux, Windows, …) and version?
linux/amd64
What did you do?
I started to play with envoy proxy and based on some configurations that I had to do for grpc streaming services for clients such as specifying context.WithTimeout in order for envoy to pickup "grpc-timeout" header and resets router timeout there. I had very hard time troubleshooting this issue and it is reproducible.
client side:
infinity := time.Duration(math.MaxInt64)
ctx, close := context.WithTimeout(somectx, infinity)
defer close()
c := pb.NewMessageEventServiceClient(conn)
stream, err := c.Events(ctx, &pb.MessageEventRequest{})
...
Using infinity timeout is causing the context deadline (deadline, ok := ctx.Deadline()) at the server to receive as "1726-07-03" back in time, and of course closing the connection.
If you use context.WithTimeout(somectx, time.Second*something) or any duration you like except math.MaxInt64, then everything works as expected.
What did you expect to see?
I expected to so context deadline as "2311-01-22".
What did you see instead?
Instead context deadline is "1726-07-03"
Thanks.
The text was updated successfully, but these errors were encountered:
Without digging in, this seems likely: 2562048H overflows int64. MaxInt64 -> Hours should be 2562047h47m16.854775807s. Because of the round-up, we overflow when converting back.
What version of gRPC are you using?
grpc-go/1.15.0
What version of Go are you using (
go version
)?go1.8.3
What operating system (Linux, Windows, …) and version?
linux/amd64
What did you do?
I started to play with envoy proxy and based on some configurations that I had to do for grpc streaming services for clients such as specifying context.WithTimeout in order for envoy to pickup "grpc-timeout" header and resets router timeout there. I had very hard time troubleshooting this issue and it is reproducible.
client side:
envoy request headers:
Using infinity timeout is causing the context deadline (deadline, ok := ctx.Deadline()) at the server to receive as "1726-07-03" back in time, and of course closing the connection.
If you use context.WithTimeout(somectx, time.Second*something) or any duration you like except math.MaxInt64, then everything works as expected.
What did you expect to see?
I expected to so context deadline as "2311-01-22".
What did you see instead?
Instead context deadline is "1726-07-03"
Thanks.
The text was updated successfully, but these errors were encountered: