Skip to content

[Bug] TPCH 1000G Q9: hash build memory budget exceeded (40GB limit) #26593

Closed

Description

@Ariznawlll

环境

Field Value
环境 TKE (3CN + 1DN)
分支 main
Commit 55398caaa9 (8/1 nightly)
Run https://github.com/matrixorigin/mo-auto-test/actions/runs/30710250423

问题

TPCH 1000G Q9 执行时报 hash build memory budget exceeded,查询失败返回空结果,整轮 TPCH 判定 FAILED。

错误信息

ERROR 3015 (HY000): resource exhausted: hash build memory budget exceeded
  requested = 1,540,864 (1.5 MB)
  used      = 42,948,741,760 (40.0 GB)
  limit     = 42,949,672,960 (40.0 GB)

Q9 hash build 用了整 40GB,再加 1.5MB 就超限。Q9 重试 4 次全部失败,结果 0 行(golden 期望 175 行)。

影响

查询 状态
q1~q8 ✅ 全部成功
q9 ❌ OOM × 4 次
q10~q22 ✅ 全部成功

仅 Q9 失败,其他 21 个查询正常。

疑似引入 commit

PR #26472 — fix(join): enforce typed-key equality across spill and runtime filters

  • 合并时间: 2026-08-01T11:30:29Z
  • 改动: +13,544/-2,664,84 个文件
  • 直接修改了:
    • hashbuild/budget.go (+331/-91) — 内存预算逻辑
    • hashbuild/build.go (+687/-96) — hash build 核心
    • hashbuild/hashmap.go (+155/-10)
    • vm/process/hashbuild_budget.go (+139/-26)
    • spillutil/join_spill.go (+267/-37) — spill 行为

7/31 nightly (commit 26ed429b6) Q9 通过,8/1 nightly (commit 55398caaa) Q9 失败,中间 18 个 commit 中 #26472 是唯一修改 hash build 内存管理的。

可能原因

PR 重构了 hash build 内存预算计算方式,可能导致:

  1. 预算计算更保守(同样的 JOIN 现在需要更多预算)
  2. spill 触发条件变了(之前能 spill 到磁盘的现在 spill 不了,直接撞硬限制)
  3. typed-key 编码变宽(key 占用更多内存,build 侧总内存增加)

建议

  1. 确认 Q9 在 PR fix(join): enforce typed-key equality across spill and runtime filters #26472 前后的 hash build 内存用量变化
  2. 调整 processLimitationSize 或 join_spill_mem 配置使 Q9 能 spill 成功
  3. 检查 typed-key 编码是否增加了 per-row 内存开销

Activity

  1. added
    kind/bug
    on Aug 3, 2026
  2. added theissue type on Aug 3, 2026
  3. modified the milestones: MO-202607, MO-202608 on Aug 3, 2026
  4. XuPeng-SH commented on Aug 3, 2026

    @XuPeng-SH
    Contributor

    duplicate with 26586.

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

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions