Repository navigation
test: isolate engine race wave before heavy UTs - #28976
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Force deep review 结果(当前 head 2d599cd):
结论:这是有效的 constrained-runner scheduling mitigation,但目前还不能证明是 root-cause fix;也没有证据表明是在故意吞掉失败。把 HEAVY_RACE_PARALLEL 从 3 降到 2 确实移除了 engine/resource 的跨 package overlap,但仍允许两个 heavy package 同时运行,task count 不能证明 16GiB runner 的 memory headroom。请补可比的 16GiB budget=3/2 runs、memory peak/events、CPU pressure、ISCP first-iteration latency 和 wall time。
另有 P2:ut_schedule_test.go:256-287 的 concurrency oracle 不完整。engine 是 mock,heavy-finished 在 heavy process 真正退出前写入;错误的 overlapping scheduler 可能在 heavy 先写 marker 时仍通过。请用 admission/completion barriers 证明 engine 等待 process 完成,并验证两个 engine shards 确实并行;同时补新 default 下的 failure cases,现有 failure rows 使用 budget 3。
源码检查确认 stronger runner 显式设置 HEAVY_RACE_PARALLEL=3 仍保留并行,race/test selection 未被删,heavy/engine/plan failure 仍进入 UT_TEST_STATUS,未发现 cleanup regression。当前建议按 workaround 处理,待资源因果和并发证据补齐后再判断为完整修复。
733a848 to
20358d7
Compare
XuPeng-SH
left a comment
There was a problem hiding this comment.
Force deep review @ 20358d7
结论:达到 approve-standard;自有 PR 按规则提交 COMMENT。
已确认:
- engine helper 完成 wait、记录退出状态并消费 report 后,才 admission plan/resource;没有修改生产 ISCP、放宽断言、增加 retry 或 skip;
- 默认调度为 engine 独占后 plan(1)+resource(2),仍使用三槽预算;engine failure/report failure 保持最终失败状态;
- TERM 暂存与 trap restore、helper/child PID registration、process group、FD 7 report-open failure drain、join/report ordering 均未发现确定的 orphan、hang 或 partial-report;
- exact-head Ubuntu UT 日志确认 engine 两 shard 先运行,随后才启动 plan/resource,CI 通过。
边界:HEAVY_RACE_PARALLEL 是阶段性 process/task budget,不是覆盖所有阶段的全局内存上限;一次 CI 也不能证明 flaky 已完全消除,但没有形成当前源码可证明的 P1/P2。
Problem
On the constrained Ubuntu race runner, the engine race wave and resource-heavy UTs could overlap. The resulting ISCP scheduling delay could make watermark assertions fail intermittently.
The earlier mitigation reduced the default heavy parallelism from 3 to 2, but that also serialized part of the heavy tail and could increase CI runtime.
Fix
No production ISCP code, watermark timeout, retry, or assertion was changed. The scheduler still uses the existing three-slot budget; this follow-up hardens lifecycle ownership without adding a wait, retry, skip, or lower default concurrency.
Validation
GOWORK=off go test -mod=readonly ./optools -count=1GOWORK=off go vet -mod=readonly ./optoolsbash -n optools/run_ut.shandgit diff --checkTestHeavyPlanSchedulesEngineBeforeResourceWave: all budget/failure combinationsTestEngineChildRegistrationSurvivesCancellation: deterministic spawn-before-PID-publication cancellationTestEngineRaceHelperPublishesCompleteReport: complete two-shard report transferTestEngineRaceShardReportOpenFailureDrainsEarlierShard: repeated 3 times with a readiness barrierThe change removes the original overlap race without adding sleeps, retries, skips, or a fixed lower concurrency budget. CI can validate the wall-clock result on the constrained runner.
Fixes #28967
Fixes #28969