Skip to content

MetalToolchain component occationally missing on macos-26 runners #14013

@cwfitzgerald

Description

@cwfitzgerald

Description

Downstream issue gfx-rs/wgpu#9514

On metal-26 runners we use various components from the MetalToolchain component to validate output shaders. In specific the first command we run is xcrun -sdk macosx metal '-mmacosx-version-min=10.11' '-std=macos-metal1.0' '-Werror=constant-conversion' -x metal tests/out/msl/spv-empty-global-name.metal -o /dev/null.

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 22.04
  • Ubuntu 24.04
  • Ubuntu Slim
  • macOS 14
  • macOS 14 Arm64
  • macOS 15
  • macOS 15 Arm64
  • macOS 26
  • macOS 26 Arm64
  • Windows Server 2022
  • Windows Server 2025
  • Windows Server 2025 with Visual Studio 2026

Image version and build link

Current runner version: '2.334.0'

The workflow is available here https://github.com/gfx-rs/wgpu/blob/trunk/.github/workflows/shaders.yml#L70-L92

Latest failed build available here https://github.com/gfx-rs/wgpu/actions/runs/25444343504/job/74644143404

Is it regression?

Yes. Previously (not sure exactly when) the job always succeeds, now it only sometimes succeeds.

Expected behavior

The job functioning always.

Actual behavior

Most of the time this succeeds and everything works. Seemingly at random we get the following error:

    Updating crates.io index
   Compiling hlsl-snapshots v29.0.0 (/Users/runner/work/wgpu/wgpu/naga/hlsl-snapshots)
   Compiling naga-xtask v0.1.0 (/Users/runner/work/wgpu/wgpu/naga/xtask)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.17s
     Running `/Users/runner/work/wgpu/wgpu/target/debug/naga-xtask validate msl`
Error: naga_xtask::validate] `xcrun -sdk macosx metal '-mmacosx-version-min=10.11' '-std=macos-metal1.0' '-Werror=constant-conversion' -x metal tests/out/msl/spv-empty-global-name.metal -o /dev/null` failed to run; exit code: Some(1)
stdout:

stderr:
error: error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain

Repro steps

Make a job that relies on xcrun -sdk macosx metal and run over time until you get this error. There's no decernable "this happens then we get a failure", it is random as far as I can tell, maybe about which runner it get allocated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions