Repository navigation
Description
Description
BUILD MO DOCKER IMAGE 在广州 DinD runner 冷构建时稳定失败。thirdparties/download 对 21.9 MiB ONNX Runtime 文件设置了单次 120 秒传输上限;当前 runner 到 GitHub raw 的实际速度不足以在该时间内完成。每次重试都会丢弃已下载部分并从零开始,最终 make -C thirdparties 以 curl 28 退出,整条 nightly 被阻断。
Environment
- Branch:
main - Commit:
c58cd292d3e6e039a8882654d3b20ad345171e87 - Deployment: GitHub Actions self-hosted Guangzhou DinD runner,
docker build -f optools/images/Dockerfile - Affected dependency: ONNX Runtime 1.26.0, linux_x64, 23,023,576 bytes
Steps to reproduce
-
在广州 DinD runner 上使用未命中目标镜像和 native layer 缓存的新 MatrixOne commit。
-
执行 nightly 中的构建命令:
docker build -t <image>:commit-<sha> \ -f optools/images/Dockerfile . \ --build-arg GOPROXY="http://goproxy.goproxy.svc.cluster.local"
-
Dockerfile native stage 执行:
make -C thirdparties
-
观察
thirdparties/download下载固定 SHA-256 的 ONNX Runtime 文件。
Actual behavior
失败运行 30835724962 中,4 次传输均在约 120 秒后退出;每次只完成约 4.7-5.7 MiB:
curl: (28) Operation timed out after 119708 milliseconds
curl: (28) SSL connection timeout
dependency download failed with curl exit code 28
make: *** [Makefile:192: onnxruntime] Error 1
运行 30757360790 中也出现相同结果,4 次传输仅完成约 1.6-2.0 MiB 后分别被丢弃。两个使用当前下载器的冷构建共 8/8 次传输失败。
Expected behavior
在连接持续有下载进度且最终文件满足大小上限及 SHA-256 校验时,慢速外网不应仅因固定 120 秒总时长而使构建失败。重试应保留安全可验证的部分下载,或构建应从广州可稳定访问的内部制品源/持久缓存获取该固定依赖。
Stability and controls
- Reproducer: 当前下载器在两个连续 nightly 冷构建中共 8/8 次默认传输失败。
- Control: 2026-08-01 的构建对同一 21.9 MiB 文件持续下载约 14 分 35 秒后成功,SHA-256 校验通过;证明文件和固定源可用,但 120 秒上限与实际链路速度不兼容。
- Failure atomicity/data check: 下载器没有发布校验失败的目标文件,失败关闭行为正确;问题是可完成的慢速下载被提前终止,导致镜像未构建。
Evidence
- 首次失败 Job: https://github.com/matrixorigin/mo-nightly-regression/actions/runs/30835724962/job/91761580796
- 同类失败 Run: https://github.com/matrixorigin/mo-nightly-regression/actions/runs/30757360790
- 成功慢速下载对照 Run: https://github.com/matrixorigin/mo-nightly-regression/actions/runs/30708854656
- 引入当前下载器的 PR: build: harden native downloads and development safeguards #26577
Code analysis
thirdparties/download默认MO_DOWNLOAD_MAX_TIME_SECONDS=120,curl 使用--max-time 120。- 23,023,576 字节需要平均约 187 KiB/s 才能在 120 秒内完成;失败 runner 实测约 14-47 KiB/s。
- curl 重试没有启用断点续传,日志明确显示每轮
Throwing away ... bytes,四次机会无法累计进度。 - Dockerfile 将依赖放入独立 native stage,但 nightly 使用普通
docker build,未配置跨临时 DinD runner 的--cache-from/--cache-to,新 tag 冷构建仍需直接访问 GitHub。 - 最新 main 的
thirdparties/downloadblob 与失败提交一致,问题仍存在。
Regression coverage
修复应增加 shell 回归测试:模拟一个持续产生下载进度但单次窗口不足以完成的传输,验证重试可续传并在最终 SHA-256 校验后原子发布;同时覆盖无进度超时、校验失败、超过大小限制和已验证缓存复用。
Related
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't working
Activity
Ariznawlll commentedon Aug 4, 2026
根因补充与建议的长期方案
最新分支验证 mo-nightly-regression run 30883927322 表明,这个问题不只是固定 120 秒总超时:
nativestage 时执行make -C thirdparties。MO_DOWNLOAD_MAX_TIME_SECONDS从 120 秒调大,或者增加断点续传,无法解决“连接都建立不起来”的场景。当前缓存现状
MatrixOne
main的native-dependency-check.yml当前使用的是 GitHub Actions Cache:它没有把 native BuildKit 缓存发布到腾讯云 TCR。广州的
mo-nightly-regression属于另一个仓库和 runner 环境,不能直接复用 MatrixOne 仓库的 GHA 缓存,所以新 commit 在缓存未命中时仍会冷构建并访问 GitHub 下载 ONNX。建议的根治方案
将缓存生产和消费分开:
具体建议:
MatrixOne
mainnative CI 作为唯一缓存生产者optools/images/Dockerfile的nativestage。push main事件登录 TCR,并将 amd64/arm64 缓存分别导出到稳定的 TCR cache tag。广州 nightly 只读取 TCR 缓存
cache-from: type=registry,ref=<tcr>/buildcache-native-amd64。cache-to,也不让广州 runner 承担冷缓存生产。main,如果预期缓存不存在,明确失败或等待 main native CI 生产完成,不再静默回退到 GitHub 冷下载。nativestage 的分支保留兼容路径。保证生产端与消费端的缓存键一致
thirdparties/**、cgo/**、Dockerfile、基础镜像或相关构建参数变化时,由 MatrixOne main CI 自动重新生成缓存;未变化时RUN make -C thirdparties应直接命中CACHED。凭据与权限
main的受保护 workflow;nightly 使用只读凭据。对现有 nightly PR 的调整
mo-nightly-regression#1328 已验证 registry cache 方向,但当前实现仍尝试让广州 runner 在冷缓存时生成并写回缓存。建议调整为:
cache-to;cache-from;这样不会修改 ONNX URL、
thirdparties/Makefile或开源用户的下载行为,同时能把 ONNX 下载和 native 编译从广州 runner 的关键路径中移除。Ariznawlll commentedon Aug 4, 2026
https://github.com/matrixorigin/mo-nightly-regression/commit/c237bb46cd7ace0158f9cfac9fec8d1f9c07dca7
gouhongshen commentedon Aug 14, 2026
Reopened with a recurrence outside PR #27134's scope.
The MatrixOne ALL CI coverage run 31755103070, job 94629148612 failed before any Go test ran or a JSON test report was produced. Its self-hosted runner is behind the CI HTTPS proxy and
make thirdpartiesinvoked:The 23,023,576-byte ONNX Runtime download reached only 3,465,408 bytes, then exited after 119,108 ms with
curl: (28) Operation timed out; subsequent retries ended in connection/SSL timeouts. The runner later also failed three attempts to clonematrixorigin/CIwith GnuTLS handshake termination, corroborating runner-proxy connectivity loss rather than a MatrixOne test failure.The current
thirdparties/downloadstill defaultsMO_DOWNLOAD_MAX_TIME_SECONDSto120; the intended fix in closed, unmerged PR #26671 raised that limit and added a low-speed timeout. PR #27134 changes only snapshot-scope code/tests and does not touch the downloader or its inputs.This is the same source, artifact version, hard transfer limit, and curl-28 behavior documented in this issue. The failed job will be retried once under its attempt-1 workflow policy.
ci: reuse preloaded ONNX Runtime artifact (#27325)
ci: reuse preloaded ONNX Runtime artifact (matrixorigin#27325)
ci: reuse preloaded ONNX Runtime artifact (matrixorigin#27325)
ci: reuse preloaded ONNX Runtime artifact (matrixorigin#27325)
build: reuse verified dependency cache without unnecessary chmod
build: reuse verified dependency cache without unnecessary chmod
build: preserve safe modes on verified dependency cache hits
build: preserve safe modes on verified dependency cache hits
ci: preserve the ci-builder cache export layer order
[4.2-dev] ci: reuse verified ONNX Runtime in builds (#33421)
ci: reuse verified ONNX Runtime from the shared builder (#33427)