Repository navigation
Description
Is there an existing issue for the same bug?
- Related broader reports exist ([Bug]: Ubuntu UT job cascades across packages after cluster and checkpoint timeouts #26519 and [Bug]: Embedded-cluster UTs still lose HAKeeper connections under Ubuntu/x86 load #26522), but this issue narrows the scope to a repeatable
pkg/embedstartup failure observed in both attempts of the same workflow after fix: join HAKeeper task scheduler before log store close #26507 was already present. It excludes the unrelated ISCP and checkpoint failures tracked elsewhere.
Branch Name
main
Commit ID
- Tested PR head:
939a675096f0cc9283a28bfd08304d9baecaf462 - Main parent merged into the tested head:
e1a11841ec96c7fba3870dfa67ef86a6fb75533f - Latest-main audit:
3e9ad81b9a13732305b168e0f443fd76cca62a81
Other Environment Information
- GitHub Actions workflow: MatrixOne ALL CI
- Job: Matrixone CI / UT Test on Ubuntu/x86
- Runner:
amd64-mo-shanghai-8c16g-92mgx-runner-lzjqn - OS/architecture: Linux/amd64
- Workflow run: https://github.com/matrixorigin/matrixone/actions/runs/30639089405
- Triggering PR: fix(cte): support UNION DISTINCT in recursive CTE #26501
Actual Behavior
Both permitted Ubuntu/x86 UT attempts failed during pkg/embed cluster startup with the same control-plane signature, although they failed in different tests:
- Attempt 1, job https://github.com/matrixorigin/matrixone/actions/runs/30639089405/job/91184174380:
TestMultiClusterCanWork- failed after 41.03 seconds
context deadline exceeded / internal error: waitAnyShardReadyLocked
- Attempt 2, job https://github.com/matrixorigin/matrixone/actions/runs/30639089405/job/91198683276:
TestBasicCluster- failed after 41.27 seconds
- the same
waitAnyShardReadyLockederror
The attempt-2 log exposes the startup failure chain:
- The single-node HAKeeper Raft group repeatedly reports
dropped proposal, no leader. - After leader election, initial-cluster-info proposals, HAKeeper ticks, checker-state reads, and LogService/TN heartbeats continue to time out.
- Dragonboat reports batches of 13–17 delayed
LocalTickmessages. - All three CN services remain at
shard not ready. - Cluster startup exhausts its deadline and
TestBasicClusterfails atpkg/embed/cluster_test.go:93.
Representative log sequence:
dropped proposal, no leader
failed to propose initial cluster info: timeout
propose tick failed: timeout
had 13 LocalTick msgs in one batch
had 17 LocalTick msgs in one batch
failed to get checker state: timeout
failed to send tn heartbeat: timeout
shard not ready
wait TN ready timeout: context deadline exceeded
internal error: waitAnyShardReadyLocked
PR #26501 changes recursive CTE planning/execution and has no code overlap with pkg/embed, LogService, HAKeeper Raft startup, or TN shard readiness.
Expected Behavior
A single-node embedded HAKeeper cluster should elect its leader, initialize cluster state, process ticks and heartbeats, and make the TN shard ready within the bounded startup period under the normal Ubuntu/x86 full-UT load profile.
The same workflow rerun should not move from TestMultiClusterCanWork to TestBasicCluster while failing with the identical startup timeout.
Steps to Reproduce
- Use commit
e1a11841ec96c7fba3870dfa67ef86a6fb75533for a descendant. - Run the normal MatrixOne Ubuntu/x86 full unit-test workflow with its existing package parallelism on an 8-core/16-GB runner.
- Observe
pkg/embedcluster startup while other packages run concurrently. - Check for delayed Dragonboat
LocalTickbatches, proposal/checker-state/heartbeat timeouts, CNshard not ready, and the finalwaitAnyShardReadyLockedtimeout. - Rerun the workflow once; the failure may surface in a different embedded-cluster test with the same signature.
Analysis
The immediate assertion is only the final symptom. The first actionable signal is the HAKeeper Raft event loop falling behind during startup:
- a 100 ms HAKeeper tick interval accumulates into batches of 13–17 local ticks;
- startup proposals time out before and after leader election;
- checker-state and heartbeat requests then fail;
- TN readiness never converges before the cluster-level deadline.
The two consecutive workflow attempts make this stronger than a single isolated flaky result.
The tested base already contains #26507. That PR joins the HAKeeper task-scheduler goroutine before NodeHost.Close, addressing a shutdown race; it does not prevent this startup failure.
Latest-main audit:
- From
e1a11841through3e9ad81b, no commit changespkg/embedor the LogService/Raft startup path. - test: stabilize ISCP state transition waits #26535 fixes test-only ISCP watermark waits in
pkg/vm/engine/test/change_handle_test.go; it does not touch embedded-cluster startup. - fix(hakeeper): preserve CN load across batch scheduling #26537 changes CN task load accounting and explicitly does not change timeout behavior.
- fix(gossip): disable unsupported push-pull route snapshots #26538 leaves the live gossip route path unchanged.
Therefore current main has no demonstrated fix for this narrower startup failure.
Additional information
Related reports:
- [Bug]: Embedded-cluster UTs still lose HAKeeper connections under Ubuntu/x86 load #26522 tracks embedded-cluster HAKeeper connection loss across several consumers.
- [Bug]: Ubuntu UT job cascades across packages after cluster and checkpoint timeouts #26519 tracks the broader Ubuntu/x86 multi-package failure cascade.
- [Bug]: ISCP engine tests intermittently miss asynchronous state transitions in Ubuntu/x86 CI #26517, fixed by test: stabilize ISCP state transition waits #26535, tracks separate ISCP asynchronous-wait failures.
This issue intentionally focuses on the repeatable pkg/embed HAKeeper/Raft startup path so that fixes and repeated validation can be evaluated independently of those other failure families.
Activity
fix: harden async lifecycle and CI test contracts (#26546)
gouhongshen commentedon Aug 2, 2026
A post-#26546 recurrence occurred in PR #26580's Ubuntu/x86 UT job.
c2004827c80a9f5bb85fd6710bf35369788d95b3ae2785f09f39292d4ec73bff772e0a0256a68da9, which contains fix: harden async lifecycle and CI test contracts #26546 asac4a306825TestClusterCanStartNewCNServicescontext deadline exceeded/internal error: waitAnyShardReadyLockedThe log shows the same signature tracked here: HAKeeper/LogService schedule, checker, and heartbeat timeouts; Dragonboat delayed
LocalTickbatches (11, then 6); all three CNs remainingshard not ready; and final TN-ready timeouts.PR #26580 changes only DATA BRANCH generated-column handling and its frontend/BVT tests. It has no overlap with
pkg/embed, HAKeeper, LogService, or cluster startup. Its focused frontend tests and DATA BRANCH BVT passed locally, while the other current CI BVT, SCA, and coverage jobs passed.Because this recurrence is on a base containing the fix that closed #26544, it is evidence that the startup failure is not fully eliminated.
fix: harden async lifecycle and CI test contracts (matrixorigin#26546)
fix: harden async lifecycle and CI test contracts (matrixorigin#26546)
fix: harden async lifecycle and CI test contracts (matrixorigin#26546)