Skip to content

[Bug]: [4.2-dev Chaos] Sysbench insert TPS remains zero after TN kill until a CN is killed #27562

Closed

Description

@Ariznawlll

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

Steps to reproduce

  1. Deploy a distributed MatrixOne cluster with 2 CNs, 1 TN, 3 LogService pods, and 1 Proxy.
  2. Start the Sysbench simple_insert_10_100000_auto workload with 25 threads and confirm non-zero TPS.
  3. Inject task_kill_dn / TN PodChaos for about 30 seconds.
  4. Wait for the replacement TN pod to become Ready and continue monitoring workload progress.
  5. Repeat because the issue is intermittent (observed 4/197 injections in this run).
  6. 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_dn injections (~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 main Chaos environment on commit b89a639b0c4ac30ae143cae3b67925678d347d3b did not show this exact kill_dn -> long TPS=0 -> kill_cn recovery signature across 197 TN kills. However, that environment was not running the current main tip (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:

  1. Require successful-row progress and non-zero TPS to resume within a bounded recovery deadline (for example, 5 minutes) after the TN is Ready.
  2. Fail if recovery requires a later CN kill.
  3. 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.

Activity

  1. added this to the MO-202608 milestone on Aug 25, 2026
  2. added
    kind/bug
    on Aug 25, 2026
  3. added theissue type on Aug 25, 2026
  4. added
    severity/s0
    and removed on Aug 25, 2026
  5. Ariznawlll commented on Aug 26, 2026

    @Ariznawlll
    CollaboratorAuthor

    测试版本

    • 分支:4.2-dev
    • commit:d2393868a7aaa6343518d80849fe4696aa3577e9
    • 镜像:commit-d239386
    • 部署方式:分布式 2 CN / 1 TN / 3 LogService / 1 Proxy,Chaos namespace mo-chaos-4-2-dev-aaac595-202608161347
    • 测试日期:2026-08-26

    原问题验证

    修复 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 覆盖

    1. 无 TN 故障时,Sysbench insert 持续产生非零 TPS,成功行数持续增长。
    2. 当前 7 个 MatrixOne Pod 均为 Running/Ready,测试进程持续运行。

    Unhappy Path 覆盖

    1. 连续覆盖 11 次 TN PodChaos kill;每次均在 5 分钟恢复期限内继续产生成功写入,无需额外 kill CN。
    2. 修复后日志中出现过 2 次孤立的 1205 Lock wait timeout,但没有形成持续 TPS 停滞或成功行数冻结,不符合本 Issue 的原始故障特征。
    3. 未发现 TN kill 后超过 5 分钟仍无业务进展的情况。

    白盒验证

    本次现场验证未额外执行白盒注入。修复 PR #27569 包含了 lockservice 的确定性回归测试,并记录了 focused -race -count=100 与完整 pkg/lockservice 测试结果。

    回归测试

    测试证据

    测试结论

    测试通过。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s0

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions