dotnet/runtime · error · RuntimeError
Invalid OS for arm64.
Error message
Invalid OS for arm64.
What it means
Raised by determine_benchmark_machine in superpmi_aspnet.py when arch=='arm64' and host_os != 'linux'. Only an arm Linux crank machine (aspnet-citrine-arm) is provisioned.
Source
Thrown at src/coreclr/scripts/superpmi_aspnet.py:111
coreclr_args (CoreclrArguments): parsed args
Return:
(str) : name of the benchmnark machine
"""
if coreclr_args.arch == "x64":
if coreclr_args.host_os == "windows":
return "aspnet-perf-win"
# return "aspnet-citrine-win"
elif coreclr_args.host_os == "linux":
return "aspnet-perf-lin"
else:
raise RuntimeError("Invalid OS for x64.")
elif coreclr_args.arch == "arm64":
if coreclr_args.host_os == "linux":
return "aspnet-citrine-arm"
else:
raise RuntimeError("Invalid OS for arm64.")
else:
raise RuntimeError("Invalid arch.")
def build_and_run(coreclr_args):
"""Run perf scenarios under crank and collect data with SPMI"
Args:
coreclr_args (CoreClrArguments): Arguments use to drive
output_mch_name (string): Name of output mch file name
"""
source_directory = coreclr_args.source_directory
target_arch = coreclr_args.arch
target_os = coreclr_args.host_os
checked_root = path.join(source_directory, "artifacts", "bin", "coreclr", target_os + "." + coreclr_args.arch + ".Checked")
release_root = path.join(source_directory, "artifacts", "bin", "coreclr", target_os + "." + coreclr_args.arch + ".Release")
# We'll use repo script to install dotnetView on GitHub (pinned to 290d5ab72c)
Solutions
- Use the supported combo: --arch arm64 --host_os linux.
- If you need arm64 perf on another OS, route to a different scenario/machine pool.
- Fix the YAML matrix entry.
Example fix
// before # --arch arm64 --host_os windows -> raises [189] // after --arch arm64 --host_os linux
Defensive patterns
Strategy: validation
Validate before calling
if coreclr_args.arch == 'arm64' and coreclr_args.host_os != 'linux':
raise SystemExit(f'arm64 benchmarks only support linux, got {coreclr_args.host_os}') Type guard
def arm64_os_supported(arch: str, host_os: str) -> bool:
return arch != 'arm64' or host_os == 'linux' Try / catch
try:
determine_benchmark_machine(coreclr_args)
except RuntimeError as e:
if 'Invalid OS for arm64' in str(e):
raise SystemExit('set --host_os linux for arm64 benchmarks') Prevention
- Pin arm64 perf jobs to linux
- Validate arch×os before submit
- Document supported combos in the pipeline
When it happens
Trigger: coreclr_args.arch=='arm64' with host_os in {'windows','osx',...}.
Common situations: Windows/arm64 or macOS/arm64 selected in the pipeline; Architecture=arm64 but TargetOS unset/defaulted to windows.
Related errors
- Invalid OS for x64.
- Invalid arch.
- Unknown OS.
- Pass only one tiering option.
- Unrecognized asset behavior:${asset.behavior}, for asset ${a
AI-assisted analysis of dotnet/runtime@290d5ab72c (2026-08-06).
Data as JSON: /api/errors/413322d8f9e36d05.
Report an issue: GitHub.