Skip to content

[Bug] TPCC 1000 terminals hits dispatch process registration timeout during STOCK_LEVEL query #24930

Closed

Description

@Ariznawlll

问题描述

Nightly regression 的 TPCC 1000 warehouses / 1000 terminals 场景失败。失败不是数据加载问题,也不是 consistency check 不一致,而是 TPCC 运行过程中有一次 STOCK_LEVEL 事务收到 MatrixOne 返回的 20101 internal error。

Failed job:
https://github.com/matrixorigin/mo-nightly-regression/actions/runs/27319404342/job/80709413719

MatrixOne commit:
b860e97918fce957f4a51f95d2115154eb808572

mo-tpcc commit from job log:
4d1dcc3f882e02e86a6c4e19aa487ad051358a02

失败现象

失败 step:
Start TPCC 1000 Warehouses 1000 terminals Test

配置:

warehouses=1000
terminals=1000
runMins=5
socketTimeout=600000
conn=jdbc:mysql://172.16.53.128:6001/tpcc_1000

关键错误:

2026-06-11 03:01:30 FATAL jTPCCTerminal:237 - [UNEXPECTED][STOCK_LEVEL][EXECUTION] ErrorCode : 20101, ErrorMessage : internal error: dispatch process not registered within 30s, remote CN may have failed

benchmark 后续跑满 5 分钟,consistency check 通过,但因为 benchmarksql-error.log 中存在 UNEXPECTED,step 最终返回 1:

Measured tpmC (NewOrders) = 7967.1
Measured tpmTOTAL = 17578.73
Measured tpmE (ErrorCount) = 0.19
Transaction Count = 88730
Transaction Error = 1
Consistency verification successfully.
There are some unexpected error in benchmarksql-error.log.

复现步骤

在 nightly 4.0-dev 环境运行 TPCC 1000 warehouses / 1000 terminals:

cd mo-tpcc
cp props.mo props_1000.mo
sed -i '/.*terminals=*/c\terminals=1000' props_1000.mo
sed -i '/.*warehouses=*/c\warehouses=1000' props_1000.mo
sed -i 's/tpcc/tpcc_1000/g' props_1000.mo
sed -i 's/127.0.0.1/<mo_proxy_ip>/g' props_1000.mo
sed -i '/runMins=*/c\runMins=5' props_1000.mo
sed -i '/expectedErrorCodes=/d' props_1000.mo
sed -i 's/socketTimeout=60000/socketTimeout=600000/g' props_1000.mo
./runBenchmark.sh props_1000.mo
./runVerify.sh props_1000.mo

本次 job 中使用的 MO proxy IP 是 172.16.53.128,CN/DN profile IP 为:

tp_cn_0_ip=10.143.33.3
tp_cn_1_ip=10.143.33.5
dn_0_ip=10.143.33.0
namespace=mo-search-commit-b860e9791-20260611

已定位信息

mo-tpcc 中该错误来自 STOCK_LEVEL 事务的 executeQuery()。对应查询是低库存查询,形态如下:

SELECT count(*) AS low_stock
FROM (
  SELECT s_w_id, s_i_id, s_quantity
  FROM bmsql_stock
  WHERE s_w_id = ?
    AND s_quantity < ?
    AND s_i_id IN (
      SELECT ol_i_id
      FROM bmsql_district
      JOIN bmsql_order_line
        ON ol_w_id = d_w_id
       AND ol_d_id = d_id
       AND ol_o_id >= d_next_o_id - 20
       AND ol_o_id < d_next_o_id
      WHERE d_w_id = ? AND d_id = ?
    )
) AS L;

mo-tpcc 代码路径:

src/main/java/io/mo/jTPCCTData.java
executeStockLevel() -> stmt.executeQuery()

MatrixOne 侧错误文案对应 remote pipeline 注册等待超时:

pkg/sql/compile/remoterunServer.go
GetProcByUuid()
moerr.NewInternalErrorf(..., "dispatch process not registered within %s, remote CN may have failed", waitRegistrationTimeout)

waitRegistrationTimeout = 30 * time.Second。

这说明发起端等待 remote CN 上的 dispatch process 注册,但 30s 内没有等到。该 SQL 运行期间 JDBC 连接没有被判断为失效,错误是 MO 返回的执行期 internal error。

期望结果

TPCC 1000 warehouses / 1000 terminals 运行期间,不应出现 20101 internal error。即使高并发下 remote CN 压力较大,也不应该让正常查询以 internal error 失败。

建议继续排查

请重点检查本次 namespace 中 2026-06-11 03:01:00 ~ 03:01:35 三个 CN 的日志,搜索:

dispatch process not registered
remote receiver
PutProcIntoUuidMap
pipeline
panic
oom
restart

本地当前无法连接 TKE API server (https://10.129.0.7) 拉取 pod 日志,所以 issue 里先附 Actions log 和源码定位信息。

Activity

  1. added
    kind/bug
    severity/s0
    on Jun 15, 2026
  2. added theissue type on Jun 15, 2026
  3. added this to the MO-202606 milestone on Jun 15, 2026
  4. modified the milestones: MO-202606, MO-202607 on Jun 30, 2026
  5. added
    ai-medium
    and removed
    severity/s0
    ai-medium
    on Jul 1, 2026
  6. XuPeng-SH commented on Aug 29, 2026

    @XuPeng-SH
    Contributor

    stale

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

Metadata

Metadata

Assignees

Labels

deferredkind/bug

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions