dotnet/runtime · error · RuntimeError
Couldn't determine list of JIT changes starting with…
Error message
Couldn't determine list of JIT changes starting with baseline hash
What it means
Raised by determine_base_jit when 'git log --pretty=format:%H <baseline_hash> -20 -- <jit paths>' returns nonzero. This command enumerates the last 20 commits starting at the baseline that touched the JIT sources (src/coreclr/jit/* and jiteeversionguid.h), to find candidate commits with a downloadable baseline JIT. A failure means git could not traverse the log, typically because the baseline_hash is invalid or unreachable.
Solutions
- Ensure baseline_hash is present: 'git -C <repo> cat-file -t <baseline_hash>' must report 'commit'.
- Deepen the clone: 'git fetch --unshallow origin' or increase --depth.
- Verify the src/coreclr/jit pathspec exists in the current checkout.
- Pass --base_git_hash <sha> explicitly with a commit you know is reachable.
Example fix
// before
command = ["git", "log", "--pretty=format:%H", baseline_hash, "-20", "--", "src/coreclr/jit/*", "src/coreclr/inc/jiteeversionguid.h"]
proc = subprocess.Popen(command, stdout=subprocess.PIPE)
stdout_change_list, _ = proc.communicate()
if proc.returncode != 0:
raise RuntimeError("Couldn't determine list of JIT changes starting with baseline hash")
// after (fix invocation)
git -C <repo> cat-file -t <baseline_hash> # must print 'commit'
git -C <repo> fetch --unshallow origin
python superpmi.py asmdiff --base_git_hash <known-good-sha> ... Defensive patterns
Strategy: validation
Validate before calling
import subprocess
def validate_jit_change_list(repo_location, baseline_hash):
cat = subprocess.run(['git', '-C', repo_location, 'cat-file', '-t', baseline_hash], capture_output=True)
if cat.returncode != 0:
raise RuntimeError(f"baseline_hash not present: {baseline_hash}; deepen the clone.")
cmd = ['git', '-C', repo_location, 'log', '--pretty=format:%H', baseline_hash, '-20', '--', 'src/coreclr/jit/*', 'src/coreclr/inc/jiteeversionguid.h']
proc = subprocess.run(cmd, capture_output=True)
if proc.returncode != 0:
raise RuntimeError(f"git log failed: {proc.stderr.decode('utf-8','replace').strip()}")
return proc.stdout.decode('utf-8').strip().splitlines() Prevention
- Ensure baseline_hash is a reachable commit (git cat-file -t).
- Deepen shallow clones before baseline detection.
- Verify src/coreclr/jit pathspec matches your checkout layout.
When it happens
Trigger: subprocess.Popen(['git','log','--pretty=format:%H', baseline_hash, '-20','--','src/coreclr/jit/*','src/coreclr/inc/jiteeversionguid.h']) returns nonzero. Occurs when baseline_hash is unknown to the repo (shallow clone, missing object), when the pathspec matches nothing due to a relocated source tree, or when baseline_hash is malformed.
Common situations: Shallow or partial clone missing the baseline commit; running on an old checkout where src/coreclr layout differs; a baseline_hash computed from a fork that isn't present locally; corrupted object database.
Related errors
- Couldn't determine baseline git hash
- Couldn't determine current git hash
- Couldn't determine newest 'main' git hash
- No JIT changes found starting with baseline hash
- Couldn't create git diff
AI-assisted analysis of dotnet/runtime@60108ba66e (2026-08-10).
Data as JSON: /api/errors/f027f78561161437.
Report an issue: GitHub.
Appendix: source
Thrown at src/coreclr/scripts/superpmi.py:4910
raise RuntimeError("Couldn't determine baseline git hash")
baseline_hash = stdout_git_merge_base.decode('utf-8').strip()
logging.info("Baseline hash: %s", baseline_hash)
else:
baseline_hash = coreclr_args.base_git_hash
if coreclr_args.base_git_hash is None:
# Enumerate the last 20 changes, starting with the baseline, that included JIT and JIT-EE GUID changes.
command = [ "git", "log", "--pretty=format:%H", baseline_hash, "-20", "--", "src/coreclr/jit/*", "src/coreclr/inc/jiteeversionguid.h" ]
logging.debug("Invoking: %s", " ".join(command))
proc = subprocess.Popen(command, stdout=subprocess.PIPE)
stdout_change_list, _ = proc.communicate()
return_code = proc.returncode
change_list_hashes = []
if return_code == 0:
change_list_hashes = stdout_change_list.decode('utf-8').strip().splitlines()
else:
raise RuntimeError("Couldn't determine list of JIT changes starting with baseline hash")
if len(change_list_hashes) == 0:
raise RuntimeError("No JIT changes found starting with baseline hash")
else:
# If `-base_git_hash` is specified, then we use exactly that hash and no other for the baseline.
change_list_hashes = [ coreclr_args.base_git_hash ]
# For each hash, (1) see if we have the JIT already, and if not (2) try to download the corresponding JIT from the rolling build.
hashnum = 1
for git_hash in change_list_hashes:
logging.debug("%s: %s", hashnum, git_hash)
jit_name = get_jit_name(coreclr_args)
basejit_dir = os.path.join(default_basejit_root_dir, "{}.{}.{}.{}".format(git_hash, coreclr_args.host_os, coreclr_args.arch, coreclr_args.build_type))
basejit_path = os.path.join(basejit_dir, jit_name)
if os.path.isfile(basejit_path):
# We found this baseline JIT in our cache; use it!View on GitHub (pinned to 60108ba66e)