Repository navigation
Description
Is there an existing issue for the same bug?
- I have checked the existing issues.
Branch Name
main (observed in PR #27070's pull_request_target coverage run)
Commit ID
- PR head:
c2c6734b8ee95276de0222e81b52174ac13a8d74 - PR base:
6a29b7d47eae06b414cce51ede4a129b6da9b68a
Other Environment Information
- GitHub Actions workflow:
MatrixOne ALL CI, attempt 1 - Runner: Ubuntu 22.04, x86_64
- Go: 1.26.4
- Failed job:
Matrixone UT Coverage / UT Coverage on Ubuntu/x86 - Run: https://github.com/matrixorigin/matrixone/actions/runs/31624226073
- Job: https://github.com/matrixorigin/matrixone/actions/runs/31624226073/job/94206444254
- Diagnostic artifact: https://github.com/matrixorigin/matrixone/actions/runs/31624226073/artifacts/9153099629
Actual Behavior
pkg/embed.TestBasicCluster completes its functional assertions, but its t.Cleanup call to c.Close() returns bad connection at cluster_test.go:94:
cluster_test.go:94:
Error: Received unexpected error:
bad connection
Test: TestBasicCluster
--- FAIL: TestBasicCluster (20.42s)
Because failed shutdown retains the complete test-cluster admission token, every later test that needs a non-concurrent embedded cluster fails immediately with:
invalid state another complete test cluster is already active in this process
The coverage report recorded 18 failed tests in pkg/embed: the first shutdown failure and 17 cascading admission failures. The package failed after 50.311 seconds. The downstream Matrixone Utils CI / Coverage job then failed only because a required producer had failed:
coverage merge skipped because at least one required producer was skipped or failed
Expected Behavior
Closing a successfully started test cluster should reliably drain services without returning a transient database connection error. A cleanup error should not poison every remaining embedded-cluster test in the process.
Steps to Reproduce
- Check out
mainat6a29b7d47eae06b414cce51ede4a129b6da9b68aor inspect the linked run at the PR head. - Run the Ubuntu x86 unit-test coverage job, which executes the repository unit-test suite under coverage.
- Observe
pkg/embed.TestBasicClusterpass its threevalidCNCanWorkchecks, then fail while closing the cluster. - Observe subsequent
pkg/embedtests fail at startup because the complete-cluster admission token remains held.
This appears intermittent; the linked attempt preserves the full diagnostic JSON and failure summary.
Additional information
This failure is unrelated to PR #27070:
- that PR changes temporary-table clone handling in
pkg/frontendandpkg/sql/compileand adds its tests; it does not modifypkg/embedor embedded-cluster ownership; TestBasicClusteronly executesselect count(1) from mo_catalog.mo_tablesthrough the internal executor and creates no clone or temporary table;- the first failure is returned by embedded service shutdown, while fix: support cloning into temporary tables #27070's session cleanup API returns no error and its new physical cleanup branch requires at least one session temporary table;
- the clone-specific frontend/compile package tests, race tests, and distributed regression passed locally, and both CI BVT producers passed in the same workflow run.
Root-cause work should identify which embedded service Close propagated bad connection, make the shutdown ownership decision explicit, and ensure the global cluster admission token can be safely released or retried without cascading failures.
Activity
fix: make MySQL task storage close terminal (#27074)
fix: make MySQL task storage close terminal (matrixorigin#27074)
fix: make MySQL task storage close terminal (matrixorigin#27074)
fix: make MySQL task storage close terminal (matrixorigin#27074)