{"record":{"id":"be98512b23c3f7da","repo":"dotnet/runtime","slug":"invalid-arch","errorCode":null,"errorMessage":"Invalid arch.","messagePattern":"Invalid arch\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/coreclr/scripts/superpmi_aspnet.py","lineNumber":113,"sourceCode":"    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\n\n    checked_root = path.join(source_directory, \"artifacts\", \"bin\", \"coreclr\", target_os + \".\" + coreclr_args.arch + \".Checked\")\n    release_root = path.join(source_directory, \"artifacts\", \"bin\", \"coreclr\", target_os + \".\" + coreclr_args.arch + \".Release\")\n\n    # We'll use repo script to install dotnet\n    dotnet_install_script_name = \"dotnet-install.cmd\" if is_windows else \"dotnet-install.sh\"\n    dotnet_install_script_path = path.join(source_directory, \"eng\", \"common\", dotnet_install_script_name)","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/dotnet/runtime/blob/290d5ab72cc1102813fbc0406fb186ceadabc340/src/coreclr/scripts/superpmi_aspnet.py#L95-L131","documentation":"Raised by determine_benchmark_machine in superpmi_aspnet.py when coreclr_args.arch is neither 'x64' nor 'arm64'. No benchmark machine name is defined for other architectures (e.g. x86, arm, wasm).","triggerScenarios":"coreclr_args.arch in {'x86','arm','wasm',''} passed to the aspnet benchmark path.","commonSituations":"Pipeline Architecture misconfigured; x86/arm flavor accidentally routed through superpmi_aspnet.py; future arch not yet added.","solutions":["Set --arch to x64 or arm64.","If you genuinely need another arch, that combination is unsupported by this script — use a different flow.","Audit the pipeline's Architecture variable."],"exampleFix":"// before\n# --arch x86 -> raises [190]\n// after\n--arch x64   # or arm64","handlingStrategy":"type-guard","validationCode":"if coreclr_args.arch not in ('x64','arm64'):\n    raise SystemExit(f\"Unsupported arch {coreclr_args.arch!r}; only x64/arm64 have benchmark machines\")","typeGuard":"def is_benchmark_arch(arch: str) -> bool:\n    return arch in ('x64','arm64')","tryCatchPattern":"try:\n    determine_benchmark_machine(coreclr_args)\nexcept RuntimeError as e:\n    if 'Invalid arch' in str(e):\n        raise SystemExit('set --arch to x64 or arm64')","preventionTips":["Whitelist arch in pipeline validation","Don't route x86/arm/wasm through superpmi_aspnet","Fail fast on unsupported combos"],"tags":["cross-platform","configuration","aspnet","benchmarks"],"analyzedSha":"290d5ab72cc1102813fbc0406fb186ceadabc340","analyzedAt":"2026-08-06T19:57:01.276Z","schemaVersion":2},"datasetVersion":"2026-08-06T23:17:07.152Z"}