Skip to content

[Bug]: TestIssue26114LegacyCrossAccountMetadataCountsTowardTargetQuota loses HAKeeper connection #26441

Closed

Description

@ck89119

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main

Commit ID

c32538b

Other Environment Information

  • Hardware parameters: GitHub Actions Ubuntu/x86 runner
  • OS type: Linux/amd64
  • Others: MatrixOne ALL CI, UT job 90771135520

Actual Behavior

TestIssue26114LegacyCrossAccountMetadataCountsTowardTargetQuota failed while
creating the target account:

Error 1105 (HY000): writeto tcp4 127.0.0.1:50668->127.0.0.1:15220:
read tcp4 127.0.0.1:50668->127.0.0.1:15220: read: connection reset by peer

Immediately before the assertion failure, the embedded cluster logged
LogService proposal timeouts, failed TN/CN heartbeats, and a reset HAKeeper
backend connection to 127.0.0.1:15220.

The failure was observed in PR #26407, whose diff only changes UPDATE/foreign
key planner code, planner tests, and foreign-key BVT cases. It does not change
this test or the account, embedded-cluster, HAKeeper, LogService, or MORPC
paths.

Expected Behavior

The authenticated embedded cluster should remain available, and the account
creation in the test should complete without losing the HAKeeper/LogService
connection.

Steps to Reproduce

  1. Run the pkg/tests/issues UT package in the MatrixOne CI environment.
  2. Execute
    TestIssue26114LegacyCrossAccountMetadataCountsTowardTargetQuota.
  3. Observe whether the embedded cluster resets the connection to port 15220
    during CREATE ACCOUNT.

Additional information

Activity

  1. self-assigned this
    on Jul 30, 2026
  2. added
    kind/bug
    severity/s0
    and removed on Jul 30, 2026
  3. LeftHandCold commented on Sep 6, 2026

    @LeftHandCold
    Collaborator

    2026/09/06 15:53:56.150128 +0000 ERROR cn-service frontend/session.go:2462 query trace status {"service": "0-cn-14001", "uuid": "0-cn-14001", "statement": "create account issue_26114_legacy_target ADMIN_NAME 'root' IDENTIFIED BY '******'", "status": "fail", "error": "writeto tcp4 127.0.0.1:49704->127.0.0.1:10020: read tcp4 127.0.0.1:49704->127.0.0.1:10020: read: connection reset by peer", "txn_info": "92164b0d154a214418d2c62a9c43fa8c:1788710032492721094-1", "session_info": "connectionId 56|127.0.0.1:33846|account sys:dump|goRoutineId 18063|migrate-goRoutineId 0|01a0776d-1455-7393-815c-f3356bf3965a", "role": "moadmin", "session_id": "01a0776d-1455-7393-815c-f3356bf3965a", "statement_id": "01a0776d-146b-79b5-b697-81fae38d47c1"}
    test_utils.go:534:
    Error Trace: /home/runner/_work/matrixone/matrixone/pkg/tests/testutils/test_utils.go:534
    /home/runner/_work/matrixone/matrixone/pkg/tests/issues/issue_26114_test.go:179
    /home/runner/_work/matrixone/matrixone/pkg/embed/testing.go:206
    /home/runner/_work/matrixone/matrixone/pkg/embed/testing.go:86
    /home/runner/_work/matrixone/matrixone/pkg/embed/testing.go:204
    /home/runner/_work/matrixone/matrixone/pkg/tests/issues/authenticated_cluster_test.go:32
    /home/runner/_work/matrixone/matrixone/pkg/tests/issues/issue_26114_test.go:152
    Error: Received unexpected error:
    Error 1105 (HY000): writeto tcp4 127.0.0.1:49704->127.0.0.1:10020: read tcp4 127.0.0.1:49704->127.0.0.1:10020: read: connection reset by peer
    Test: TestIssue26114LegacyCrossAccountMetadataCountsTowardTargetQuota

  4. added a commit that references this issue on Sep 7, 2026
    173b0b3
  5. iamlinjunhong commented on Nov 18, 2026

    @iamlinjunhong
    Contributor

    New CI recurrence tracked for PR #32878, exact head 8e010d79ec2e098b11a741051b10347ba84cf52e.

    Run https://github.com/matrixorigin/matrixone/actions/runs/44238893216, attempt 1:

    The complete failed-job log has one failing test, TestIssue26114LegacyCrossAccountMetadataCountsTowardTargetQuota in pkg/tests/issues/isolated. Stable signature at issue_26114_test.go:195:

    driver: bad connection
    exec failed: set role moadmin
    failed to get connection ID from HAKeeper: context deadline exceeded
    internal error: getConnID
    

    Raft proposal/heartbeat timeouts precede the failure. CI invoked make ut UT_CONFIGURED=1 UT_PARALLEL=8 UT_TIMEOUT=40 UT_SHARD=all; run_ut.sh uses -short -tags matrixone_test -race, CGO enabled. No compiler failure, race-detector report, or other failing assertion was found.

    Independent evidence for a non-PR flaky candidate:

    1. Exact PR head: Go 1.26.4, native CGO, mo-cgo-test -short -tags matrixone_test -race -v -count=3 -timeout=600s -run '^TestIssue26114LegacyCrossAccountMetadataCountsTowardTargetQuota$' ./pkg/tests/issues/isolated passed all three consecutive rounds (56.00s, 212.49s, 236.52s), exit 0.
    2. Clean current official target 4.2-dev, SHA 1920dc5c25758003315af6617b6ff6b37bf3fbf7: extracted using git archive inside the managed lane; all 8,884 tracked blobs verified against the commit. Built the same test with Go 1.26.4, go test -mod=readonly -c -short -tags matrixone_test -race, then ran that baseline binary with -test.short -test.v -test.count=3 -test.timeout=1200s -test.run '^TestIssue26114LegacyCrossAccountMetadataCountsTowardTargetQuota$'. All three consecutive rounds passed (124.40s, 76.60s, 53.07s), exit 0. Same lane-built native dependencies and absolute loader paths; no CGo source changes between the compared revisions. Local controls used macOS/arm64 and GOMAXPROCS=4; this does not reproduce Linux/x64 runner scheduling.
    3. Full PR diff leaves the failing case, embed harness, HAKeeper, LogService, MORPC, frontend/server.go and frontend/routine_manager.go unchanged. RoutineManager.Created calls getConnID before creating the Session or dispatching any SQL. The observed failure therefore occurs before the PR's SHOW authorization/role-query paths are reachable. The patch does not alter connection-ID allocation or its deadline.
    4. The exact head's own changed closure has passing SCA (job 134581712960), UT coverage (134581750256), both multi-CN BVT lanes, MongoDB and Iceberg E2E. The previous local authorization/role cleanup tests remain valid for this unchanged head.

    An earlier local three-round command had an insufficient 240-second combined outer budget: two rounds passed, then the third was stopped during cluster startup. Its stacks/logs were retained; the complete three-round verification above was rerun with a budget covering all rounds. No source or test assertions were changed. Raw logs remain in the task directory.

    This closed issue is used for recurrence tracking, not as the comparison proof; the new PR/base controls above provide that evidence. The original Linux failure was not reproduced locally. One failed-jobs rerun of run 44238893216 will now be requested. No unrelated product fix or issue lifecycle change is included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s0

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions