Skip to content

[Bug] Chaos (33bc7a2): TPCC durable ytd corruption on warehouse 8 after task_kill_dn — Payment district/warehouse split never heals #25845

Description

@heni02

Environment

Field Value
Cluster mo-chaos-4-1-dev-33bc7a2-202607131556
Namespace mo-chaos-4-1-dev-33bc7a2-202607131556
MO version env name 33bc7a2; running image at incident commit-ce99d329c (S3 prefix still …/commit-33bc7a2/data)
Endpoint 10.222.6.253:6001
Artifact root /data1/chaos-test/29230227851_33bc7a2
Workloads TPCC (jTPCC 10 wh / 10 terminals), mo-load, vector/fulltext, chaos-mesh
Incident start 2026-07-17 15:52:14 CST
Analysis point 2026-07-17 17:20 CST (still failing; 0 PASS after incident)

Scope: Permanent TPCC ConsistencyCheck failure on w_ytdsum(d_ytd) for warehouse id = 8 after chaos task_kill_dn, preceded by 20702 / 20502 and 1062 bursts. Drift does not self-heal and continues to widen as Payments run.

Out of scope / do not merge:

  • Transient o_ol_cnt read-skew (self-heal in ≤1 min) — earlier same env (e.g. Jul 17 01:28) and 2865ed6 / 2a00828 class.
  • DN merge file … is not found (#25718) — same soak, different defect; do not treat ytd as caused by rawlog/statement_info missing aobj without proof.
  • Single New-Order 1062 without sustained ytd fail (#25704 / mem_cn 1062 class).

Summary

On commit-ce99d329c chaos long-run, TPCC verify was healthy through 15:51:40 CST, then starting 15:52:14 every cycle fails ytd invariants for w_id=8. Through 17:20+ (≥1.5h, 290+ Consistency verification failed lines, 0 Consistency verification successfully):

(SELECT d_w_id, sum(d_ytd) FROM bmsql_district GROUP BY d_w_id)
EXCEPT (SELECT w_id, w_ytd FROM bmsql_warehouse);

(SELECT w_id, w_ytd FROM bmsql_warehouse)
EXCEPT (SELECT d_w_id, sum(d_ytd) FROM bmsql_district GROUP BY d_w_id);
Signal Value Interpretation
Last PASS 15:51:40 Still green ~7 min after kill_dn cleanup
First FAIL 15:52:14 ytd EXCEPT non-empty for w_id=8
PASS after incident 0 Not read-skew
Failed SQL ytd only (both EXCEPT directions) Payment invariant
o_ol_cnt consistency fail (window) 0 Not ol read-skew
Drift @ 15:52 d≈898621750.55 vs w≈898618420.23 (Δ≈3330) Already durable split
Drift @ 17:20 d≈902367724.57 vs w≈902360474.51 (Δ still thousands, changing) Payments keep widening/changing gap
Trigger chaos task_kill_dn 15:44:03–15:44:34; prior task_mem_cn 15:34–15:39 DN hard kill recovery window
Client errors before FAIL 20702 / 20502 storm 15:45–15:48; 1062×3 (incl. w8/w9) Ambiguous commit / unsafe retry signal

Preferred root-cause chain (symptom → mechanism → root):

  1. Symptom: For warehouse 8, sum(d_ytd) ≠ w_ytd forever after 15:52; verify never returns successfully.
  2. Mechanism: Payment updates bmsql_warehouse.w_ytd and bmsql_district.d_ytd in one client txn. Under DN kill + lock-bind churn (20702) / backend close (20502), one side of the ytd update is applied (or retried) without the other → permanent split. Ongoing Payments amplify the gap.
  3. Root cause (fixable): Same family as 18addf5 / 7cbeacd / 4056142: Payment cross-table (cross-partition) ytd update is not atomic / not safely retriable under DN fault. Secondary: client blind retry after 20702/20502 may worsen split (must not double-apply one side).

TPCC invariants

Invariant Txn This incident
sum(d_ytd) per w_id = w_ytd Payment Permanent FAIL (w_id=8)
sum(o_ol_cnt) = count(order_line) NewOrder 0 consistency fails in incident window
D_NEXT_O_ID - 1 = max(o_id) NewOrder Not observed failing in sampled FAIL lines

Payment (single JDBC txn):

UPDATE bmsql_warehouse SET w_ytd = w_ytd + :amount WHERE w_id = :w_id;
UPDATE bmsql_district   SET d_ytd = d_ytd + :amount WHERE d_w_id = :w AND d_id = :d;
...
COMMIT;

Timeline (CST)

Time Event Evidence
15:34:03–15:39:03 task_mem_cn mo_chaos_test.log
15:44:03–15:44:34 task_kill_dn mo_chaos_test.log
15:45:06–15:48:21 20702 / 20502 burst; 1062×3 on bmsql_oorder tpcc.log
15:45–15:51:40 Verify still successfully check.log
15:52:14 First ytd FAIL (w_id=8, both EXCEPT directions) check.log
15:52 → 17:20+ Continuous FAIL, 0 PASS check.log

Evidence

Log paths

File Path
TPCC verify /data1/chaos-test/29230227851_33bc7a2/mo-chaos/test-tool/mo-tpcc/check.log
TPCC run /data1/chaos-test/29230227851_33bc7a2/mo-chaos/test-tool/mo-tpcc/tpcc.log
Chaos harness /data1/chaos-test/29230227851_33bc7a2/mo-chaos/logs/mo_chaos_test.log

First FAIL exceptional rows

2026-07-17 15:52:14 ... failed for sql : (select d_w_id, sum(d_ytd) ...) except (Select w_id, w_ytd ...)
The exceptional result are :
8	898621750.55

2026-07-17 15:52:14 ... failed for sql : (Select w_id, w_ytd ...) except (select d_w_id, sum(d_ytd) ...)
The exceptional result are :
8	898618420.23

Still FAIL ~1.5h later

2026-07-17 17:20:20 ... exceptional:
8	902367724.57	  -- district sum side
8	902360474.51	  -- warehouse side

Pre-incident client FATAL sample

2026-07-17 15:45:06 ... [TT_PAYMENT] 20702 lock table bind changed
2026-07-17 15:45:16 ... [TT_PAYMENT] 20502 backend connection closed
2026-07-17 15:47:49 ... [TT_NEW_ORDER] 1062 Duplicate entry '(9,1,60502)' ...
2026-07-17 15:48:21 ... [TT_NEW_ORDER] 1062 Duplicate entry '(8,1,40043)' ...
2026-07-17 15:48:21 ... [TT_NEW_ORDER] 1062 Duplicate entry '(9,7,60609)' ...

Why this is release-blocking

  1. Hard consistency gate: w_ytd / d_ytd is a core TPCC Payment invariant; sustained FAIL = data corruption, not chaos noise.
  2. No self-heal: Unlike o_ol read-skew (33s–1min PASS), this stays red while commit path still accepts Payments (gap evolves).
  3. Repeat family: Same R1 class as 18addf5 / 7cbeacd / 4056142 / 07924fb-line ytd fails under chaos — DN/network fault + Payment split.
  4. Trigger is production-realistic: task_kill_dn (hard kill) + lock-table rebind.

Proposed fixes

A. MO server (required)

Area Change
Payment / txn Ensure warehouse + district ytd updates commit atomically across partitions under DN restart; no durable one-sided apply
Commit / retry On 20702 / 20502 / 20638, expose safe resolve so clients do not retry a half-applied Payment
Observability Structured log: Payment txn-id → applied tables / amounts when DN kill interrupts commit

B. Client / TPCC (defense in depth)

Area Change
jTPCC Payment After 20702/20502/20638: do not blindly re-apply +amount to both tables; re-read both ytd or use idempotency token
Gate Any consecutive ytd FAIL ≥ N (e.g. 3) or FAIL lasting > 2 min → hard fail soak (already effectively hard here)

C. Verification

Check Expectation
Repro: task_kill_dn + TPCC Payment soak May see 20702; ytd must return to PASS and stay PASS
Soft Isolated 1062 without ytd drift → separate retry issues
Hard Sustained ytd FAIL → block release (this issue)

Severity

P0 — durable TPCC consistency corruption; release blocker.

Related

  • Same env merge missing object (orthogonal): #25718
  • Same-family durable ytd: issues/matrixone-chaos-18addf5-tpcc-consistency-durable-corruption.md, 7cbeacd, 4056142; soak 07924fb ytd class
  • Distinct transient read-skew: 2a00828 / 4164cfb / 83cc163 / earlier 33bc7a2 o_ol self-heal
  • 1062 without durable ytd: #25704

Metadata

Metadata

Assignees

Labels

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

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions