{"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/290d5ab72cc1102813fbc0406fb186ceadabc340/src/coreclr/scripts/superpmi.py#L4939-L4975","documentation":"Raised at the end of get_baseline_jit after exhausting all 20 candidate hashes: none existed in the local basejit cache and none were downloadable from the Azure rolling-build blob storage. The script gives up because it cannot obtain any baseline JIT.","triggerScenarios":"For every change-list hash, os.path.isfile(basejit_path) is false AND download_files() returns empty (fail_if_not_found=False). Common when the rolling build for those hashes never published an artifact, or network/azure access is blocked.","commonSituations":"Old hashes whose rolling builds expired from blob storage; offline/air-gapped run; corporate proxy blocking azure blob endpoint; host_os/arch/build_type combo not built by CI for those hashes.","solutions":["Pre-place a JIT binary in spmi_location/basejit/<hash>.<os>.<arch>.<build_type>/ and re-run.","Check network/proxy access to the Azure storage container used by az_blob_storage_jitrollingbuild_container_uri.","Build a baseline JIT locally for one of the candidate hashes and copy it to the expected cache path.","Use a more recent branch whose rolling builds still exist in storage."],"exampleFix":"// before\n# no baseline JIT downloadable -> raises [185]\n// after\n# copy a locally-built jit into the cache location\nmkdir -p $SPMI/basejit/<hash>.<os>.<arch>.Checked\ncp <built-jit> $SPMI/basejit/<hash>.<os>.<arch>.Checked/<jit-name>","handlingStrategy":"fallback","validationCode":"import os\nfor h in candidate_hashes:\n    p = os.path.join(spmi_location,'basejit',f'{h}.{host_os}.{arch}.{build_type}',jit_name)\n    if os.path.isfile(p):\n        print('cached baseline JIT available at', p); break\nelse:\n    print('WARNING: no baseline JIT cached and download may fail')","typeGuard":"def baseline_jit_available(hashes, spmi_location, host_os, arch, build_type, jit_name) -> bool:\n    import os\n    return any(os.path.isfile(os.path.join(spmi_location,'basejit',f'{h}.{host_os}.{arch}.{build_type}',jit_name)) for h in hashes)","tryCatchPattern":"try:\n    main(...)\nexcept RuntimeError as e:\n    if 'No baseline JIT' in str(e):\n        # build a JIT for a baseline commit and place it in the cache, then retry\n        stage_baseline_jit(candidate_hashes[0])\n        main(...)","preventionTips":["Pre-populate spmi_location/basejit with known-good JITs","Verify Azure storage reachability before runs","Prefer recent branches whose rolling builds still exist"],"tags":["azure-storage","network","superpmi","caching"],"analyzedSha":"290d5ab72cc1102813fbc0406fb186ceadabc340","analyzedAt":"2026-08-06T19:57:01.276Z","schemaVersion":2},"datasetVersion":"2026-08-06T23:17:07.152Z"}