Skip to content

[Bug] Chaos (aa2a02c): with 2/3 LogStores Up, CN/DN still fail waitAnyShardReady and dial deleted log-0 #26058

Description

@heni02

Environment

Field Value
Cluster / Namespace mo-chaos-main-aa2a02c-202607172328
MO image commit-826a3e3d2 (ns name still aa2a02c)
Endpoint 10.222.6.252:6001
Artifact /data1/chaos-test/29592172186_aa2a02c
LogSet replicas 3, pods log-1 / log-2 / log-3 (no log-0 pod)
Analysis 2026-07-23 ~11:00 CST (cluster already degraded since ~Jul 21 evening)

Scope: MatrixOne runtime HA / HAKeeper membership / CN·DN bootstrap. After one LogStore is Down (CrashLoop), the other two report Up, but CN/DN still cannot become ready: dial non-existent …-log-0…, then wait.tn.ready / waitAnyShardReady timeout → process panic → CrashLoop; surviving CN stays in txn client is in pause / createTxnOpUnsafe, rate(mo_txn_commit_total)≈0.

Out of scope (separate issues / workflow):

  • Operator CR Ready=False / NoEnoughReadyStores with 2 Up — Operator issue (sibling).
  • Chaos task_mem_log injecting 2GB into Log with limit 2Giworkflow misconfig (trigger only).
  • TPCC durable ytd corruption — not observed before outage (verify was green until freeze).

Summary

Single LogStore failure should be tolerated by a 3-replica log quorum (majority = 2). Observed reality:

Signal Value
log-1 / log-3 Ready true
log-2 CrashLoopBackOff (OOMKilled historically; exit 137)
LogSet availableStores 2 (log-1, log-3)
LogSet failedStores 1 (log-2)
Client ERROR 20508 all CN servers are busy, possibly due to too many active transactions
Commit sum(rate(mo_txn_commit_total{type="cn"}[5m])) ≈ 0
Surviving CN txn client is in pause + mass createTxnOpUnsafe

Preferred root-cause chain:

  1. Symptom: CN/DN CrashLoop or txn create blocked while 2/3 Log pods are Ready.
  2. Mechanism: Bootstrap / HAKeeper client still targets mo-chaos-regression-dis-log-0.…svc:32001, which does not exist (DNS no such host). Shard never becomes ready → waitAnyShardReady / wait.tn.ready.timeoutpanic in cmd/mo-service.
  3. Root cause (fixable): Stale HAKeeper / log member list (or bootstrap seed) retains removed ordinal log-0 after StatefulSet members became log-1..3, and/or CN/DN bootstrap does not skip permanently unreachable members / does not fail soft when quorum of reachable stores is enough.

Evidence

DNS to ghost log-0 (DN previous log)

init remote connection failed ... remote:
  mo-chaos-regression-dis-log-0.mo-chaos-regression-dis-log-headless.<ns>.svc:32001
error: lookup ...log-0... on 192.168.20.10:53: no such host

CN bootstrap then panic

wait.tn.ready.not.ready   (repeated)
wait.tn.ready.timeout
panic: context deadline exceeded
  internal error: waitAnyShardReady
main.main()  cmd/mo-service/main.go

Surviving CN (txn path)

txn client is in pause state, wait for it to be ready
context deadline exceeded
internal error: createTxnOpUnsafe

Proposed fixes (MO server)

Area Change
HAKeeper / log discovery On member unreachable (NXDOMAIN / connection refused sustained): evict or mark Down in bootstrap list; never hard-depend on a DNS name with no endpoints
Membership reconcile When StatefulSet ordinals change (log-0 gone, log-1..n present), rewrite bootstrap / gossip seeds from current Ready pods + discovery Service, not historical pod names
waitAnyShardReady If ≥ quorum of LogStores are reachable and shards are scheduled on them, proceed; do not block forever on a dead member
Process exit Startup timeout: return error / os.Exit(1) instead of panic, so CrashLoop reason is clearer and sidecars/probes behave predictably (cmd/mo-service/main.go, launch.go)
Observability Structured log: expected_members, reachable_members, ghost_members when bootstrap stalls

Verification

Check Expectation
Repro 3 Log replicas; OOMKill or delete one Log pod only; leave other two Ready ≥10min
Pass CN/DN Ready; rate(mo_txn_commit_total{type="cn"}) healthy; no dials to missing log-0; client login works
Fail (today) CN/DN panic CrashLoop or createTxnOpUnsafe / all CN busy with 2/3 Log Up

Related

  • Sibling (Operator): LogSet Ready=False / NoEnoughReadyStores despite availableStores=2
  • Trigger context: chaos mem_log size 2GB vs Log limit 2Gi (fix in workflow; not this bug’s code fix)

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't workingseverity/s0Active / top priority for current sprint. Owner has committed to working on it now.

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions