Skip to content

[Bug]: Nightly regression 中 objectio 层频繁 COS 超时 / 502 导致多个 benchmark 测试失败 #24998

Closed

Description

@aptend

Environment

Actual Behavior

本次 Main Nightly run 中,3 个不同的 benchmark job 均因 COS 对象存储访问超时而失败。
分析 MO 集群日志后发现,这些 COS 超时并非外部基础设施问题,而是 MO 的 objectio / fileservice 层内部错误引发的级联故障。


1. TPCH BENCHMARK TEST (job 81483114974)

时间: 2026-06-15 18:02:17 UTC
错误: tpch_1000g.lineitem 加载失败(COS PUT 返回 502)

2026-06-15 18:02:17 ERROR 1105 (HY000) at line 1: PUT https://mo-nightly-gz-1308875761.cos.ap-guangzhou.myqcloud.com/mo-benchmark-27560224020/data/019ecc72-c6f2-77f8-add1-d6d1f6604b41_00000: 502 (Message: , RequestId: , TraceId: )
2026-06-15 18:02:17 The data for table tpch_1000g.lineitem has failed to be loaded.

影响: lineitem 加载失败导致 q1, q3-q21 共 17 个 TPCH 查询全部无法执行。


2. SYSBENCH OLTP TEST 1000W (job 81515382697)

时间: 2026-06-15 21:25:17 - 22:17:31 UTC
错误: 多次 COS GET 超时 + 连接断开

# 21:25:17 - COS GET 超时(oltp_read_write 期间)
ErrorTime : 2026-06-15 21:25:17
ErrorCode : 1105
ErrorMessage : Get "https://mo-nightly-gz-1308875761.cos.ap-guangzhou.myqcloud.com/mo-benchmark-27560224020%2Fdata%2F019ecd2a-8dd6-7bf1-a917-e71c52e16c6a_00000": net/http: timeout awaiting response headers

# 21:25:24 - COS GET 超时
ErrorTime : 2026-06-15 21:25:24
ErrorMessage : Get "https://mo-nightly-gz-1308875761.cos.ap-guangzhou.myqcloud.com/mo-benchmark-27560224020%2Fdata%2F019ecd2a-8db5-74a5-bf03-f1ea5cab2c9d_00000": net/http: timeout awaiting response headers

# 21:28:05-21:28:23 - 连接断开(3次)
ErrorTime : 2026-06-15 21:28:05
ErrorCode : 0
ErrorMessage : Communications link failure

# 21:30:06
RESULT : FAILED

# 22:11:22 - nopk_index_point_select 致命错误
FATAL: mysql_stmt_execute() returned error 1105 (Get "https://mo-nightly-gz-1308875761.cos.ap-guangzhou.myqcloud.com/mo-benchmark-27560224020%2Fdata%2F019ecd55-6979-7bf2-81bb-52f5afbc5ae3_00001": net/http: timeout awaiting response headers) for query 'SELECT c FROM sbtest6 WHERE id=?'
22:12:02 sysbench_nopk_index_point_select_10_10000000 test have fatal error, exit

# 22:17:31 - nopk_index_incr_point_select 致命错误
FATAL: mysql_stmt_execute() returned error 1105 (Get "https://mo-nightly-gz-1308875761.cos.ap-guangzhou.myqcloud.com/mo-benchmark-27560224020%2Fdata%2F019ecd59-88a5-77b1-890a-40f8f8bf5e61_00002": net/http: timeout awaiting response headers) for query 'SELECT c FROM sbtest7 WHERE id=?'
22:20:11 sysbench_nopk_index_incr_point_select_10_10000000 test have fatal error, exit

3. IVF PRE POST FILTER VECTOR RECALL TEST (job 81538449725)

时间: 2026-06-15 23:44:09 UTC
错误: COS GET 超时导致向量查询失败

query failed: (1105, 'Get "https://mo-nightly-gz-1308875761.cos.ap-guangzhou.myqcloud.com/mo-benchmark-27560224020%2Fdata%2F019ecd83-010f-78c5-870b-e01bc263cb72_00006": net/http: timeout awaiting response headers')

MO 内部错误分析

A. objectio/cache.go:354 — "dedup load did not complete"(贯穿整个 run)

这是最关键的内在线索。从 run 开始到结束,DN 和所有 CN 节点都在持续报此错误:

{"level":"ERROR","caller":"objectio/cache.go:354","msg":"error: internal error: dedup load did not complete"}

错误频次统计(每 5 分钟窗口):

时间段 DN (dn-0) CN 合计
17:30-18:00 (30min) 1928 535
21:20-21:25 651 —
21:25-21:30 611 —
22:00-22:05 787 —
22:10-22:15 580 —

这个错误从 COS 超时发生前就已经大量存在,说明这是 MO 内部持续性 bug,不是由外部触发的。

B. fileservice/http_trace.go:106 — HTTP 连接池管理异常

DN 和所有 CN 在整个 run 期间持续报 HTTP 连接池关闭错误:

{"level":"INFO","caller":"fileservice/http_trace.go:106","msg":"PutIdleConn error","error":"http: putIdleConn: CloseIdleConnections was called"}

每 5 分钟约 70-210 次,说明 HTTP Transport 的连接池频繁被重置,可能导致 COS 请求复用连接失败。

C. 23:44 时段(IVF 超时期间)的集群状态

# DN 无法连接 log-0(集群中不存在 log-0)
{"level":"ERROR","caller":"morpc/backend.go:1003","msg":"init remote connection failed, retry later",
 "remote":"nightly-regression-dis-log-0.nightly-regression-dis-log-headless..."}

# Proxy 握手失败
{"level":"ERROR","caller":"proxy/client_conn.go:310","msg":"failed to handle Handshake response"}

# CN task 心跳失败
{"level":"ERROR","caller":"taskservice/task_service.go:268","msg":"error: invalid task"}
{"level":"ERROR","caller":"taskservice/task_runner.go:647","msg":"task heartbeat failed"}

集群资源使用(21:25 COS 超时时刻)

Pod Memory (GB) CPU (cores)
cn-j9hnp 43.23 3.20
cn-w7rbn 41.68 8.44
cn-4pd9q 27.94 1.48
dn-0 38.84 5.99

集群没有 OOM 或 CrashLoopBackOff,资源使用在正常范围内。

Expected Behavior

MO 的 objectio/fileservice 层应该能够稳定地访问 COS 对象存储,不应在高并发 workload 下产生大量内部错误和 COS 超时。

Root Cause Analysis

  1. objectio/cache.go:354 的 "dedup load did not complete" 是一个持续性 bug,从 run 启动就一直存在,影响 DN 和所有 CN 节点。
  2. fileservice/http_trace.go 的 HTTP 连接池频繁被 CloseIdleConnections 重置,可能导致 COS 请求无法正确复用连接,引发超时或 502。
  3. COS 超时是 MO 内部问题的症状,不是根因。三类不同的 COS 错误(PUT 502、GET timeout、连接断开)都指向 MO 的 HTTP 客户端 / 连接管理存在问题。
  4. 错误发生在 objectio/cache.go(去重加载缓存机制)和 fileservice/http_trace.go(HTTP 连接管理),建议排查这两个模块。

Steps to Reproduce

  1. 在 TKE 环境部署 main 分支集群(3 CN + 1 DN + 3 LOG + 2 Proxy)
  2. 执行 SYSBENCH 1000W(10 表 × 1000 万行,1000 并发线程)
  3. 执行 TPCH 1000G lineitem 加载
  4. 执行 IVF 向量检索(wiki_all_10m 数据集,100 并发)
  5. 观察 objectio/cache.go:354 和 fileservice/http_trace.go:106 的 ERROR 日志

Related Logs

  • Loki 查询(namespace=mo-main-commit-9b4b808c3-20260615):
    {namespace="mo-main-commit-9b4b808c3-20260615"} |~ "dedup load did not complete"
    {namespace="mo-main-commit-9b4b808c3-20260615"} |~ "PutIdleConn"
    

Activity

  1. added
    kind/bug
    on Jun 16, 2026
  2. aptend commented on Jun 17, 2026

    @aptend
    ContributorAuthor

    SYSBENCH 1000W 补充证据 — 06-16 nightly run (commit d3aadea)

    Run: https://github.com/matrixorigin/mo-nightly-regression/actions/runs/27631195708
    Namespace: mo-main-commit-d3aadea88-20260616 (TKE)

    现象

    SYSBENCH 1000W 中有 4 个 case 出现 COS 超时 fatal error:

    net/http: timeout awaiting response headers
    

    目标均为 mo-nightly-gz-130885761.cos.ap-guangzhou.myqcloud.com。

    另有 4 个 case (vuser=1000) 出现 25-33% TPS 回归。

    根因分析

    日志显示 COS 超时前均有 MemoryThrottler-RSSScavenge 触发事件:

    • RSS 达到 47.32GiB,接近 cgroup limit (55GiB)
    • 触发 free-os-memory=true, evict-cache=true
    • 调用 CloseIdleConnections 强制重置 HTTP 连接池
    • 导致正在进行的 COS (S3) 请求被中断

    CN 日志中同时观察到大量 dedup load did not complete(objectio/cache.go:354),与 #24998 描述的 metadata cache 压力下 dedup 机制失效一致。

    结论:MemoryThrottler-RSSScavenge 是触发 CloseIdleConnections 的直接原因,而非 COS 基础设施问题。这与 #24998 的 bug pattern 完全吻合。

    关于修复 commit 的覆盖情况

    ⚠️ 06-16 nightly run (commit d3aadea) 未包含以下关键修复:

    Commit PR 描述 是否包含
    bdb848db2 #24387 fix: reduce RSS growth from dedupLoad sync.Map retention ✅ 已包含
    8c6e37f8c #24615 fix: port minimal RSS cache pressure protection to main ✅ 已包含
    18d8b4d20 #24535 fix: reduce CN RSS pressure under TPCC ❌ 未包含
    58c90b8c2 #24543 fix: keep cache pressure target under high RSS ❌ 未包含
    e941462e2 #24612 fix: restore minimal RSS cache pressure protection ❌ 未包含

    此外,PR #24999 (fix-qcloud-cos-retryable-status) 于 2026-06-17T01:37:14Z 合入 main,增强了 COS 请求的重试容错能力。PR #25009 (cherry-pick to 4.0-dev) 于 2026-06-16T10:45:15Z 合入。

    下一步

    今天 (06-17) 的 nightly run 将包含上述所有修复 commit,届时验证:

    1. COS 超时 fatal error 是否消除
    2. MemoryThrottler 触发频率是否降低
    3. TPS 回归是否恢复

    将持续跟进测试结果。

  3. jiangxinmeng1 commented on Jun 29, 2026

    @jiangxinmeng1
    Contributor

    #25009 修掉了

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

Metadata

Metadata

Assignees

Labels

kind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions