Add: per-worker timeline to the parallel wall-time assertion - #1503
Add: per-worker timeline to the parallel wall-time assertion#1503ChaoWao wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
`test_parallel_wall_time` fails on macOS CI in ~2% of runs (4 of 218 sampled jobs; 0 of 101 on Ubuntu) with a total wall time of 0.49-0.57 s against a 0.203 s Linux median. That is near-serial, not a marginal threshold, but the assertion reports only the total — which cannot distinguish "the parent was descheduled between its three sequential dispatch() calls, so later workers started a full sleep period behind" from "every worker was slow". Record each worker's dispatch and completion offset and include them, plus the visible CPU count, in the failure message. On the next occurrence the timeline reads the answer directly instead of leaving it to be inferred. The assertion itself is unchanged. At 0.49-0.57 s against a 0.203 s baseline something is serialising three sleeping processes, so widening the bound would hide the signal this test exists to produce. `sched_getaffinity` is Linux-only, hence the guard: `cpu_count()` alone can overstate what a container actually lets the process run on, and the runner's real width is one of the unknowns in hw-native-sys#1496. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
5381282 to
9208eff
Compare
|
Superseded by #1509. This PR existed to instrument the wall-clock failure message so the next macOS CI failure could be diagnosed blind. With a macOS box now available, the failure is traced to |
Makes the next occurrence of #1496 self-diagnosing. No behaviour change, no threshold change.
Why
test_parallel_wall_timefails on macOS CI in ~2% of runs (4 of 218 sampledut (macos-latest, 3.10)jobs; 0 of 101 on Ubuntu) with a total of 0.49-0.57 s against a 0.203 s Linux median (max 0.204 s over 7 runs). That is near-serial, not a marginal threshold.But the assertion reports only the total, which cannot separate the two shapes:
dispatch()calls, so w1/w2 started a full sleep period behind, orThose are different bugs. The total is identical either way.
What
Record each worker's dispatch and completion offset and include them — plus the visible CPU count — in the failure message. Verified by temporarily tightening the threshold:
On Linux all three dispatch at +0.1 ms and finish together — the healthy shape. On the next macOS failure the same line says which worker started late, and the question in #1496 is answered from the CI log alone.
sched_getaffinityis Linux-only, hence the guard.cpu_count()alone can overstate what a container actually lets the process run on, and the runner's real width is one of the unknowns #1496 could not close.What this deliberately does not do
It does not touch the assertion. #1496 asks explicitly that the threshold not be relaxed and no retry be added: at 0.49-0.57 s against 0.203 s, something is serialising three processes that are each only in
time.sleep(0.2). A wider bound would make the symptom disappear and leave the cause running.This is the same approach as #1501 for #1489 — when a failure is rare and cannot be reproduced on demand, the highest-value move is to guarantee the next natural occurrence yields the evidence, rather than spending exclusive hardware or CI time trying to force one.
Verification
pytest tests/ut/py/test_hostsub_fork_shm.py -q→ 6 passed.pre-commitclean.🤖 Generated with Claude Code