-
-
Notifications
You must be signed in to change notification settings - Fork 357
Report for June 2025 #2053
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report for June 2025 #2053
Conversation
I don't know why, @EliahKagan, but Windows seems to fail flakily much more often now. Probably it's a timing change, with the runners getting slower or faster. And I am thinking that just because not much of the relevant code has changed in the past months. This note is just to see if you have thoughts on this. |
There are two separate problems: a nondeterministic failure that affects a small number of tests and does not usually occur, and new deterministic failures that come in with Git 2.50.0. The PRNG-related symlink probe failureThe failure in this PR is the old nondeterministic failure. Specifically, the test case that failed in
That strongly appears to be due to #1816. That probe currently fails occasionally in all of the functions that perform it, for that reason, and I believe no other reasons for it to fail are known or believed to exist. Rerunning the tests will most likely make that go away. (We can fix issue #1816, as discussed there, and I plan to do so; rerunning tests that fail due to it is only something I recommend doing in the mean time, not forever.) Examining the step that compares the list of tests currently expected to fail in The new failures with Git 2.50.0
Git 2.50.0 was recently released. At the moment, when jobs are run on To be clear, the What happens is that quite a lot of new failures occur, but only when fixture scripts are rerun. Furthermore, all the new failures are due to the inability to successfully run the fixture script
The command that ran successfully with Git 2.49.0 but errors out with Git 2.50.0 seems to be:
I distinctlly recall, from the Git mailing list, discussion of a change to make it an error to explicitly create Git objects of unrecognized type. My guess is that this has come in with Git 2.50.0 and that it is the cause of this problem. However, I am not seeing this in the changelog, and I am not readily finding it. Normally I would keep looking, but there is also a thunderstorm going on right now, where I am, that is likely to cause me temporarily to lose electrical power, internet access, or both. Therefore, I am posting this now, in the hope it may be useful even though not fully researched. Edit: Yes, this is git/git@65a6a79. The first stable version of Git that includes that change is 2.50.0, and the change intentionally drops support in |
Thanks for the elaborate reply! I see that the PRNG related issue is 'the usual one', with more issues on the horizon due to the Git update. It's probably a welcome fix. Maybe a bad object can then be created using a shell script. |
I think it could, maybe with a technique similar to what I used in the script shown in this comment. That comment can also be viewed publicly in #1915 (comment), where it is "Comment 23." As noted in #2065 (comment), this problem has begun to affect CI here in this upstream repository; I predict that I will be able to fix the problem of the fixture script being incompatible with Git 2.50.0, but I don't know when I will be able to get to it; and there are some more errors we can expect to start happening on CI. |
And since the public comment is very long (probably the longest comment I have ever seen on GitHub, maybe anywhere), here is the script in question which creates loose objects using python: #!/usr/bin/env bash
set -euo pipefail
object_data_file="$1"
tree_entry_name="$2"
# Get the OID and ensure its bucket exists.
object_hash="$(sha1sum -- "$object_data_file" | awk '{ print $1 }')"
bucket=".git/objects/${object_hash:0:2}"
mkdir -p -- "$bucket"
# Create the loose object.
<"$object_data_file" python3 -c '
import sys
import zlib
sys.stdout.buffer.write(zlib.compress(sys.stdin.buffer.read()))
' >"$bucket/${object_hash:2}"
# Create a tree that has the object as an entry.
tree_hash="$({
printf '100644 %s\0' "$tree_entry_name"
printf '%s' "$object_hash" | xxd -r -p
} | git hash-object -t tree -w --stdin --literally)"
# Create a commit with that tree, and set the current branch to it.
commit_hash="$(git commit-tree -m 'Initial commit' "$tree_hash")"
branch="$(git symbolic-ref --short HEAD)"
git branch -f -- "$branch" "$commit_hash"
# Show what we have. (Can run `git fsck` afterwards to show the corruption.)
set -x
git log
git ls-tree HEAD The object-creation part can easily be adapted. In any case, thanks for your help with that, whenever you get to it, it's much appreciated 🙏. |
Tasks
For the discussion: