Skip to content

The macOS Metal shader compile fails intermittently on the runner, costing a ~70 minute job each time #499

Description

@leonardoaraujosantos

The build+test (macos, +metal, parity) job fails intermittently with the Metal backend declining to register, and it is the runner rather than any diff.

The signature, identical every time

claycore: the Metal backend will not register — no compute pipeline for clay_eval_grid: Compilation failed
claycore: full Metal error: Error Domain=CompilerError Code=2 "Compilation failed"
  FAIL the Metal backend registered — this machine HAS a Metal device, so a missing
       backend would mean the embedded metallib failed to load
swift smoke: 1 failure(s)     411/412 checks passed

Always the same check, always 411/412, always in the Swift smoke step.

Why it is the runner and not a diff

A pull request that changes one markdown file produced it. #482 touches openspec/ROADMAP.md and nothing else, and hit this exact failure. A one-file documentation diff cannot break a Metal shader compile.

Directly observed tonight, four occurrences across four different PRs:

PR what it changes outcome
#482 one markdown file failed, passed on re-run
#481 regional multires failed twice, passed on the third attempt after 84 min
#483 one markdown file passed first time
#490 scene bounds + a C entry point failed, re-running

What it costs

Each occurrence burns a ~70 minute job (observed 52m to 1h14m) and blocks the PR until someone notices and re-runs. Tonight it delayed two merges by several hours.

A note on evidence, because it disappears

gh api repos/.../actions/runs/<id>/jobs reports the latest attempt only. Re-running a failed job rewrites the conclusion to success, so a tally taken afterwards shows a clean history and the flake becomes invisible to exactly the query someone would run to measure it. The four rows above are from direct observation at the time, not reconstructed — a reconstruction would have reported zero.

That is worth knowing before anyone tries to quantify the rate from the API.

Worth investigating

  • whether the failure correlates with a particular runner image or a concurrent job on the same host;
  • whether the metallib build can be made to retry the pipeline creation, or to report which shader stage failed rather than Compilation failed with no detail;
  • whether the Swift smoke can distinguish "no Metal device" from "device present, metallib failed to load" more cheaply than by failing the whole job — the check text already knows the difference and is the only thing that reports it.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions