Skip to content

[Bug]: race UT TestIssue4007 intermittently fails remote lock retry #30243

Closed

Description

@iamlinjunhong

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Searched open and recently closed issues for TestIssue4007 and lock table bind changed. No issue covers this exact failing case and retry assertion. Open #29447 concerns DROP DATABASE after CN scale-down, while #30229 concerns prepared result metadata; neither matches this failure.

Branch Name

fix/30148-empty-rollup; comparison uses clean official main.

Commit ID

Failure and PR comparison: 80f832400fb83cb99fa9feda3e00af50c46673c2.
Official-main comparison: 14686eb61cc510ff456951b946e8e33496806320.

Other Environment Information

  • CI: Linux/x64, Go 1.27.1, race detector, matrixone_test, CGo enabled. Command: make ut UT_CONFIGURED=1 UT_PARALLEL=6 UT_TIMEOUT=40 UT_SHARD=all.
  • Focused comparisons: macOS/arm64, Go 1.27.1, verified platform-native artifacts, same race/tags/short/CGo mode. The 180-second package timeout is only a hang guard; the test's one-second allocator timeout and immediate retry remain unchanged.

Actual Behavior

PR #30169 failed UT job 116122596223, run 38642888073 attempt 1. CI Required job 116156193583 propagates that producer failure (matrixone-ci: failure).

The failed test intentionally installs a stale remote binding, expects its first remote lock to fail with ErrLockTableBindChanged, then expects the immediate retry to succeed. CI instead returns the same error from the retry:

TestIssue4007
service_test.go:1835: Received unexpected error:
    lock table bind changed
--- FAIL: TestIssue4007 (2.04s)

The preceding trace shows stale-bind handling, failed remote lock/keepalive with lock table bind changed, and reopening the remote binding. The normalized signature is pkg/lockservice.TestIssue4007 / immediate remote retry / unexpected ErrLockTableBindChanged. Scheduling or binding reconciliation is a candidate mechanism; the root cause is not yet established.

Expected Behavior

The stale-binding scenario should complete the documented retry contract deterministically, including under the race CI mode.

Steps to Reproduce

With repository-verified native artifacts, run on the PR head and a clean official-main worktree:

.agents/skills/mo-dev/scripts/mo-cgo-test -race -tags matrixone_test -short -vet=off -p 2 -count=3 -timeout=180s -v -run '^TestIssue4007$' ./pkg/lockservice
  • PR exact head: 3/3 pass, each test 0.01s; package 1.789s.
  • Clean official main: 3/3 pass, each test 0.01s; package 1.922s.

The first local main invocation stopped during compilation with No space left on device, before executing any test. Go removed its temporary build directory; the identical command then completed successfully using the populated compilation cache. The failed compilation is retained separately and is not counted as a test run.

Local receipts: pr30169-ebc9829b-{failed,prhead-race,main-race,main-race-retry}.log, plus log-audit and comparison-results JSON artifacts in the task temporary directory. The main worktree was verified clean before and after execution.

Additional information

The four non-PR flaky-candidate checks are closed:

  1. Complete terminal failed-job logs were downloaded and inspected (8572 lines, 2382210 bytes, SHA-256 80c32393ec1df075db38ea354f50e6429ca76187fd9bd5336e7b264652f1d9b1). The only failed test root is TestIssue4007. There is no compiler/type/static/security failure, timeout panic or race-detector report. CI Required is the dependent summary, not a separate product failure.
  2. The exact PR head passes the complete named test three consecutive times in the same race/tags/short/CGo mode.
  3. The full PR diff changes only planner ROLLUP/SAMPLE/count-guard logic and its tests. go list -test -deps -tags matrixone_test ./pkg/lockservice has no intersection with the changed Go packages. The test constructs lock services directly through the runtime/reuse fixture; it does not invoke SQL, grouping expansion, SAMPLE or the changed planner. The lockservice, common runtime/reuse and MORPC source trees are identical between the PR head and the clean main comparison; the CI harness is untouched.
  4. The clean current official main passes the identical focused command three consecutive times. Not reproducing this assertion in these controls is the expected flaky-candidate result; it does not establish a particular product root cause.

The same exact head also passed UT Coverage, SCA, the shared build and both Compose BVT producers. Prior exact-head planner/DML/public-SQL validation remains valid for the PR's unchanged business patch.

No unrelated product code is changed to force CI green. After recording this issue, one failed-jobs rerun of run 38642888073 is planned. If the same signature recurs, collect new comparison evidence and reassess rather than repeatedly rerunning.

Activity

  1. added 5 commits that reference this issue on Oct 15, 2026
    bd808d0
    8a10cab
    acc293f
    d4d067c
    9149593
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions