Skip to content

fix(runtime): close lifecycle races exposed by CI - #1934

Merged
M4n5ter merged 1 commit into
apache:mainfrom
M4n5ter:fix/ci-runtime-race-tests
Aug 3, 2026
Merged

fix(runtime): close lifecycle races exposed by CI#1934
M4n5ter merged 1 commit into
apache:mainfrom
M4n5ter:fix/ci-runtime-race-tests

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Aug 3, 2026

Copy link
Copy Markdown
Member
English

Summary

  • observe foreground Bash cancellation from native process readiness through the durable startup commit, removing the window where a timeout could win only because storage was slow
  • make the cancellation/timeout regression test establish the race with explicit process-discovery and durable-commit gates
  • give the real-process multi-Client execution test its existing process-level deadline while leaving production request defaults unchanged
  • stop new Runtime Host admissions before asynchronous draining-state publication, so an expiring shutdown deadline cannot strand an unreachable, referenced UDS listener

Why

The full workspace CI run after #1928 exposed two independent existing timing assumptions under parallel load. A high-load reproduction also exposed a shutdown ordering bug that could leave the Host test process alive after its socket path had already been removed.

These changes make the lifecycle boundaries causal instead of relying on child-output timing, fixed sleeps, or a fast filesystem.

Verification

  • ShellRun cancellation/timeout regression: 100 consecutive Storage-stress passes
  • multi-Client execution regression: 20 consecutive Storage-stress passes
  • Host kernel lifecycle suite: 8 concurrent suites, 240/240 tests passed with no listener residue
  • complete affected-workspace CI test matrix with Storage stress on the latest main
  • build, format, lint, typecheck, and diff checks
简体中文

概要

  • foreground Bash 从原生进程 ready 到 durable startup 提交期间持续监听取消,消除存储变慢时 timeout 意外抢先的空窗
  • cancellation/timeout 回归测试通过显式的进程发现门控和 durable commit 门控构造竞态
  • 真实进程的多 Client execution 测试使用已有的进程级 deadline,生产默认 request deadline 保持不变
  • Runtime Host 在异步发布 draining 状态之前停止新连接,避免 shutdown deadline 到期后遗留不可达但仍被引用的 UDS listener

原因

#1928 合并后的完整 workspace CI 在并行负载下暴露了两个彼此独立的既有时序假设。高负载复现还发现了一处 shutdown 顺序问题:socket 路径已经移除后,Host 测试进程仍可能因 listener 未关闭而存活。

这些修改让生命周期边界由明确事件决定,不再依赖子进程输出时机、固定 sleep 或快速文件系统。

验证

  • ShellRun cancellation/timeout 回归测试在 Storage stress 下连续通过 100 次
  • 多 Client execution 回归测试在 Storage stress 下连续通过 20 次
  • Host kernel 生命周期套件并发运行 8 份,240/240 通过且无 listener 残留
  • 在最新 main 上通过带 Storage stress 的完整 affected-workspace CI 测试矩阵
  • build、format、lint、typecheck 与 diff 检查

@M4n5ter
M4n5ter marked this pull request as ready for review August 3, 2026 05:26
@M4n5ter
M4n5ter merged commit cd20185 into apache:main Aug 3, 2026
5 checks passed
@M4n5ter
M4n5ter deleted the fix/ci-runtime-race-tests branch August 3, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant