Skip to content

Serialize benchmark jobs to fix amdci3-1 rapid-dispatch corruption#1568

Closed
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix/serialize-benchmark-jobs
Closed

Serialize benchmark jobs to fix amdci3-1 rapid-dispatch corruption#1568
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix/serialize-benchmark-jobs

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Summary

Add job-level concurrency + max-parallel: 1 to the matrix so only one benchmark job runs at a time across all Benchmarks workflow runs. This works around a runner-pool bug where amdci3-1 corrupts its workspace under rapid dispatch.

Symptom

When 2+ benchmark jobs are dispatched to amdci3-1 within seconds, all but the last one die with infra errors. Reproduced three times now:

Date (UTC) Cause Jobs lost
2026-05-10 Original v7 merge (run 25374549824) 3 cancelled-mid-checkout
2026-05-16 07:58 First runner-free burst (PRs #1559/#1560/#1561) 6 lost, including StiffODE that had been running cleanly for 16h
2026-05-16 08:31 Single-folder PRs #1563#1567 dispatched together All 5 lost

Errors are always one of:

  • ##[error]The operation was canceled. (during actions/checkout)
  • ##[error]Missing file at path: ..._runner_file_commands/set_output_...
  • ##[error]Can't find action.yml under .../_actions/actions/checkout/v6. Did you forget to run actions/checkout before running your local action?

amdci1-1 doesn't show this pattern. Single jobs on amdci3-1 also run cleanly (StiffODE, StiffSDE, AutomaticDifferentiation, NBodySimulator all completed normally when they had the runner to themselves).

Fix

benchmark:
  ...
  concurrency:
    group: benchmark-runner-pool
    cancel-in-progress: false
  strategy:
    matrix: ...
    fail-fast: false
    max-parallel: 1

Every matrix entry across every Benchmarks workflow run shares the constant group benchmark-runner-pool, so they queue one at a time. Other jobs (detect-changes, manual-matrix, publish) are unaffected.

Tradeoff

Even with both runners healthy and idle, only one benchmark job runs at a time. Halves throughput in the best case. Acceptable given the alternative is ~60% job-loss rate from rapid-dispatch corruption.

Can be relaxed once the underlying runner bug is fixed (e.g. parameterize the group by matrix.runner to allow one job per runner instead of one job globally).

Test plan

Note for review

Please ignore until reviewed by @ChrisRackauckas. This is an architectural choice, not a no-op fix.

@ChrisRackauckas-Claude ChrisRackauckas-Claude marked this pull request as ready for review May 20, 2026 08:58
amdci3-1 corrupts its workspace under rapid dispatch — when 2+ jobs arrive
within seconds, all but one die with errors like:

  ##[error]Missing file at path: ..._runner_file_commands/set_output_...
  ##[error]Can't find action.yml under .../_actions/actions/checkout/v6
  ##[error]The operation was canceled.

Single jobs on the runner run cleanly; the bug is purely
concurrency-on-the-same-runner. Reproduced 3 times now:

  1. Original 25374549824 v7 run: 3 jobs cancelled-mid-checkout in seconds
  2. 2026-05-16 07:58 UTC burst: 6 jobs from PRs SciML#1559/SciML#1560/SciML#1561
     dispatched to amdci3-1, all but one corrupted (StiffODE — which had
     been cleanly running for 16h — also got cancelled in the cascade)
  3. 2026-05-16 08:31 UTC burst: all 5 single-folder PRs SciML#1563-SciML#1567
     dispatched simultaneously, all 5 corrupted within seconds

Splitting into per-folder PRs (per Chris's direction) doesn't help when
multiple PRs are opened together — cross-PR dispatch hits the same race.

Fix: job-level concurrency with a constant group + cancel-in-progress:false
makes every matrix entry across every Benchmarks workflow run queue behind
any other in-flight matrix entry. detect-changes / manual-matrix / publish
jobs are unaffected (they're separate GHA jobs).

Adds max-parallel: 1 to the matrix as defense-in-depth — within a single
run, matrix entries already serialize via the concurrency group, but
max-parallel makes it explicit.

Throughput cost: even with two healthy runners (amdci1-1 + amdci3-1),
only one benchmark job runs at a time. Acceptable given the alternative
is a ~60% job-loss rate. Can be relaxed once the runner bug is fixed —
e.g. parameterize the concurrency group by matrix.runner to allow one
job per runner.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
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.

2 participants