{"record":{"id":"3dddf15f7f2bf71c","repo":"dotnet/runtime","slug":"invalid-os-for-x64","errorCode":null,"errorMessage":"Invalid OS for x64.","messagePattern":"Invalid OS for x64\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/coreclr/scripts/superpmi_aspnet.py","lineNumber":106,"sourceCode":"#\ndef determine_benchmark_machine(coreclr_args):\n    \"\"\" Determine the name of the benchmark machine to use\n\n    Args:\n        coreclr_args (CoreclrArguments): parsed args\n\n    Return:\n        (str) : name of the benchmnark machine\n    \"\"\"\n\n    if coreclr_args.arch == \"x64\":\n        if coreclr_args.host_os == \"windows\":\n            return \"aspnet-perf-win\"\n#            return \"aspnet-citrine-win\"\n        elif coreclr_args.host_os == \"linux\":\n            return \"aspnet-perf-lin\"\n        else:\n            raise RuntimeError(\"Invalid OS for x64.\")\n    elif coreclr_args.arch == \"arm64\":\n        if coreclr_args.host_os == \"linux\":\n            return \"aspnet-citrine-arm\"\n        else:\n            raise RuntimeError(\"Invalid OS for arm64.\")\n    else:\n        raise RuntimeError(\"Invalid arch.\")\n\ndef build_and_run(coreclr_args):\n    \"\"\"Run perf scenarios under crank and collect data with SPMI\"\n\n    Args:\n        coreclr_args (CoreClrArguments): Arguments use to drive\n        output_mch_name (string): Name of output mch file name\n    \"\"\"\n    source_directory = coreclr_args.source_directory\n    target_arch = coreclr_args.arch\n    target_os = coreclr_args.host_os","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/dotnet/runtime/blob/290d5ab72cc1102813fbc0406fb186ceadabc340/src/coreclr/scripts/superpmi_aspnet.py#L88-L124","documentation":"Raised by determine_benchmark_machine in superpmi_aspnet.py when arch=='x64' and host_os is neither 'windows' nor 'linux'. The crank benchmark machine name only exists for those two x64 OSes.","triggerScenarios":"coreclr_args.arch=='x64' with host_os in {'osx','freebsd',...} — no aspnet-perf machine is provisioned for that combo.","commonSituations":"Pipeline set TargetOS=osx with Architecture=x64; accidental osx default on a Mac dev box; mistyped OS in YAML.","solutions":["Check the pipeline's TargetOS/Architecture combination is one of (x64,windows) or (x64,linux).","If you need osx x64 perf, use a different benchmarks harness (not superpmi_aspnet).","Correct the --arch / --host_os arguments."],"exampleFix":"// before\n# --arch x64 --host_os osx -> raises [188]\n// after\n# osx x64 not supported here; use linux/windows, or arm64+linux","handlingStrategy":"validation","validationCode":"if coreclr_args.arch == 'x64' and coreclr_args.host_os not in ('windows','linux'):\n    raise SystemExit(f'x64 benchmarks only support windows/linux, got {coreclr_args.host_os}')","typeGuard":"def x64_os_supported(arch: str, host_os: str) -> bool:\n    return arch != 'x64' or host_os in ('windows','linux')","tryCatchPattern":"try:\n    determine_benchmark_machine(coreclr_args)\nexcept RuntimeError as e:\n    if 'Invalid OS for x64' in str(e):\n        raise SystemExit('set --host_os to windows or linux for x64 benchmarks')","preventionTips":["Keep an arch×os matrix of supported benchmark machines","Validate the combo before invoking crank","Avoid routing osx through superpmi_aspnet"],"tags":["cross-platform","configuration","aspnet","benchmarks"],"analyzedSha":"290d5ab72cc1102813fbc0406fb186ceadabc340","analyzedAt":"2026-08-06T19:57:01.276Z","schemaVersion":2},"datasetVersion":"2026-08-06T23:17:07.152Z"}