Skip to content

[Bug] [UT infra]: shared/embedded cluster fixtures die mid-run — bad-connection cascades fail whole test groups on unrelated PRs #32955

Closed

Description

@XuPeng-SH

Summary

During the 2026-11-19 survey of 15 failed MatrixOne ALL CI runs, a recurring pattern appears on three runs (all on PRs whose diffs are unrelated to the failing tests): one statement exceeds a deadline, the shared/embedded cluster fixture gets sealed/quarantined, and every subsequent statement fails with dead-connection errors — turning a single hiccup into multi-test reds.

Evidence 1 — run 44543473401 (branch fix/astra-meow-31816-runtime-recovery2): issues/TestIssue29133RoleRulesTrackRemoteChanges/scenario (112.71s)

Error: Received unexpected error: context deadline exceeded    (issue_29133_policy_refresh_test.go:70)
Error: Received unexpected error: driver: bad connection        (issue_29133_policy_refresh_test.go:51)
Error: Received unexpected error: sql: connection is already closed
MO_UT_SETUP fixture=shared-cluster phase=failed-test-seal generation=1 status=ready

(The scenario subtest deliberately injects subscribe-faults; the actual failure above is the fixture/cluster loss cascade, not the injected path.)

Evidence 2 — run 44530307222 (branch codex/issue-29150-cloned-starlark-procedure): 3 failures in one run, all connection-death flavored

  • issues/TestLoadRejectsDuplicatePrimaryKeys/procedure_session_policy_and_rollback: truncate table procedure_load → context deadline exceeded → driver: bad connection → sql: connection is already closed; fixture marker MO_UT_SETUP fixture=shared-cluster phase=failed-test-quarantine generation=1.
  • embed/TestIcebergSQLEngineEmbeddedHarness (30.59s): create embedded Iceberg tenant account: context deadline exceeded (last connection error: context deadline exceeded) + [mysql] packets.go:58 unexpected EOF.
  • multicn/TestDropAccountDuringAsyncIndexInit (152.11s): [mysql] packets.go:58 unexpected EOF.

Evidence 3 — run 44536000699 (branch codex/coverage-shanghai-standby — CI-config-only branch, by construction no product diff): embed/TestColumnsUpgradeWithoutEntryKeepsPredecessorDefinitions failed ⇒ fixture-side by elimination.

Likely same family (unverified text, same shape)

  • Run 44505920806 (CDC perf branch): simultaneous 8-test red cluster (isolated/TestSQLTaskRunBarrierAcrossDropAndRecreate, isolated/TestSQLTaskAlterAfterTriggerOnRealStorage, sqlintegration/TestCTEEvaluationIdentity ×4 subtests, sqlintegration/TestHiddenIndexUserAccess, sqlintegration/TestTemporalExplainIndexParity) on one machine.

Prior art (all closed)

Task

Harden the shared/embedded fixtures so one slow/failed statement cannot seal/quarantine the cluster out from under the remaining subtests: per-subtest retry/generation isolation, distinguishing slow-statement from dead-cluster before sealing, and/or fresh fixture generations for follow-on subtests.

Refs: #30453, #30657, #26522, #31146, #32745

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions