Repository navigation
Description
Environment
- Branch:
3.0-dev - Commit:
4de4c6a(2026-05-09) - Cluster:
mo-chaos-4de4c6a-202605101659 - Pod:
mo-chaos-regression-dis-dn-0, memory limit 10 GiB - Event:
OOMKilledat UTC 2026-05-11 01:50 (kube_pod_container_status_last_terminated_reason=OOMKilled, restart count 0 → 1)
Current Behavior
Under chaos-mesh IOChaos filesystem error injection targeting the DN pod, DN-0 memory grows from 0.75 GB to 2.7 GB within 2 minutes and then gets OOMKilled at the 10 GiB cgroup limit. Post-restart the pod stabilizes at ~5 GB and does not crash again for the remainder of the injection window.
This is not a sustained leak. It is a 2-minute burst allocation storm triggered by DN's response to repeated write failures from the injected IO faults.
Timeline (UTC 2026-05-11)
01:42:27 dragonboat: "filesystem error injection mode" — injection window starts
01:40:00 [TransferPage] write transfer page error begins (1798 occurrences in 14h)
01:48:00 working_set 0.75 GB
01:49:00 1.10 GB
01:49:55-01:49:59 TransferPage write errors flood at ~11/sec
01:50:00 OOMKilled by cgroup
01:51:00 post-restart 1.88 GB
01:54:00 2.70 GB
02:00:00+ stabilizes at ~5 GB (no further crashes)
04:33:25 chaos-mesh "recover chaos" — injection window ends
Profile Evidence (pre-crash 10-minute window on DN-0)
Queried via Pyroscope SelectMergeStacktraces, service_name="mo-chaos-4de4c6a-202605101659/main", pod="mo-chaos-regression-dis-dn-0".
memory:inuse_space (Go heap, 29 GB reported across window due to sampling aggregation):
| Self % | Function |
|---|---|
| 19.23% | mpool.alloc |
| 13.31% | pb/logservice.NewLogRecord |
| 11.07% | fileservice/fifocache.New[...] |
| 5.40% | io.ReadAll |
| 5.39% | objectio.NewArena |
| 5.03% | goetty/v2/buf.(*nonReusableAllocator).Alloc |
| 3.02% | objectio.ReadBloomFilter |
memory:alloc_space (cumulative, 93 GB in the same 10-min window):
| Self % | Function |
|---|---|
| 35.33% | io.ReadAll |
| 32.93% | mpool.alloc |
| 7.75% | bytes.growSlice |
| 3.62% | objectio.(*objectWriterV1).WriteWithCompress |
| 2.03% | objectio.NewArena |
| 1.19% | pb/api.(*Batch).Unmarshal |
CPU profile is unremarkable (runtime/GC dominant, no business hot-function > 1%). This is an allocation problem, not a CPU spin.
Note: malloc profile (off-heap/mpool) is available in this cluster but returns no non-zero stacks — suspect the mpool region itself is sitting outside the profile sampling, or this namespace has not been rolled out with the /debug/malloc agent config. The Go-heap profile alone is still sufficient to locate the hot paths.
Root Cause Hypothesis
- IOChaos causes
objectio/writer.goSync()calls to fail on DN-0 with filesystem errors. - The TransferPage write path retries aggressively when
Sync()fails — observed as[TransferPage] write transfer page error, page count 1flooding at ~11/sec for the last 5 seconds before OOM. - Each retry re-reads source data via
io.ReadAll(35.3% of alloc_space) and allocates through mpool (32.9%), with no bounded buffer / backpressure. - The combined retry-fanout allocates ~93 GB cumulative in 10 minutes while Go GC cannot keep up, driving working_set from <1 GB to >10 GB in 2 minutes.
The problem is not that the injection happens (chaos tests are expected to inject faults). The problem is that DN's TransferPage-on-Sync-failure path has no bounded retry or memory-pressure-aware backoff, so a transient IO fault turns into an unrecoverable OOM burst within 2 minutes.
Why this is NOT a duplicate
#24319(open, my earlier filing 2026-05-09): DN nil-pointer panic inToCNBatchunder MinIO S3 throttling — different trigger (503 SlowDown, not filesystem error), different crash mode (panic vs OOM), different code path (flushObjTaskvsTransferPage).#24307(closed today, fixed by#24309): CN OOM under sysbench 1000w insert-ignore on main TKE regression — different pod type (CN vs DN), different load, different cluster, different branch.- No existing issue matches "DN OOM burst under IOChaos filesystem injection driven by TransferPage retry fanout".
Suggested investigation direction
The TransferPage / objectio/writer.Sync retry path on DN should:
- Enforce a bounded retry count for filesystem errors rather than unbounded tight-loop retry
- Release or cap
io.ReadAll-buffered source data between retries instead of holding it all in memory - Consult mpool pressure / working_set headroom before scheduling another retry
Evidence Archive
- Namespace:
mo-chaos-4de4c6a-202605101659 - Loki:
{namespace="mo-chaos-4de4c6a-202605101659", pod="mo-chaos-regression-dis-dn-0"} |= "TransferPage" - Pyroscope host:
https://shanghai.idc.matrixorigin.cn:30001 - Pre-crash window:
start=1746931800000,end=1746932430000(UTC 2026-05-11 01:40 → 01:50:30) - Peak working_set: ~5.2 GB sustained post-restart; limit 10 GiB
Activity
fix: add bounded retry and error propagation to TransferPage write path
Ariznawlll commentedon May 12, 2026
Recurrence — 2026-05-12
Cluster
mo-chaos-4de4c6a-202605101659was left running on the same commit. DN-0 OOMKilled a second time at UTC 2026-05-11 18:00:00 (restart count 1 → 2), ~16 hours after the first OOM reported in the issue body.Second OOM evidence
kube_pod_container_status_last_terminated_reason=OOMKilled(both samples return OOMKilled)kube_pod_container_status_restarts_totaltimeline:[TransferPage] write transfer page erroris still flooding at ~1000–1200 occurrences per 10-minute window at file time (2026-05-12 03:30 UTC), indicating chaos-mesh IOChaos is continuing to cycle and the retry-storm pattern is reproducing deterministically when injection hits DN-0.What it tells us
The original OOM is not a one-off chaos quirk. Same code path, same cluster, same
4de4c6abuild, same failure mode 16h apart.Post-restart DN-0 stabilizes at ~2–4 GB working_set (limit 10 GB) between injection windows, which rules out a cumulative leak — this really is a per-injection burst allocation storm as hypothesized in the original filing.
Business-level fallout is also reproducing consistently across the two windows:
128-chaos-cdc: 218 errors today vs 216 in original window128-chaos-tpcc: 199 vs 195128-chaos-insert-auto-incre: 80 vs 84Numbers are near-identical, reinforcing that the test harness sees the same OOM as a steady-state consequence of the injection schedule — this will not self-recover.
Ask
If the fix direction is the bounded-retry + memory-pressure-aware backoff in
TransferPage/objectio.Syncpath suggested in the issue body, this cluster is a stable reproducer — the next IOChaos injection cycle will almost certainly OOM DN-0 again and I can capture a fresh heap profile from inside the 2-minute burst window if that would help locate the exact retry loop to bound.Ariznawlll commentedon May 14, 2026
Post-fix recurrence — 2026-05-14
Environment
3.0-dev(HEAD =88ac20a, which includes fix: bounded retry for TransferPage write to prevent DN OOM under IO faults #24337)mo-chaos-88ac20a-202605132125mo-chaos-regression-dis-dn-0Evidence that #24337 is included
88ac20ais identical to3.0-devHEAD.git logconfirms #24337 merge commitac939ff48(2026-05-12T16:12) is an ancestor.Current behavior
[TransferPage] load transfer pageINFO logs still present, but nowrite transfer page errorinfinite retry — the bounded retry from fix: bounded retry for TransferPage write to prevent DN OOM under IO faults #24337 is working.MO logger initentries spaced 10-11 min apart (20+ occurrences in 24h).kube_pod_container_status_last_terminated_reason=OOMKilled(cgroup kill).Pyroscope memory profile (Go heap, 2h window)
Analysis
The original TransferPage retry storm (burst from 0.75→2.7 GB in 2 min) is mitigated. The current OOM has a different profile:
mpool.alloc(22.7%) — sustained mpool allocation, not a burst patternlogservice.NewLogRecord(13.9%) — WAL record allocation during replay after each restartfifocache.New(12.4%) — cache initialization on restartHypothesis: each DN restart triggers WAL replay which allocates heavily via mpool + logservice records. Under continuous chaos IO fault injection, the DN accumulates memory faster than it can reclaim, hitting the 10 GiB cgroup limit within ~11 minutes of each restart.
Conclusion
#24337 fixed the specific TransferPage infinite-retry OOM burst, but a second OOM path exists under sustained chaos injection: restart → WAL replay memory pressure → OOM → restart (vicious cycle). This may require:
Ariznawlll commentedon May 26, 2026
Post-fix verification — 2026-05-26
Checked the background chaos run started by mo-nightly-regression run
26397438910:mo-chaos-58ad528-202605251911commit-58ad528Result
#24334did not reproduce on DN in this run.Evidence
DN pod checked:
mo-chaos-regression-dis-dn-0kube_pod_container_status_restarts_total:0OOMKilledlast terminated reason for DNOOMKillOOMKilledCrashLoopBackOffexit code 137SIGKILLOut of memoryruntime: out of memorywrite transfer page errorreturned0matchesTransferPageonly returned 2 normalload transfer pageINFO logs, not a retry storm20%of limit82%of limit, with no OOM/restartNote
There was an
OOMKilledsignal onmo-chaos-regression-dis-tp-cn-5ths7, but that is a TP-CN pod and is not the DNTransferPageOOM pattern described in this issue.Conclusion
For
commit-58ad528/ namespacemo-chaos-58ad528-202605251911, the DNTransferPageretry-storm OOM from this issue appears fixed: DN had no OOM, no restart, and nowrite transfer page errorstorm during the checked window.