Skip to content

Battery parallelism is structurally marginal against per-check budgets (invariance-lane timeouts) #699

Done

Description

@ehartford

During the D17 battery, three of five invariance variants failed with exit 124 (timeout): invariance-two-lets-sema, invariance-let-parser, invariance-let-main. Diagnosis: each perturbed-tree check src/main.w is ~88-105s in isolation (verified directly; verdict unchanged — the perturbed tree checks ok), but the allow_parallel pool runs all five concurrently alongside the rest of :test, and under that contention each exceeded the fixed 240s per-check budget. A quiet re-run passed all five at 104-108s wall.

Review notes this is the third flaky-class event of this kind in recent history (get-zlib, workspace-parallel-multi previously) — the pattern is structural: heavy ~100s checks × parallel pool width vs a fixed per-check timeout leaves ~2.3x headroom that evaporates under load.

Not proposing weakening any check. Options for the maintainer to weigh:

  • serialize the invariance lanes (.dep chain) — coverage identical, wall +~400s on :test
  • scale the per-check budget by pool width, or measure the unperturbed check first and budget as a multiple of it
  • cap the concurrent heavy-check lanes to (cores / 4)

Filed per the review of the #691 campaign; the instance above is fully diagnosed with mechanism and clean re-run evidence in the campaign logs.

Activity

  1. ehartford commented on Oct 25, 2026

    @ehartford
    ContributorAuthor

    Triage 2026-10-25, with v0.15.3.0 (main a261b65): still reproduces in the same class. Today's first battery on #2633 went red on three timeouts (behav_fn_abi_async, behav_1915_windows_target_is_gnu, selfcheck at 300 s) with the machine's load average at 35; all three pass alone (the two tests in 17 s). A fixed per-check budget under a shared, contended pool still turns load into reds.

    post-release: it costs a rerun, not a wrong result; the durable fix is budgets that scale with measured load or a runner that retries a timeout once with the load recorded.

  2. added this to the post-v0.16.0 milestone on Oct 28, 2026
  3. ehartford commented on Nov 24, 2026

    @ehartford
    ContributorAuthor

    Closing: the cause this issue names is gone. It was a fixed speed budget (240 s for an invariance check, 300 s for selfcheck) set close to the unloaded time, so load turned into reds. Since #2371 and #2902 every ceiling in the build is a hang guard, not a budget, and says so where it is set:

    lane ceiling now time alone (today's release checks and builds)
    each invariance variant (invariance_run_check) 600 s 72 s
    selfcheck (guarded_check) 1,800 s 58 s
    a test lane (test_lane) 3,600 s under 80 s
    a selfhost child, a corpus lane 1,800 s —

    Evidence that load no longer reds a run: today's seven batteries and three :release-checks runs on this machine, and five linux-aarch64 container legs at three jobs, had no timeout failure. The one red caused by load today was the RSS tripwire (2,064 MB against 2,048 with a container leg running), and that had its own cause, fixed in #3580 (now 1,477 MB).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions