tikv / tikv/pd

`TestTSOStreamBasic` panic

Open
#9,809 1 comment 0 reactions 0 assignees View on GitHub
type/ci
Dominant language
Go
Stars
1.2k
Forks
783
Avg merge
5d 21h
Merged PRs (30d)
36

Description

## Flaky Test

### Which jobs are failing
```
[2025/10/10 04:05:49.316 +00:00] [INFO] [stream.go:359] ["tsoStream.recvLoop ended"] [stream=mock:///-4] [error="context canceled"] [errorVerbose="context canceled\ngithub.com/tikv/pd/client/clients/tso.(*tsoStream).recvLoop\n\t/home/runner/work/pd/pd/client/clients/tso/stream.go:427\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.23.12/x64/src/runtime/asm_amd64.s:1700"]
[2025/10/10 04:05:50.381 +00:00] [INFO] [stream.go:359] ["tsoStream.recvLoop ended"] [stream=mock:///-5] [error="[PD:client:ErrClientTSOStreamClosed]encountered TSO stream being closed unexpectedly"] [errorVerbose="[PD:client:ErrClientTSOStreamClosed]encountered TSO stream being closed unexpectedly\ngithub.com/tikv/pd/client/clients/tso.(*tsoStream).recvLoop\n\t/home/runner/work/pd/pd/client/clients/tso/stream.go:425\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.23.12/x64/src/runtime/asm_amd64.s:1700"]
[2025/10/10 04:05:50.442 +00:00] [INFO] [stream.go:359] ["tsoStream.recvLoop ended"] [stream=mock:///-6] [error="mock rpc error"] [errorVerbose="mock rpc error\ngithub.com/tikv/pd/client/clients/tso.(*testTSOStreamSuite).TestTSOStreamBasic\n\t/home/runner/work/pd/pd/client/clients/tso/stream_test.go:352\nreflect.Value.call\n\t/opt/hostedtoolcache/go/1.23.12/x64/src/reflect/value.go:584\nreflect.Value.Call\n\t/opt/hostedtoolcache/go/1.23.12/x64/src/reflect/value.go:368\ngithub.com/stretchr/testify/suite.Run.func1\n\t/home/runner/go/pkg/mod/github.com/stretchr/testify@v1.9.0/suite/suite.go:202\ntesting.tRunner\n\t/opt/hostedtoolcache/go/1.23.12/x64/src/testing/testing.go:1690\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.23.12/x64/src/runtime/asm_amd64.s:1700\ngithub.com/tikv/pd/client/clients/tso.(*tsoStream).recvLoop\n\t/home/runner/work/pd/pd/client/clients/tso/stream.go:427\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.23.12/x64/src/runtime/asm_amd64.s:1700"]
panic: unreachable

goroutine 143 [running]:
github.com/tikv/pd/client/clients/tso.(*testTSOStreamSuite).TestTSOStreamBasic.func1({0x4?, 0x18?, 0x422500?, 0xc0?}, 0x2?, {0x2?, 0xc000b01770?})
/home/runner/work/pd/pd/client/clients/tso/stream_test.go:360 +0x2b
github.com/tikv/pd/client/clients/tso.(*tsoStream).recvLoop.func1()
/home/runner/work/pd/pd/client/clients/tso/stream.go:365 +0xc2a
github.com/tikv/pd/client/clients/tso.(*tsoStream).recvLoop(0xc000ab8800, {0x1763290, 0xc000aac960})
/home/runner/work/pd/pd/client/clients/tso/stream.go:451 +0xca5
created by github.com/tikv/pd/client/clients/tso.newTSOStream in goroutine 142
/home/runner/work/pd/pd/client/clients/tso/stream.go:255 +0x512
FAIL github.com/tikv/pd/client/clients/tso 6.968s
```

### CI link
https://github.com/tikv/pd/actions/runs/18396029105/job/52415637348?pr=9807

### Reason for failure (if possible)

### Anything else

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.