{"record":{"id":"29967e13fc438fe3","repo":"dotnet/runtime","slug":"no-baseline-jit-found-29967e","errorCode":null,"errorMessage":"No baseline JIT found","messagePattern":"No baseline JIT found","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/coreclr/scripts/superpmi.py","lineNumber":4957,"sourceCode":"            if len(local_files) > 0:\n                if hashnum > 1:\n                    logging.warning(\"Warning: the baseline found is not built with the first git hash with JIT code changes; there may be extraneous diffs\")\n                # We expect local_files to be length 1, since we only attempted to download a single file.\n                if len(local_files) > 1:\n                    logging.error(\"Error: downloaded more than one file?\")\n\n                coreclr_args.base_jit_path = local_files[0]\n                logging.info(\"Downloaded %s\", blob_uri)\n                logging.info(\"Using baseline %s\", coreclr_args.base_jit_path)\n                return\n\n            # We didn't find a baseline; keep looking\n            hashnum += 1\n\n        # We ran out of hashes of JIT changes, and didn't find a baseline. Give up.\n        logging.error(\"Error: no baseline JIT found\")\n\n    raise RuntimeError(\"No baseline JIT found\")\n\ndef get_pintools_path(coreclr_args):\n    \"\"\" Get the local path where we expect pintools for this OS to be located\n\n    Returns:\n        A path to the folder.\n    \"\"\"\n    return os.path.join(coreclr_args.spmi_location, \"pintools\", pintools_current_version, coreclr_args.host_os.lower())\n\ndef get_pin_exe_path(coreclr_args):\n    \"\"\" Get the local path where we expect the pin executable to be located\n\n    Returns:\n        A path to the executable.\n    \"\"\"\n    root = get_pintools_path(coreclr_args)\n    exe = \"pin.exe\" if coreclr_args.host_os.lower() == \"windows\" else \"pin\"\n    return os.path.join(root, exe)","sourceCodeStart":4939,"sourceCodeEnd":4975,"githubUrl":"https://github.com/dotnet/runtime/blob/60108ba66eb7d1d12f595480091b4ad80a24b172/src/coreclr/scripts/superpmi.py#L4939-L4975","documentation":"Raised by determine_base_jit after iterating every candidate commit hash (the JIT change list) and finding neither a cached baseline JIT on disk nor a downloadable one from the JIT rolling build in Azure Storage. The function logs 'Error: no baseline JIT found' for each miss, then raises. This means the auto-discovery/download pipeline is exhausted and the user must supply a baseline JIT explicitly.","triggerScenarios":"The loop over change_list_hashes checks the local cache (spmi/basejit/<hash>.<os>.<arch>.<build_type>/), then downloads from az_blob_storage_jitrollingbuild_container_uri; every candidate returns no file (download_files returns empty and fail_if_not_found=False). After the loop, the RuntimeError is raised. Occurs when the rolling build didn't produce a JIT for any candidate commit, network/download failed, or the Azure container is unreachable.","commonSituations":"Offline run with an empty basejit cache; the candidate commits predate the rolling build archive; a mismatched os/arch/build_type so no blob matches; transient Azure Storage outage or SAS token expiry; a branch whose commits were never built by CI.","solutions":["Pass --base_jit_path <path> to supply a baseline clrjit directly and bypass auto-discovery entirely.","Pass --base_git_hash <sha> of a commit you know was built by the rolling build, and ensure network access to Azure Storage.","Check the spmi/basejit cache directory and the logged blob URIs to see which candidates were attempted.","Verify os/arch/build_type match a rolling build target that actually published a clrjit."],"exampleFix":"// before\nfor git_hash in change_list_hashes:\n    ...\n    local_files = download_files(urls, basejit_dir, verbose=False, is_azure_storage=True, fail_if_not_found=False)\n    if len(local_files) > 0:\n        ...\n        return\nlogging.error(\"Error: no baseline JIT found\")\nraise RuntimeError(\"No baseline JIT found\")\n// after (fix invocation)\npython superpmi.py asmdiff --base_jit_path /path/to/baseline/clrjit.dll ...","handlingStrategy":"fallback","validationCode":"import os\ndef preflight_base_jit(coreclr_args):\n    if coreclr_args.base_jit_path is not None:\n        if not os.path.isfile(coreclr_args.base_jit_path):\n            raise RuntimeError(f\"base_jit_path not a file: {coreclr_args.base_jit_path}\")\n        return coreclr_args.base_jit_path\n    if coreclr_args.base_git_hash is None:\n        import subprocess, shutil\n        if shutil.which('git') is None:\n            raise RuntimeError('git not on PATH; pass --base_jit_path or --base_git_hash')\n        rc = subprocess.run(['git', '-C', coreclr_args.runtime_repo_location, 'rev-parse', 'HEAD'], capture_output=True).returncode\n        if rc != 0:\n            raise RuntimeError('repo is not a git checkout; pass --base_jit_path explicitly')\n    return None  # auto-discovery will attempt cache + download","typeGuard":null,"tryCatchPattern":"try:\n    determine_base_jit(coreclr_args)\nexcept RuntimeError as e:\n    logging.error('Automatic baseline JIT discovery failed: %s', e)\n    logging.error('Supply a baseline explicitly: --base_jit_path <clrjit> or --base_git_hash <sha>')\n    raise","preventionTips":["Supply --base_jit_path in offline environments to bypass Azure Storage downloads.","Ensure network access to Azure Storage for auto-download, or pre-populate the spmi/basejit cache.","Match os/arch/build_type to a rolling build target that published a clrjit."],"tags":["base-jit","azure-storage","download","network","superpmi","asmdiff"],"backgroundTag":null,"analyzedSha":"60108ba66eb7d1d12f595480091b4ad80a24b172","analyzedAt":"2026-08-10T18:54:11.478Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}