Skip to content

[Bug]: lockservice UT intermittently fails with morpc leaks and timeout assertion #26575

Closed

Description

@gouhongshen

Is there an existing issue for the same bug?

  • I searched open and closed issues for all three failing test names and the lockservice/morpc goroutine-leak signature; no matching issue was found.

Branch Name

main / PR head agent/issue-26056

Commit ID

f450bce519f192321bd6d22faf1744ac1fa27c73

Other Environment Information

Actual Behavior

The full Ubuntu/x86 unit-test job failed only in github.com/matrixorigin/matrixone/pkg/lockservice with three intermittent failures:

  1. TestIssue5176 reports leaked morpc.remoteBackend / goetty read and write goroutines after the test completes.
  2. TestUnlockInRollingRestartCN reports the same class of leaked RPC/server goroutines after the rolling-restart scenario.
  3. TestCheckTxnTimeout fails require.True at pkg/lockservice/service_test.go:2501 after the timeout path runs.

The failures are unrelated to PR #26570: that PR changes only pkg/frontend/data_branch_output*.go and git4data BVT files, while the earlier full UT run on the exact same head succeeded. The later run failed exclusively in pkg/lockservice.

Expected Behavior

pkg/lockservice unit tests should deterministically close their RPC/server resources and satisfy timeout assertions when run as part of the full Ubuntu/x86 suite.

Steps to Reproduce

  1. Check out f450bce519f192321bd6d22faf1744ac1fa27c73.
  2. Run the repository's full Ubuntu/x86 unit-test workflow (make ut through MatrixOne ALL CI).
  3. Inspect the pkg/lockservice report for:
    • TestIssue5176
    • TestCheckTxnTimeout
    • TestUnlockInRollingRestartCN

The failure is intermittent: the earlier workflow on the exact commit passed, while run 30709458052 attempt 1 failed.

Additional information

The failing log records FAIL_UT_CASES=TestIssue5176,TestCheckTxnTimeout,TestUnlockInRollingRestartCN. The leak stacks include pkg/common/morpc/backend.go (writeLoop, readLoop, fetch), pkg/common/morpc/server.go:startWriteLoop, and goetty connection reads. This issue tracks both observed failure modes from the same pkg/lockservice package run so the evidence is not lost when the unrelated PR workflow is rerun.

Activity

  1. self-assigned this
    on Aug 1, 2026
  2. added
    kind/bug
    severity/s0
    ai-easy
    and removed on Aug 1, 2026
  3. added a commit that references this issue on Aug 3, 2026
    bfcf0a3
  4. added 3 commits that reference this issue on Sep 17, 2026
    bc37d0d
    9212f4f
    9f2de65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ai-easykind/bugseverity/s0

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions