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 process_git_hash_arg() in jitrollingbuild.py when 'git log --pretty=format:%H <baseline_hash> -20 -- src/coreclr/jit/* src/coreclr/inc/jiteeversionguid.h' fails. This command enumerates the last 20 commits starting from the baseline that touched JIT source files or the JIT-EE interface GUID header. These commits are candidates for finding a matching rolling build.
Solutions
- Verify baseline_hash is valid: run 'git cat-file -t <baseline_hash>'.
- Run the git log command manually to see the actual error output.
- If using a shallow clone, deepen it with 'git fetch --unshallow' or 'git fetch --deepen=N'.
- Check that the repository structure at the baseline commit contains the expected paths.
- Pass -git_hash to skip auto-detection.
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()
return_code = proc.returncode
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")
# after - capture stderr and check path existence
command = ["git", "log", "--pretty=format:%H", baseline_hash, "-20", "--", "src/coreclr/jit/*", "src/coreclr/inc/jiteeversionguid.h"]
proc = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout_change_list, stderr = proc.communicate()
return_code = proc.returncode
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 {}: {}".format(
baseline_hash, stderr.decode('utf-8').strip())) Defensive patterns
Strategy: validation
Validate before calling
import subprocess, os
def can_enumerate_jit_changes(repo_path: str, baseline_hash: str) -> bool:
"""Check if git log can enumerate JIT changes from the baseline."""
jit_paths = ['src/coreclr/jit/*', 'src/coreclr/inc/jiteeversionguid.h']
# Verify paths exist at baseline
result = subprocess.run(
['git', 'log', '--pretty=format:%H', baseline_hash, '-1', '--'] + jit_paths,
cwd=repo_path, capture_output=True)
return result.returncode == 0 Type guard
null
Try / catch
try:
process_git_hash_arg(coreclr_args)
except RuntimeError as e:
if "list of JIT changes" in str(e):
logging.error(f"{e}. Verify baseline_hash is valid and JIT paths exist.")
logging.error(f"Run manually: git log --oneline {baseline_hash} -20 -- src/coreclr/jit/")
raise Prevention
- Ensure the baseline commit is reachable (not garbage-collected) in the repo.
- Verify the JIT source paths exist at the baseline commit.
- Avoid shallow clones that may not have the baseline commit.
- Pass -git_hash to skip the entire auto-detection chain.
When it happens
Trigger: Triggered when the git log command returns non-zero. This can happen if baseline_hash is not a valid commit, if the paths specified don't exist in the baseline commit (though git log typically still returns 0 in that case, just with no output), or if the repository's object database is corrupted.
Common situations: The baseline_hash computed from merge-base is stale or invalid (e.g., from a garbage-collected commit in a shallow clone). The src/coreclr/jit/ or src/coreclr/inc/jiteeversionguid.h paths don't exist at the baseline commit (repo restructuring). Git internal corruption.
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
- No baseline JIT found
AI-assisted analysis of dotnet/runtime@60108ba66e (2026-08-10).
Data as JSON: /api/errors/5a5dad931a4ea145.
Report an issue: GitHub.
Appendix: source
Thrown at src/coreclr/scripts/jitrollingbuild.py:221
stdout_git_merge_base, _ = proc.communicate()
return_code = proc.returncode
if return_code != 0:
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)
# 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: {}".format(" ".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")
# For each hash, see if the rolling build contains the JIT.
hashnum = 1
for git_hash in change_list_hashes:
logging.info("try {}: {}".format(hashnum, git_hash))
# Set the git hash to look for
# Note: there's a slight inefficiency here because this code searches for a JIT at this hash value, and
# then when we go to download, we do the same search again because we don't cache the result and pass it
# directly on to the downloader.
coreclr_args.git_hash = git_hash
if return_first_hash:
# Just use the first oneView on GitHub (pinned to 60108ba66e)