Repository navigation
Description
Is there an existing issue for the same bug?
- I have checked the existing issues.
Searched open/closed issues by the exact test name, HAKeeper startup/LocalTick, cluster refresh, and admission-pool terms. No open issue specifically tracks this occurrence. Related closed reports: #26091, #26544, #27689, #30424 and #30453. This follow-up tracks the original startup failure recurring in the current four-process embedded race lane, not the sticky initialization-error propagation fixed by #30472.
Branch Name
main-targeting PR #30817, fix/29661-int64-double-pruning-20261022.
Commit ID
- PR head:
d96a07b6800957d978b348aa53c79062dfc2dd27 - Tested merge:
c51fbac33618b9d0937c8bd43dbb57d7ca8e72d5 - Merge base parent:
6495ce997486c2445994081c1d85c39802f7049b
Other Environment Information
- Ubuntu/Linux amd64, Go 1.27.1, race instrumentation.
- Runner:
amd64-mo-shanghai-8c16g-dkj59-runner-6pnjs; cgroup CPU quota 8 cores, memory limit 16 GiB. - Failed Ubuntu UT job.
- Embedded event window: 2026-10-22 08:49:57.758–08:50:44.77 UTC. The job prints the buffered failure at 09:31:30 UTC; that is not the incident timestamp.
- Test:
pkg/tests/shard/TestPartitionBasedShardCanBeCreated; three CNs, CN heartbeat interval 1s, fixture CN-store timeout 5s. - Recorded CI command:
env MO_TEST_CLUSTER_ADMISSION_POOL_SIZE=4 GOMAXPROCS=2 ... \
go test -mod=readonly -vet=off -short -v -json \
-tags matrixone_test -p 4 -timeout 40m -race \
github.com/matrixorigin/matrixone/pkg/tests/arrowload \
github.com/matrixorigin/matrixone/pkg/tests/partition \
github.com/matrixorigin/matrixone/pkg/tests/shard \
github.com/matrixorigin/matrixone/pkg/tests/sqlintegration/multicn \
github.com/matrixorigin/matrixone/pkg/tests/testutils \
github.com/matrixorigin/matrixone/pkg/tests/upgrade
The checkpoint at 08:50:37 confirms concurrent arrowload.test, partition.test, shard.test and multicn.test processes. Pool admission took only 153 microseconds; the failure is not time spent waiting for a pool slot.
Actual Behavior
The test fails before its callback creates the partition table or checks shard metadata. Shared fixture initialization takes 47.02s and reports:
failed to initialize shared cluster:
embedded cluster 21001 start CN service "0-cn-21001"
context deadline exceeded
internal error: cluster refresh
embedded cluster 21001 start CN service "1-cn-21001"
lock table bind changed
the transaction unknown has been committed or aborted
embedded cluster 21001 start CN service "2-cn-21001"
lock table bind changed
the transaction unknown has been committed or aborted
--- FAIL: TestPartitionBasedShardCanBeCreated (47.02s)
Confirmed sequence from the first failing generation:
| UTC | Event |
|---|---|
| 08:50:00.189 | HAKeeper Raft batches 27 delayed LocalTick messages. |
| 08:50:06.640 onward | HAKeeper tick proposals, checker reads, schedule polling and heartbeats time out. Later tick batches include 67, 58, 73 and 155 messages. |
| 08:50:16.312 | WAL append takes 2.211s; DDL commit takes 2.687s. Bootstrap prerequisites subsequently finish. |
| 08:50:18.088 | Another WAL append takes 1.438s. |
| 08:50:28.145 | CN0 internal SQL transaction returns context deadline exceeded / cluster refresh; CN0 starts rollback/closing immediately afterwards. |
| 08:50:34.257 | CN0 closes. The other CNs subsequently cannot connect to its lock-service endpoint. |
| 08:50:39.952 | HAKeeper reports CN0 expired. This is after CN0's initial failure/close, so eviction must not be presented as the trigger for that failure. |
| 08:50:44.279 / .676 | CN1/2 exhaust their 10s backend-availability lock-retry budget and fail startup. |
| 08:50:44.77 | Cleanup releases admission and ports; shared initialization fails. |
The lock-bind errors are downstream consequences of CN0 startup rollback. The first unresolved boundary is HAKeeper/Raft progress and the CN0 catalog/cluster-refresh transaction, not a partition assertion or a demonstrated lock leak.
Resource counterevidence from ut-checkpoint.log, 08:49:35–08:50:37 UTC:
- No increase in
memory.events.oomoroom_kill. - No increase in
cpu.stat.nr_throttledorthrottled_usec. - CPU PSI full cumulative delta: 66,374 microseconds.
- IO PSI full cumulative delta: 3,214,429 microseconds.
- At 08:50:37: cgroup memory 12.83 GiB / 16 GiB; anonymous memory 3.68 GiB, file memory 8.43 GiB.
These cgroup-wide minute snapshots do not prove that disk/fsync, CPU scheduling, GC or the four-process policy caused the Raft stall. They do rule out claiming an observed OOM or newly accumulated cgroup CPU throttling in this window. The blocked stack / per-process CPU and IO evidence needed to distinguish the deeper causes was not retained.
PR #30817 changes prepared DECIMAL/DOUBLE binding and cache proofs, not the shard fixture, HAKeeper or Raft. Startup SQL is not the prepared-parameter entry changed by the PR. This investigation does not establish a PR regression; no new local base/head reproduction is claimed.
Expected Behavior
The supported embedded race lane should initialize its three-CN fixtures reliably, or fail with sufficient evidence to identify the first blocked control-plane/transaction operation. A downstream lock-bind error must not obscure the originating startup failure. Do not solve this by skipping the test, weakening assertions, blindly retrying startup or increasing deadlines.
Steps to Reproduce
Observed in the linked full Ubuntu/x86 CI run using the exact lane command above. Intermittent; a deterministic isolated reproduction is not yet established.
For investigation, compare the same lane/test set on the exact base and head with pool sizes 1 and 4, preserving race mode, runner limits and data configuration. Capture synchronized Raft/Tan/WAL, goroutine stacks, GC and cgroup/IO counters at the first delayed-tick/proposal event and before CN0 closes. A one-off isolated test pass is not proof that the full-lane failure is fixed.
Additional information
- Historical [Bug]: shared two-CN race fixture initialization fails after lock-binding retries and poisons later cases #30453 explicitly separated the original CN startup/lock-bind/cluster-refresh failure from the later shared-fixture error-propagation fix. This occurrence has the same startup boundary, without claiming the same lower-level blocker has been proved.
- Artifact
ut-diagnostics-39745962317-1-all, ID12415632574, expires 2026-10-23 09:31 UTC. Its 250 MiB uncompressed budget was almost entirely consumed by truncatedut-report.json; the manifest shows 0 bytes retained for the failed-test output, stderr and link-admission log. The complete failed-test text remains in the job log and was preserved locally before expiry. - Local investigation record:
~/.codex/diagnostics/pr30817-ut-20261022/(failed-shard.log, original checkpoint/manifest andresource-window.json). - Acceptance: identify the blocked owner rather than just the terminal timeout; exercise startup failure/rollback and healthy subsequent generation; verify the real CI concurrency envelope without adding production hot-path cost.
- This issue deliberately excludes the unrelated Connector/J Maven download failure.
Activity
test: start lifecycle budgets at launch and order account cleanup (#3…
XuPeng-SH commentedon Oct 24, 2026
Closing as not planned after the assignee-requested bounded investigation. Current main
dae02bbaaaa18aac7fa9b788e42f4483b3adf091passed the exact three-CN TestPartitionBasedShardCanBeCreated under Linux/amd64 race + short + matrixone_test, GOMAXPROCS=2 (7.09s test, 8.356s package). The original timeline still establishes CN0 startup failure before CN0 eviction and the peer bind failures, but does not establish the originating blocked owner. The four-process CI concurrency envelope was not reproduced locally; an isolated pass does not establish that it is fixed. No deadline, retry, eviction, admission or assertion change was made. Reopen with synchronized first-failure bootstrap/Raft/WAL stacks and per-process evidence before CN0 rollback. Related original-boundary tracking: #30453.