Repository navigation
Description
Is there an existing issue for the same bug?
- I have checked the existing issues.
Searched for the exact test name, proxy.remote, and localLockTableProxy race; no matching open issue was found.
Branch Name
issue-32014-main (PR #32230); the affected pkg/lockservice tree is identical to main at the base commit below.
Commit ID
- Failing CI:
bd623d55c358f0f453acbe06497569bb217ca169 - Verified main base:
007dd57a6192a6fb7348e45a973fb784d2d5ae67
Other Environment Information
- CI: Ubuntu/x86, Go 1.27.1, race-enabled UT.
- Job: https://github.com/matrixorigin/matrixone/actions/runs/42030672399/job/127256131069
- Command:
make ut UT_CONFIGURED=1 UT_PARALLEL=8 UT_TIMEOUT=40 UT_SHARD=all - Local baseline probe: macOS arm64, Go 1.27.1, clean isolated main worktree.
Actual Behavior
TestProxySurvivorUnlockReleasesLostHandoffHolder fails with two race reports. The test directly replaces a published proxy's remote interface while the background keeper may read it:
WARNING: DATA RACE
Read:
(*localLockTableProxy).getBind lock_table_proxy.go:565
(*lockTableKeeper).keepIdleRemoteRoutes idle_route.go:84
(*lockTableKeeper).keepRemoteLock lock_table_keeper.go:142
Previous write:
TestProxySurvivorUnlockReleasesLostHandoffHolder.func1
lock_table_proxy_test.go:1212
A second report reads the newly published recordingUnlockTable through its embedded getBind() while racing with the test's initialization at line 1211. The reported test duration was 1.68s, at approximately 2026-11-05 13:07:06–13:07:08 UTC.
Expected Behavior
Fault injection and recording in the test should not race with background service tasks. Publication and access must have a valid synchronization relationship; passing quickly before the keeper runs is not a synchronization guarantee.
Steps to Reproduce
With matching native artifacts, run the exact test under the race detector:
GOTOOLCHAIN=go1.27.1 .agents/skills/mo-dev/scripts/mo-cgo-test \
-race -count=100 -timeout=120s \
-run '^TestProxySurvivorUnlockReleasesLostHandoffHolder$' ./pkg/lockserviceReproduction limit: this command passed 100 repetitions on the clean local main baseline; the single-test race measurement was only 0.02s. The observed failure is the linked CI run, not a claimed local reproduction. The keeper uses a periodic timer, so the much shorter local execution does not establish safety.
Additional information
git diff main <failing-sha> -- pkg/lockserviceis empty; PR fix(plan): push outer pagination into derived-table sorts #32230 changes planner/compile pagination and SQL regressions, not this lockservice test or keeper.- Both CI race reports identify the test's mutable remote-wrapper injection/publication, not a SQL pagination call path.
- Please make the injection safe for concurrent keeper access (for example, a stable wrapper with properly synchronized test controls), rather than adding sleeps, suppressing race detection, or locking only the write while leaving readers unsynchronized.
- The failed UT job is being rerun separately; rerun success would not resolve this race report.
Activity
XuPeng-SH commentedon Nov 6, 2026
Implemented in the single consolidated PR #32307, commit
eb75f951585da1e7d2a3e232fb4b407ac00282d5.The fixture now installs one stable Unlock wrapper before publishing the remote proxy. Synchronized controls inject lost requests/responses without replacing
proxy.remoteafter publication; all five related real-owner handoff/retry scenarios are preserved. No production mutex or timing workaround was added. The original issue-named test also runs a concurrent published-table/getBind scan; deliberately restoring one unsafe interface write makes that exact test fail with a race report.The same 690 lockservice tests passed in normal and race modes. All 18 changed concurrency roots passed their separate measured-budget race commands (1,597 repetitions total). Thirteen existing rolling-restart scenarios reuse the short-mode heartbeat setting and retain all state/error assertions, reducing the matched local full-package race sample from 58.668 to 42.592 seconds. Incremental vet, pinned molint and configured golangci-lint passed. CI for the pushed revision is pending; keep this issue open until the containing PR merges.
fix: consolidate stopped-upgrade cleanup and stabilize CI (#32307)