Repository navigation
Labels
Milestone
Description
Environment
| Field | Value |
|---|---|
| Cluster | mo-chaos-main-90e3400-202607231124 |
| Namespace | mo-chaos-main-90e3400-202607231124 |
| Image (at analysis) | matrixone:commit-f3752fce3 (LogService memory 3Gi) |
| Endpoint | 10.222.6.252:6001 |
| Artifact root | /data1/chaos-test/29976855281_90e3400 |
| Workloads | TPCC (jTPCC), mo-load, vector/fulltext, chaos-mesh |
| Analysis window | 2026-07-24 18:00 → 2026-07-27 ~11:50 CST |
| Incident | 2026-07-26 01:32:55 → 02:15:13 CST (ErrorCode : 20618) |
Scope: After task_kill_cn, TPCC New-Order hit a sustained storm of Error 20618 / r-w conflict (~10531 client FATAL lines over ~43 minutes). Co-timed 9999 Stock … not found (~2575 in the same hour). TPCC consistency verify stayed green through the storm (0 fail); live ytd drift = 0.
Out of scope / not claimed:
- Durable TPCC consistency corruption (verify 5969 successfully / 0 failed in the analysis window; ytd OK).
- Log OOM (limit 3Gi; WS peak ~2.5Gi; OOM events 0).
- Episodic
1205lock wait peaks (same soak, separate bursts — track separately if needed). - Single
1062onbmsql_order_lineat 2026-07-25 05:53 afterkill_dn+kill_cn(1 row in DB; not durable duplicate) — related chaos family, not this storm.
Summary
| Signal | Value | Interpretation |
|---|---|---|
20618 (r-w conflict) in window |
10531 | Dominant error in soak |
| Storm span | 2026-07-26 01:32:55 → 02:15:13 CST | ~43 min then stops |
| Txn type | 100% TT_NEW_ORDER |
Not Payment/Delivery |
| Trigger | task_kill_cn apply 01:32:04, cleanup 01:32:35 |
First 20618 ~20s after kill |
Co-timed 9999 Stock not found |
~2575 in 01–02 hour |
Read visibility / miss under conflict |
| Consistency fail during storm | 0 | No durable gate failure |
wait-active max (72h) |
33 (transient) | Not a sustained createTxn stall |
Preferred root-cause chain (symptom → mechanism → root):
- Symptom: Mass New-Order failures with
20618 r-w conflict, plus client-side stock row not found (9999). - Mechanism: Killing one CN tears down in-flight txns / lock / snapshot paths. Surviving CN + reconnecting clients continue New-Order against hot warehouses; readers see WW/RW conflict (and occasional missing stock snapshot) until the cluster settles (~43 min of high-rate retries).
- Root cause (fixable): MO txn / conflict detection + post-CN-kill recovery — either
- conflict is correct but recovery / retry amplification is pathological (storm lasting tens of minutes), or
- post-kill stale snapshot / incomplete abort causes false or overly broad
r-w conflictuntil state converges.
Need CN/DN traces around01:32–02:15for conflict key, txn ids, and whether abort/cleanup completed promptly.
Timeline (CST)
| Time | Event | Evidence |
|---|---|---|
| 01:20:33–01:21:04 | task_kill_logservice |
mo_chaos_test.log |
| 01:26:04–01:27:04 | task_network_dn |
mo_chaos_test.log |
| 01:32:04–01:32:35 | task_kill_cn |
mo_chaos_test.log |
| 01:32:55 | First 20618 r-w conflict (New-Order) |
tpcc.log |
| 01:33:39+ | Burst 9999 Stock not found |
tpcc.log |
| 01:46–02:12 | Peak rate (~340–418 / min) | tpcc.log minute hist |
| 02:15:13 | Last 20618 in storm |
tpcc.log |
| 01:30–02:19 | Consistency check all successfully | check.log |
Evidence
A. Client FATAL samples
2026-07-26 01:32:55 FATAL jTPCCTerminal:327 - [UNEXPECTED][TT_NEW_ORDER][EXECUTION]
ErrorCode : 20618, ErrorMessage : r-w conflict
2026-07-26 01:33:39 FATAL jTPCCTerminal:327 - [UNEXPECTED][TT_NEW_ORDER][EXECUTION]
ErrorCode : 9999, ErrorMessage : Stock for S_W_ID = 1 and S_I_ID = 44827 not found.
B. Hourly ErrorCode (excerpt)
| Hour (CST) | Dominant |
|---|---|
| 07-26 01 | 20618:5768, 9999:2575 |
| 07-26 02 | 20618:4763, then drop |
| 07-26 03 | back to normal chaos noise (~11 total) |
C. Chaos task at trigger
2026-07-26 01:32:04 - Executing Chaos Task: task_kill_cn
2026-07-26 01:32:04 - Success: podchaos.../pod-kill-cn created
2026-07-26 01:32:34 - Cleanup Success: pod-kill-cn deleted
D. Consistency / data
- Window verify: 5969 / 0
- During storm: 0 consistency failed
- Live:
w_ytd - sum(d_ytd) = 0all warehouses
Metric / log semantics
| Signal | Meaning |
|---|---|
20618 r-w conflict |
MO abort due to read-write conflict; client sees FATAL; does not by itself mean consistency verify failed |
| 9999 Stock not found | New-Order could not read expected bmsql_stock row (visibility / miss under stress) |
Consistency verification successfully |
Cross-table invariants still hold — orthogonal to storm volume |
Proposed fixes
P0 — MO server
- Reproduce with
task_kill_cnunder TPCC New-Order load; capture CN logs for conflict key / txn abort path (pkg/txn, snapshot, lockservice). - Ensure CN death promptly aborts / fences in-flight writers so survivors do not spin in r-w conflict for tens of minutes.
- If conflicts are expected, add server-side backoff / conflict storm mitigation and clearer metrics (
mo_txn_*conflict rate by cause).
P1 — Client / chaos harness
- jTPCC: on 20618, retry with backoff (and re-read district/stock) instead of FATAL-storm logging.
- Gate: treat sustained 20618 rate (e.g. >N/min for >10min after kill_cn) as DEGRADED even when consistency is green.
Verification
- Replay: TPCC +
task_kill_cnon same topology; expect 20618 either absent or decaying within ≤5 min, not ~40+ min / 10k+ errors. - Consistency verify remains 0 fail; stock 9999 does not co-burst with 20618.
- Optional: Prometheus conflict / rollback rate returns to baseline within 5 min of CN Ready.
Activity
LeftHandCold commentedon Jul 27, 2026
Root-cause update
The initial issue description left two hypotheses open. The subsequent code and failure-path analysis pins this incident to the second one: a replacement CN can finalize a table subscription after only partially consuming its checkpoint.
Incident-to-code chain
task_kill_cnforces a surviving/replacement CN to establish table subscriptions for migrated TPCC work.bmsql_stocksubscription, the request context reachedcontext deadline exceededwhile checkpoint/FileService data was being loaded. The subscription event and the failed migrated statement are adjacent in the incident timeline, followed by the stock-not-found and20618bursts.ckputil.ObjectIter.Next()returns errors fromioutil.LoadColumnsData, including the context/FileService failure.consumeCheckpointWithTableIDusedfor ok, err := iter.Next(); ok && err == nil; ...and never returnederr. An iterator failure therefore terminated the loop as if it had reached normal EOF.Partition.ConsumeCheckpointsreceived nil, published the partially populated copy, and setcheckpointConsumed=true.loadAndConsumeLatestCkpalso received nil and changed the table state toSubscribed.bmsql_stock/object view instead of retrying the checkpoint load. This accounts for the co-timed expected-stock misses; transactions built from that view can carry stale/incomplete object references into TN transfer/read-conflict checks, where the failure is surfaced as20618 r-w conflict.Direct validation
A deterministic regression with an expired context demonstrates the propagation defect:
ObjectIter.Next()returnscontext.DeadlineExceeded, while the affectedconsumeCheckpointWithTableIDreturns nil. The fix makes both data and tombstone iterator paths return the original error. That error is observed before either the copy-on-write partition state is published or the subscription becomesSubscribed, so the initial load can retry.PR #26233 fixes this root-cause path and therefore intentionally uses
fixes #26210. It does not suppress legitimate r-w conflicts; it prevents the incomplete CN state that generated this pathological post-kill-CN conflict storm.LeftHandCold commentedon Jul 27, 2026
Object-level incident correlation
The Loki history provides the incident-specific evidence that was missing from the earlier RCA comment.
Exact count and ownership
r-w conflicterrors.mo-chaos-regression-dis-tp-cn-jndns; no other CN produced them.TRANSFER-ERRrecords withold-err=ExpectedEOBfor<db=273116, table=273124>, i.e.bmsql_stock.dbaed7dee248c40a18c598b457ac3352, is logged onjndnsand TN on both sides of the same failed commit.This establishes that the issue is not a generic lock/contention conflict storm. Every
20618is TN rejecting a row ID fromjndnsbecause the source object no longer has transfer state.All stale row IDs come from one prior merge
The 10,531 failures reduce to 13 block-row IDs belonging to seven object IDs:
5235c2dc69bcc88bdefa05a8bf92bbc870e00600e3cc60e9861ae7f690fb7f73aff0cc9b441ad57ca1efAll seven appear in the
from-objsof TN merge[MT-1299]-273124-bmsql_stock, started at17:25:22 UTCand committed at17:25:44.282(commit-ts=1785000344282453036-0).TN then completed an ICKP covering
1785000273159717294-1 -> 1785000573162184911-57(17:24:33–17:29:33 UTC) at17:31:58. The merge deletion is inside that checkpoint interval. Therefore a correctbmsql_stocksubscription established after this ICKP cannot expose those seven source objects as live.Subscription failure boundary
On replacement CN
jndns:17:32:15.660916: table273124entersSubRspReceived.17:32:15.705894: CN reportsbmsql_stock subscribe-ok.17:32:15.707491: the migratedSELECT ... FROM bmsql_stock ... FOR UPDATEprepare that triggered the subscription fails withcontext deadline exceeded.17:32:55.368453: TN rejects the first stale object row ID withTRANSFER-ERR old-err=ExpectedEOB.The affected iterator loop can turn exactly this checkpoint read/cancellation into false success:
ObjectIter.Next()returns the read error,consumeCheckpointWithTableIDdrops it,Partition.ConsumeCheckpointspublishes the partial copy and setscheckpointConsumed, and the consumer setsSubscribed.There is no direct iterator-error log because the affected path removes it:
S3FS.Readcan returnctx.Err()before event logging, and the caller loop then discards the returned error. The deterministic regression confirms that exact function boundary.Recovery correlation
task_kill_dnbegan at18:15:10; the last20618occurred at18:15:13.jndnsrebuiltbmsql_stockinto a new partition state at18:16:23, after which the storm was absent. This is consistent with replacing the bad CN subscription state, while TPCC durable consistency remained green because TN rejected the stale-row commits.Taken together, the production object IDs, exact 10,531-to-10,531 count, checkpoint interval, subscription deadline, and recovery on resubscription pin #26210 to the partial checkpoint publication path fixed by #26233.
fix(logtail): propagate checkpoint iterator errors (#26233)
LeftHandCold commentedon Jul 28, 2026
fixed
fix(logtail): propagate checkpoint iterator errors (matrixorigin#26233)
fix(logtail): propagate checkpoint iterator errors (matrixorigin#26233)
fix(logtail): propagate checkpoint iterator errors (matrixorigin#26233)
fix(logtail): propagate checkpoint iterator errors (matrixorigin#26233)