TestRegionsWithKillRequest is flaky
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 783
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 36
Description
## Flaky Test
### Which jobs are failing
- `PD Test / chunks (3, Unit Test(3))` on `tikv/pd#10625`
### CI link
- https://github.com/tikv/pd/actions/runs/24991614673/job/73318488117
- https://github.com/tikv/pd/pull/10625
### Reason for failure (if possible)
`tests/server/api TestRegionsWithKillRequest` itself passes, but the shard fails in `goleak` during cleanup.
The failing log shows `--- PASS: TestRegionsWithKillRequest (7.18s)` immediately before `goleak: Errors on successful test run: found unexpected goroutines`.
The leaked goroutines are in the TSO allocator shutdown path, including:
- `github.com/tikv/pd/pkg/tso.(*AllocatorManager).allocatorUpdater` blocked in `sync.WaitGroup.Wait`
- a child goroutine still running the etcd txn / save-timestamp path from `timestampOracle.UpdateTimestamp` -> `GlobalTSOAllocator.UpdateTSO`
This looks like a shutdown/cleanup race instead of an assertion failure in the test body.
### Anything else
- Observed on the 2026-04-28 rerun for `tikv/pd#10625`
- The PR only changes `OWNERS_ALIASES`, so the failure appears unrelated to the PR diff
- Duplicate searches with `TestRegionsWithKillRequest`, `goleak allocatorUpdater`, and `unexpected goroutines AllocatorManager` did not find a matching open issue
Contributor guide
Assessment
This issue has not been assessed yet.