Repository navigation
Description
Issue
TPCC 1000 warehouses / 1000 terminals benchmark fails with ErrorCode: 20505 (i/o timeout) during the 5th test round when all CN pods reach peak memory (~46–49 GB).
This is a recurrence of the same failure pattern reported in #24893 (closed 2026-06-11).
Failed Run
- Job: https://github.com/matrixorigin/mo-nightly-regression/actions/runs/28037375178/job/83026685448
- Namespace:
mo-main-commit-435e7da55-20260623 - Error time:
2026-06-23 18:46:17 UTC - Commit:
435e7da55
Error
FATAL jTPCCTerminal:214 - [UNEXPECTED][TT_PAYMENT][EXECUTION] ErrorCode : 20505,
ErrorMessage : cannot connect to backend: writeto tcp4 10.143.35.187:21928->10.143.35.185:6003:
read tcp4 10.143.35.187:21928->10.143.35.185:6003: i/o timeout
- 88 occurrences of this error, 44 transaction errors
- tpmE = 8.72, tpmC = 7001.16
Pod IP Mapping
| Pod | IP |
|---|---|
tp-cn-qk2rd |
10.143.35.185 (unresponsive CN) |
tp-cn-xw7xl |
10.143.35.187 (proxy/source CN) |
tp-cn-zwjff |
10.143.35.186 |
Root Cause Analysis
1. Memory Pressure
At the time of failure (TPCC round 5 peak), all 3 CN pods were at ~46–49 GB memory:
| CN | Memory at Error | Peak |
|---|---|---|
| qk2rd (185) | 46.2 GB | 49.4 GB |
| zwjff (186) | 46.4 GB | 48.6 GB |
| xw7xl (187) | 47.8 GB | 48.4 GB |
Memory oscillates with each TPCC 5-minute round — rises during the test, drops during transitions. The failure consistently occurs at the memory peak of rounds 4–5.
2. GC STW Pauses
| CN | Max GC Pause | Risk |
|---|---|---|
| qk2rd (185) | 363 ms | High |
| zwjff (186) | 125 ms | Medium |
| xw7xl (187) | 111 ms | Medium |
qk2rd's 363ms GC stop-the-world pause is sufficient to cause RPC timeouts under TPCC's tight concurrency. Note: Prometheus 1-minute sampling likely misses sub-second spikes — actual pauses may be longer.
3. Cascade Failure (Loki Logs at 18:48:45–46 UTC)
- All CN backend connections (port 6002) between all 3 CNs dropped simultaneously:
close tcp4 ... use of closed network connection - Multiple CNs reported
cannot get salt, maybe not use proxy— client connection failures - zwjff reported
sql: database is closed— database connection pool exhausted - log-1 reported
context deadline exceeded+sql: database is closed - Both proxy pods (rxdrk, k9m9s) reported
close connection failed
4. No OOM / No Restarts
- 0 pod restarts
- 0 OOMKilled events
- CN processes remained alive, just unresponsive during GC pauses
Causal Chain
TPCC round 5 (1000W/1000T) peak
→ All CNs at ~46-49 GB memory
→ qk2rd (185) GC STW pause ≥363ms
→ qk2rd cannot respond to lockservice/morpc backend RPCs
→ xw7xl (187) times out connecting to qk2rd:6003 → "i/o timeout"
→ Proxy cannot forward client requests → ErrorCode 20505
→ TT_PAYMENT transactions fail, tpmE=8.72
Recurrence Pattern
The same error pattern repeats every ~4 hours in this namespace (18:48, 22:48, 02:48 UTC), consistently at TPCC 1000W peak rounds. This is not a one-time flaky failure.
Comparison with #24893
| Aspect | #24893 (June 8) | This issue (June 23) |
|---|---|---|
| Scenario | TPCC 1000W/1000T | TPCC 1000W/1000T |
| Error | i/o timeout, ErrorCode 20505 | i/o timeout, ErrorCode 20505 |
| Root cause | High memory → GC → CN unresponsive | High memory → GC → CN unresponsive |
| Status | Closed 2026-06-11 | Recurred 2026-06-23 |
Suggested Investigation Areas
- Memory reduction: 48 GB/CN is excessive for TPCC 1000W — investigate mpool management, buffer pool sizing, and object allocation patterns
- GC tuning: Consider
GOGCadjustment,SetMemoryLimit, or reducing short-lived object allocation rate - RPC timeout tolerance: 363ms GC pause should not cause connection drops — increase heartbeat/timeout thresholds for internal CN-to-CN communication
- Workload distribution: Prevent all CNs from hitting memory peaks simultaneously
Environment
- Kubernetes cluster: TKE
- MO commit:
435e7da55 - 3 CN pods, 1 DN pod, 2 proxy pods, 3 log pods
Activity
Ariznawlll commentedon Jun 26, 2026
Recurrence: 2026-06-25 sysbench1000w (main branch, commit
42280140b)CI Run: https://github.com/matrixorigin/mo-nightly-regression/actions/runs/28181428924/job/83525020923
Namespace:
mo-main-commit-42280140b-20260625Failed Test
oltp_insert_duplicate(sysbench1000w), data prepare phasesimple_insert_duplicate_10_10000000_prepare:RESULT: FAILEDContext
Same pattern as this issue — CN-to-CN RPC i/o timeout under sustained high-concurrency load. This was the 12th sysbench1000w test after ~70 minutes of continuous 1000-thread workload on a 3-CN cluster:
Error occurred on port 6003 (lockservice/data transfer between CNs), identical to the TPCC failure in this issue. The preceding test (
oltp_delete) also failed with error 20508 (all CN servers busy, see #25164), confirming the cluster was at connection saturation.This confirms error 20505 i/o timeout is not workload-specific — it reproduces across TPCC, sysbench update_pk (#25074), and sysbench insert_duplicate.
Ariznawlll commentedon Jul 7, 2026
New Recurrence: sysbench1000w oltp_read_write (4.1-dev)
Environment
mo-branch-commit-00d2f57ca-20260706Pod IP Mapping
Error
200 FATAL errors all at exactly
20:37:05, all targeting CN10.143.72.191:6003.Affected Queries
All are
UPDATE ... SET k=k+1 WHERE id=Nacross sbtest1-sbtest10:Sysbench Command
TPS Timeline
Analysis
Same pattern as the TPCC 1000W recurrence:
10.143.72.191becomes unresponsive10.143.72.192) cannot reach CN on port 6003 →i/o timeoutThis confirms the issue is not specific to TPCC — it affects any high-concurrency write workload (sysbench oltp_read_write, TPCC new_order, etc.) on multi-CN clusters.
Ariznawlll commentedon Jul 9, 2026
New Recurrence: sysbench1000w INSERT DUPLICATE KEY prepare (main)
Environment
mo-main-commit-b9efcce38-20260709Error
334
Communications link failureerrors duringsimple_insert_duplicate_10_10000000_prepare:Root Cause: CN Memory Pressure
All 3 CNs memory spiked to 44-47 GiB (~85% of 55 GiB limit) during the INSERT DUPLICATE KEY data preparation phase:
Memory Timeline
Other Metrics
dial tcp4: missing addresson CN-to-CN RPC at 08:25:59 (consequence of CN unresponsiveness)Same Pattern as Previous Recurrences
This confirms the issue is specifically triggered by heavy write workloads causing excessive CN memory usage.
VioletQwQ-0 commentedon Jul 15, 2026
PR #25178 added observability that can help analyze the next recurrence of this failure pattern.
When a similar 20505, port 6003 i/o timeout, Communications link failure, or all-CN-busy event occurs, please capture a narrow window around the first client error and check:
These metrics should help establish whether resource pressure, lockservice/MORPC failure, or Proxy rejection happened first. They are diagnostic signals rather than a root-cause fix, and wait_response counts represent affected requests, so phases should not be summed as unique transport failures.
Queries and log filters are documented in docs/observability/mo-ci-regression-failure-queries.md.
Ariznawlll commentedon Jul 20, 2026
New Recurrence: sysbench1000w read_write_1000 — error 20508 "all CN servers are busy" (4.1-dev)
Environment
e15148a42)mo-branch-commit-e15148a42-20260718Error
All 1000 threads failed to initialize —
read_write_1000test could not start at all. This is a new error code (20508) compared to previous recurrences (20505 i/o timeout), but the root cause is the same: CN pods under high memory pressure cannot accept new connections.Pod IP Mapping
Root Cause Analysis
1. Memory Pressure
All 3 CNs at 43.6–47.6 GiB (79–87% of 55 GiB limit) during the failure window. The
read_write_1000test was the 5th sysbench1000w test, and memory accumulated across preceding tests (point_select, read_only, random_points, random_ranges).2. GC STW Pauses
CN
tp-cn-9phcdhad a 244ms GC STW pause, consistent with previous recurrences.3. Connection Authentication Slowdown
CN
tp-cn-9phcdtook ~2.4 seconds to authenticate each new connection (normal <10ms):4. DN OOM Alert
DN triggered
MergeExecutorEvent-PauseDueToOOMAlertwithavailable-mem: 0at 21:23:32.5. Proxy Connection Migration Cascade
At 21:22:30–32, the proxy was massively migrating connections between CNs, but many migrations failed:
6. SQL Execution Slowdown
Multiple queries taking >1 second on CN
tp-cn-9phcd:Causal Chain
Comparison with Previous Recurrences
Error 20508 is a more severe manifestation: the CN pods are so overloaded they reject connections at the Proxy level before any query can be sent.
Additional Impact
The second exit code in this job was a sysbench_update_pk performance regression:
XuPeng-SH commentedon Aug 29, 2026
stale