Repository navigation
Description
Is there an existing issue for the same bug?
- I have checked the existing issues. I searched open and closed
matrixorigin/matrixoneissues forTestIssue29133RoleRulesTrackRemoteChanges,issue_29133_policy_refresh_test.go,bad connectionandMO_UT_SETUP. The only occurrences of the test name are passing references in [Bug]: LOAD DATA IGNORE persists rows that violate CHECK constraints #30345 and [Bug]: TestBackupData2 coverage UT hangs retrying flush of a missing object #30412 (evidence lists from unrelated PRs where this test passed). [Bug]: Ubuntu race UT cancellation/running harness times out with live fixture processes #30309 tracks a different heavy-UT harness failure (runner harness timed out: exit status 92), and [Bug]: TestBackupData2 coverage UT hangs retrying flush of a missing object #30412 (closed) tracks aTestBackupData2hang; neither matches this connection-loss-during-fixture-lifecycle mode. No matching issue was found.
Branch Name
agent/issue-26996-af028d20 (PR #30617; the failure was first observed on this PR's exact-head CI)
Commit ID
- PR head:
dc0ead14627456d43536460709db3594ff66cd6e - merge base:
c7bd2e7c1d9ca53daf80d640b3b307902d54161c
Other Environment Information
- Workflow: MatrixOne ALL CI
- Event: pull_request (PR fix(disttae): prune unflushed composite CLUSTER BY reads in CN logtail replay state #30617)
- Run: 39379852775
- Failed job:
Matrixone CI execution / UT Test on Ubuntu/x86, job 118486280660, terminal failure completed 2026-10-20T07:11:11Z; the aggregateCI Requiredjob 118506639846 then failed on the same rollup. - Runner: Ubuntu x86_64, heavy-UT lane with embedded clusters, bounded parallelism 4 across
pkg/tests/*batches; heartbeat recordedmemory current=9.47 GB peak=17.18 GB max=17.18 GB,cpu.nr_throttled=1554,cpu.throttled_usec≈243.3 sand 17+ live test processes.
What failed
FAIL_UT_CASES=TestIssue29133RoleRulesTrackRemoteChanges, was the only failing test of the entire run (UNIT TESTING FAILED: go-test=1, analysis=0).
[mysql] 2026/10/20 06:41:36 packets.go:58 unexpected EOF
[mysql] 2026/10/20 06:41:36 packets.go:155 write tcp 127.0.0.1:54358->127.0.0.1:11160: write: broken pipe
issue_29133_policy_refresh_test.go:41:
Error Trace: /home/runner/_work/matrixone/matrixone/pkg/tests/issues/issue_29133_policy_refresh_test.go:41
Error: Received unexpected error:
bad connection
Test: TestIssue29133RoleRulesTrackRemoteChanges
issue_29133_policy_refresh_test.go:41 is the test-cleanup helper t.Cleanup(func() { require.NoError(t, db.Close()) }). In the same wall-clock second the job log records a connection-kill storm for the test's account (do kill connection account id 10003, connection id 27, 122..126) around a CDC do_update_task CancelRequested, immediately followed by fixture lifecycle statements MO_UT_SETUP fixture=shared-cluster phase=failed-test-seal generation=1 and MO_UT_SETUP fixture=embedded-cluster cluster_id=12001 pid=108113 phase=service-close ... hold=1m32.76s admission_release, so the pooled connection was severed by the surrounding teardown, and the deferred db.Close() surfaced bad connection. The body of the test had already exercised without assertion failure (its subtest TestIssue29133RoleRulesTrackRemoteChanges/rule_catalog_fault is recorded --- PASS: ... (0.11s) in the same execution). There is no panic, no SIGSEGV and no other failing test anywhere in the run.
Why this is not caused by the PR where it was observed
- The failing test and its file were introduced by the frontend role-rules refresh fix fix(frontend): refresh role rules across CN sessions #30400 (
7d93ece829,pkg/tests/issues/issue_29133_policy_refresh_test.go). PR fix(disttae): prune unflushed composite CLUSTER BY reads in CN logtail replay state #30617 is a CN disttae logtail-replay read-path change; its 22-file diff contains no file underpkg/tests/issues, nopkg/frontendfile, no CDC file and no runner/harness file. - In the same run, every package PR fix(disttae): prune unflushed composite CLUSTER BY reads in CN logtail replay state #30617 touches was green, including the PR's own regression
TestClusterReplayPublicAdmission(pass 0.73sin thepkg/tests/sqlintegrationbatch) and thelogtailreplay/readutil/disttaeunit packages; the run also passedSCA Test on Linux/arm64,UT Coverage on Ubuntu/x86,Coverage, both multi-CN BVT jobs and the shared build. - The previous head
57a03a91bfshows the same heavy-UT lane failing with a different, also unrelated test (TestCheckConstraintNamespace/repeatable_read_preserves_check_authoring, a catalog-namespace retry exhaustion), which the owner review of fix(disttae): prune unflushed composite CLUSTER BY reads in CN logtail replay state #30617 ran locally on both that exact head and the clean merge base with all 18 scenarios passing — the lane's failures move between unrelated, load-sensitive tests while the PR-owned tests stay green. - The failure mode is teardown-injected connection loss (server-side kills plus fixture
service-closereachable only from the runner), not any behavior the PR's production code can influence. - Honest limitation: this is a runner-internal race, so I could not deterministically reproduce it locally, and no local reproduction is claimed; the in-run subtest pass, the in-run PR-package results, and the cross-head/cross-PR passing evidence above are the record.
Disposition
- The single permitted rerun of the failed jobs of run
39379852775was requested after the run reached its terminal state (gh run rerun 39379852775 --failed). PR fix(disttae): prune unflushed composite CLUSTER BY reads in CN logtail replay state #30617'sCI Requiredgate depends on that rerun. - This issue is filed for the repository/harness owners: the heavy-UT runner appears to be able to retire an embedded/shared fixture generation (or its account sessions) while a test of
pkg/tests/issuesis still executing/cleaning up. If maintainers observe recurrence, the harness may need admission/liveness protection aroundMO_UT_SETUPservice-close/kill connectionphases, or the affected cleanup helper may need to toleratebad connectionat teardown.
Activity
XuPeng-SH commentedon Oct 20, 2026
Confirmed a test-owned cleanup ordering defect and submitted its correction in #30670. The earlier attribution to premature shared-fixture destruction is not established by the logs: a close assertion can itself cause the subsequent seal/service-close diagnostics.
The test deferred DROP ACCOUNT before outer
t.Cleanupclosed tenant DB/Conn/Stmt resources. Account removal can therefore kill its own still-open clients. Restoring this defer ordering with the same pool-at-DROP oracle deterministically reports seven live tenant pools before removal; reproducing the exact intermittent driver-close error is not claimed.The corrected child cleanup scope finishes while shared-fixture admission is still held. LIFO cleanup closes tenant resources before account removal, keeps admin access for removal verification, and checks fresh bounded failure-path rollback. An injected failure after BEGIN produces only its intentional error; rollback, pool closure and account-removal checks all succeed.
Complete issues normal/race passes (1,636 nodes each), as do five same-process race repetitions of the full role-refresh root. All existing text, binary/SQL-prepared, repeatable-read, remote-transition and catalog-fault checks remain. This issue is linked for closure when the PR merges.
Validation provenance: complete owner-package and counterexample receipts are from authored revision
7952ff8385. The same delivered test-file blobs are present at published merge909b988e5d, where dependency-specific normal/race, Group full-package and configured incremental SCA revalidation also pass; the PR description separates these receipts.test: fix transaction, context and resource ownership in UT fixtures (#…