-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
Area: ClientIncludes Channel/Subchannel/Streams, Connectivity States, RPC Retries, Dial/Call Options and more.Includes Channel/Subchannel/Streams, Connectivity States, RPC Retries, Dial/Call Options and more.Type: Bug
Description
What version of gRPC are you using?
v1.72.0
What version of Go are you using (go version
)?
v1.24.2
What operating system (Linux, Windows, …) and version?
Linux
What did you do?
In the ETCD integration test, there is a case that verifies the client receives a context canceled error when reading data from a streaming RPC and the context is subsequently canceled. The steps would be like
- Create a context with a one-second timeout (ctx).
- Use that ctx to initiate the streaming RPC, and start a new goroutine to read the stream and write received data into a pipe.
- The client sleeps for two seconds and then attempts to read from the pipe.
- NOTE: The background goroutine may read one message before timeout. https://github.com/etcd-io/etcd/blob/0a0fde11ace45eaf596862df35aae833b8e6d649/client/v3/maintenance.go#L284-L293
- The read should return a context canceled error.
# in etcd main branch
$ cd ./tests/integration/clientv3
$ go test -v ./ -count=10 --failfast -run TestMaintenanceSnapshotTimeout
What did you expect to see?
I should receice context canceled error
What did you see instead?
received rpc error: code = Internal desc = unexpected EOF
I can't reproduce this issue with v1.71.0 version. Right now, I found that
Line 676 in a43eba6
if err == io.EOF { |
Metadata
Metadata
Assignees
Labels
Area: ClientIncludes Channel/Subchannel/Streams, Connectivity States, RPC Retries, Dial/Call Options and more.Includes Channel/Subchannel/Streams, Connectivity States, RPC Retries, Dial/Call Options and more.Type: Bug