Description
Description
On the current 4.2-dev Chaos environment, the Sysbench simple_insert_10_100000_auto workload can stop making progress immediately after a TN/DN kill. TPS remains at 0 for 43–75 minutes even after the replacement TN pod is Ready, and only resumes after a later CN kill.
This has happened 4 times in 197 task_kill_dn injections in the same long-running environment. The temporal correlation is strong, but the server-side root cause still needs confirmation.
Environment
- Branch:
4.2-dev - MatrixOne commit:
92db870eecaccc6ceea6b42f004170d14daaa6ab - Image:
commit-92db870 - Topology: 2 CN / 1 TN / 3 LogService / 1 Proxy
- Namespace:
mo-chaos-4-2-dev-aaac595-202608161347 - Chaos workflow: https://github.com/matrixorigin/mo-nightly-regression/actions/runs/31928891852
- Image update workflow: https://github.com/matrixorigin/mo-nightly-regression/actions/runs/32735853847
- Workload:
simple_insert_10_100000_auto, 25 threads, 10 tables
Steps to reproduce
- Deploy a distributed MatrixOne cluster with 2 CNs, 1 TN, 3 LogService pods, and 1 Proxy.
- Start the Sysbench
simple_insert_10_100000_autoworkload with 25 threads and confirm non-zero TPS. - Inject
task_kill_dn/ TN PodChaos for about 30 seconds. - Wait for the replacement TN pod to become Ready and continue monitoring workload progress.
- Repeat because the issue is intermittent (observed 4/197 injections in this run).
- As a diagnostic only, kill one CN after the workload has remained at TPS=0; in all four observed incidents, TPS resumed within seconds.
Actual behavior
Latest incident on 2026-08-25:
| Time | Event |
|---|---|
| 09:30:13 | task_kill_dn executed |
| 09:30:14 | TN PodChaos created |
| 09:30:18 | Last healthy sample before the stall: tps=407, suc=167072138, err=15941 |
| 09:30:28 | TPS became 0 |
| 09:30:44 | Chaos cleanup succeeded |
| 10:15:37 / 10:17:37 | Inserts returned error 1205 after 120 seconds: Lock wait timeout exceeded; try restarting transaction |
| 10:25:38 | Still tps=0; success count was effectively frozen: suc=167072139, err=16031 |
| 10:29:18 | A later task_kill_cn was executed |
| 10:29:38 | TPS recovered |
| 10:30:08 | tps=373, suc=167087031, err=16053 |
Observed long stalls in the same run:
| Date | TPS=0 interval | Duration | Trigger / recovery |
|---|---|---|---|
| Aug 17 | 07:02:18–07:45:18 | ~43 min | Started after kill_dn; recovered after kill_cn |
| Aug 22 | 07:18:31–08:33:31 | ~75 min | Started after kill_dn; recovered after kill_cn |
| Aug 22 | 10:26:51–11:13:51 | ~47 min | Started after kill_dn; recovered after kill_cn |
| Aug 25 | 09:30:28–10:29:28 | ~59 min | Started after kill_dn; recovered after kill_cn |
During a stall, insert requests against different sbtest tables block for 120 seconds and then return error 1205. The workload process remains alive, but it makes no successful progress.
Expected behavior
After the replacement TN becomes Ready, active Sysbench insert traffic should recover within a bounded time without requiring a CN kill. A TN failure must not leave surviving CN sessions or transaction/lock state permanently unable to make progress.
Stability and control observations
- Reproduction rate in this environment: 4/197
task_kill_dninjections (~2%); the issue is intermittent. - Before the latest fault TPS was 407; after the diagnostic CN reset it recovered to 373.
- All 7 MatrixOne pods were Ready after recovery.
- TPCC consistency checks continued to pass; no durable data corruption was observed.
- No corresponding panic or OOM was found for the incident.
- Other workloads recovered, so this was not a complete cluster outage.
- A paired
mainChaos environment on commitb89a639b0c4ac30ae143cae3b67925678d347d3bdid not show this exactkill_dn -> long TPS=0 -> kill_cn recoverysignature across 197 TN kills. However, that environment was not running the currentmaintip (6dccc954a1a32c12a2114328c752f15cf97ef2ba), so latest-main validation is still required.
Preliminary analysis
The confirmed boundary is that the workload stays alive and receives 120-second lock wait timeouts after TN replacement, while replacing a CN immediately clears the condition. This suggests stale or blocked transaction/lock/session state associated with a surviving CN after TN recovery, but this is only a hypothesis.
Please inspect the lock service, transaction recovery, and surviving CN session state around the TN restart. In particular, determine why progress is not restored when the TN is Ready and why a subsequent CN replacement clears the condition.
Suggested regression coverage
Add a Chaos assertion for the Sysbench insert workload after kill_dn:
- Require successful-row progress and non-zero TPS to resume within a bounded recovery deadline (for example, 5 minutes) after the TN is Ready.
- Fail if recovery requires a later CN kill.
- Keep the existing consistency checks to distinguish availability failures from data-integrity failures.
Duplicate search / related issues
No matching open or closed issue was found using the signatures task_kill_dn, TPS=0, and Lock wait timeout exceeded.
- [Bug] TPCC warehouse=1000 Go GC 长暂停(500-900ms)导致 Lock wait timeout(4.2-dev / main 均偶现) #26182 is about TPCC lock-wait timeouts caused by a long Go GC pause, with a different workload and trigger.
- [Bug]: surviving CN retries killed CN pipeline endpoint for 1000s after replacement is Ready #27523 is about a surviving CN retrying a killed CN pipeline endpoint, which is a different CN-kill recovery path.
Activity
[4.2] fix(lockservice): avoid bind fence cleanup deadlock (#27569)
Ariznawlll commentedon Aug 26, 2026
测试版本
4.2-devd2393868a7aaa6343518d80849fe4696aa3577e9commit-d239386mo-chaos-4-2-dev-aaac595-202608161347原问题验证
修复 PR #27569 合入并完成镜像更新后,持续观察
simple_insert_10_100000_auto,重复执行 11 次task_kill_dn。验证标准是 TN 恢复后 5 分钟内成功行数继续增长、TPS 恢复为非零,并且不依赖后续 CN kill。11 次 TN kill 均满足恢复标准。各次故障窗口内最长连续
TPS=0为约 20–50 秒;每个 5 分钟观察窗口内成功行数增加约 47,700–78,695,没有再次出现原问题中持续 43–75 分钟无进展、必须 kill CN 才恢复的现象。Happy Path 覆盖
Running/Ready,测试进程持续运行。Unhappy Path 覆盖
1205 Lock wait timeout,但没有形成持续 TPS 停滞或成功行数冻结,不符合本 Issue 的原始故障特征。白盒验证
本次现场验证未额外执行白盒注入。修复 PR #27569 包含了 lockservice 的确定性回归测试,并记录了 focused
-race -count=100与完整pkg/lockservice测试结果。回归测试
task_kill_dn,均满足 5 分钟内恢复成功写入的验收条件。测试证据
commit-d239386;Pod 状态:7/7 Running/Ready测试结论
测试通过。