git/list[1] front-page[2] threads[3] people[4] search[5] about
 

t4216-log-bloom.sh broken ?

From
Torsten Bögershausen <tboegi@web.de>
Date
May 2, 2024, 05:56 UTC
Message-ID
<20240502055621.GA29945@tb-raspi4>
In-Reply-To
<xmqq8r0ww0sj.fsf@gitster.g>
[]

Highjacking the Git v2.45.0 announcement: There are 4 test cases in t4216-log-bloom.sh, that do not pass on one Mac here (they pass on another machine)

I haven't digged further, but here are some log files, hopefully helpful to somebody.

not ok 141 - Bloom reader notices too-small data chunk # # check_corrupt_graph BDAT clear 00000000 && # echo "warning: ignoring too-small changed-path chunk" \ # "(4 < 12) in commit-graph file" >expect.err && # test_cmp expect.err err # not ok 142 - Bloom reader notices out-of-bounds filter offsets # # check_corrupt_graph BIDX 12 FFFFFFFF && # # use grep to avoid depending on exact chunk size # grep "warning: ignoring out-of-range offset (4294967295) for changed-path filter at pos 3 of .git/objects/info/commit-graph" err

# not ok 143 - Bloom reader notices too-small index chunk # # # replace the index with a single entry, making most # # lookups out-of-bounds # check_corrupt_graph BIDX clear 00000000 && # echo "warning: commit-graph changed-path index chunk" \ # "is too small" >expect.err && # test_cmp expect.err err # not ok 144 - Bloom reader notices out-of-order index offsets # # # we do not know any real offsets, but we can pick # # something plausible; we should not get to the point of # # actually reading from the bogus offsets anyway. # corrupt_graph BIDX 4 0000000c00000005 && # echo "warning: ignoring decreasing changed-path index offsets" \ # "(12 > 5) for positions 1 and 2 of .git/objects/info/commit-graph" >expect.err && # git -c core.commitGraph=false log -- A/B/file2 >expect.out && # git -c core.commitGraph=true log -- A/B/file2 >out 2>err && # test_cmp expect.out out && # test_cmp expect.err err # # failed 4 among 144 test(s) 1..144

ok 140 - Bloom generation backfills empty commits
expecting success of 4216.141 'Bloom reader notices too-small data chunk':
	check_corrupt_graph BDAT clear 00000000 &&
	echo "warning: ignoring too-small changed-path chunk" \
		"(4 < 12) in commit-graph file" >expect.err &&
	test_cmp expect.err err
++ check_corrupt_graph BDAT clear 00000000
++ corrupt_graph BDAT clear 00000000
++ graph=.git/objects/info/commit-graph
++ test_when_finished 'rm -rf .git/objects/info/commit-graph'
++ test 0 = 0
++ test_cleanup='{ rm -rf .git/objects/info/commit-graph
		} && (exit "$eval_ret"); eval_ret=$?; :'
++ git commit-graph write --reachable --changed-paths
++ corrupt_chunk_file .git/objects/info/commit-graph BDAT clear 00000000
++ fn=.git/objects/info/commit-graph
++ shift
++ perl /Users/tb/NoBackup/projects/git/git.pu/t/lib-chunk/corrupt-chunk-file.pl BDAT clear 00000000
++ command /usr/bin/perl /Users/tb/NoBackup/projects/git/git.pu/t/lib-chunk/corrupt-chunk-file.pl BDAT clear 00000000
++ /usr/bin/perl /Users/tb/NoBackup/projects/git/git.pu/t/lib-chunk/corrupt-chunk-file.pl BDAT clear 00000000
++ mv .git/objects/info/commit-graph.tmp .git/objects/info/commit-graph
override r--r--r--  tb/staff for .git/objects/info/commit-graph? (y/n [n]) not overwritten
++ git -c core.commitGraph=false log -- A/B/file2
++ git -c core.commitGraph=true log -- A/B/file2
++ test_cmp expect.out out
++ test 2 -ne 2
++ eval 'diff -u' '"$@"'
+++ diff -u expect.out out
++ echo 'warning: ignoring too-small changed-path chunk' '(4 < 12) in commit-graph file'
++ test_cmp expect.err err
++ test 2 -ne 2
++ eval 'diff -u' '"$@"'
+++ diff -u expect.err err
--- expect.err	2024-05-02 05:51:10.000000000 +0000
+++ err	2024-05-02 05:51:10.000000000 +0000
@@ -1 +0,0 @@
-warning: ignoring too-small changed-path chunk (4 < 12) in commit-graph file
error: last command exited with $?=1
++ rm -rf .git/objects/info/commit-graph
++ exit 1
++ eval_ret=1
++ :
not ok 141 - Bloom reader notices too-small data chunk


expecting success of 4216.142 'Bloom reader notices out-of-bounds filter offsets':
	check_corrupt_graph BIDX 12 FFFFFFFF &&
	# use grep to avoid depending on exact chunk size
	grep "warning: ignoring out-of-range offset (4294967295) for changed-path filter at pos 3 of .git/objects/info/commit-graph" err

++ check_corrupt_graph BIDX 12 FFFFFFFF
++ corrupt_graph BIDX 12 FFFFFFFF
++ graph=.git/objects/info/commit-graph
++ test_when_finished 'rm -rf .git/objects/info/commit-graph'
++ test 0 = 0
++ test_cleanup='{ rm -rf .git/objects/info/commit-graph
		} && (exit "$eval_ret"); eval_ret=$?; :'
++ git commit-graph write --reachable --changed-paths
++ corrupt_chunk_file .git/objects/info/commit-graph BIDX 12 FFFFFFFF
++ fn=.git/objects/info/commit-graph
++ shift
++ perl /Users/tb/NoBackup/projects/git/git.pu/t/lib-chunk/corrupt-chunk-file.pl BIDX 12 FFFFFFFF
++ command /usr/bin/perl /Users/tb/NoBackup/projects/git/git.pu/t/lib-chunk/corrupt-chunk-file.pl BIDX 12 FFFFFFFF
++ /usr/bin/perl /Users/tb/NoBackup/projects/git/git.pu/t/lib-chunk/corrupt-chunk-file.pl BIDX 12 FFFFFFFF
++ mv .git/objects/info/commit-graph.tmp .git/objects/info/commit-graph
override r--r--r--  tb/staff for .git/objects/info/commit-graph? (y/n [n]) not overwritten
++ git -c core.commitGraph=false log -- A/B/file2
++ git -c core.commitGraph=true log -- A/B/file2
++ test_cmp expect.out out
++ test 2 -ne 2
++ eval 'diff -u' '"$@"'
+++ diff -u expect.out out
++ grep 'warning: ignoring out-of-range offset (4294967295) for changed-path filter at pos 3 of .git/objects/info/commit-graph' err
error: last command exited with $?=1
++ rm -rf .git/objects/info/commit-graph
++ exit 1
++ eval_ret=1
++ :
not ok 142 - Bloom reader notices out-of-bounds filter offsets

expecting success of 4216.143 'Bloom reader notices too-small index chunk':
	# replace the index with a single entry, making most
	# lookups out-of-bounds
	check_corrupt_graph BIDX clear 00000000 &&
	echo "warning: commit-graph changed-path index chunk" \
		"is too small" >expect.err &&
	test_cmp expect.err err

++ check_corrupt_graph BIDX clear 00000000
++ corrupt_graph BIDX clear 00000000
++ graph=.git/objects/info/commit-graph
++ test_when_finished 'rm -rf .git/objects/info/commit-graph'
++ test 0 = 0
++ test_cleanup='{ rm -rf .git/objects/info/commit-graph
		} && (exit "$eval_ret"); eval_ret=$?; :'
++ git commit-graph write --reachable --changed-paths
++ corrupt_chunk_file .git/objects/info/commit-graph BIDX clear 00000000
++ fn=.git/objects/info/commit-graph
++ shift
++ perl /Users/tb/NoBackup/projects/git/git.pu/t/lib-chunk/corrupt-chunk-file.pl BIDX clear 00000000
++ command /usr/bin/perl /Users/tb/NoBackup/projects/git/git.pu/t/lib-chunk/corrupt-chunk-file.pl BIDX clear 00000000
++ /usr/bin/perl /Users/tb/NoBackup/projects/git/git.pu/t/lib-chunk/corrupt-chunk-file.pl BIDX clear 00000000
++ mv .git/objects/info/commit-graph.tmp .git/objects/info/commit-graph
override r--r--r--  tb/staff for .git/objects/info/commit-graph? (y/n [n]) not overwritten
++ git -c core.commitGraph=false log -- A/B/file2
++ git -c core.commitGraph=true log -- A/B/file2
++ test_cmp expect.out out
++ test 2 -ne 2
++ eval 'diff -u' '"$@"'
+++ diff -u expect.out out
++ echo 'warning: commit-graph changed-path index chunk' 'is too small'
++ test_cmp expect.err err
++ test 2 -ne 2
++ eval 'diff -u' '"$@"'
+++ diff -u expect.err err
--- expect.err	2024-05-02 05:51:11.000000000 +0000
+++ err	2024-05-02 05:51:11.000000000 +0000
@@ -1 +0,0 @@
-warning: commit-graph changed-path index chunk is too small
error: last command exited with $?=1
++ rm -rf .git/objects/info/commit-graph
++ exit 1
++ eval_ret=1
++ :
not ok 143 - Bloom reader notices too-small index chunk

expecting success of 4216.144 'Bloom reader notices out-of-order index offsets':
	# we do not know any real offsets, but we can pick
	# something plausible; we should not get to the point of
	# actually reading from the bogus offsets anyway.
	corrupt_graph BIDX 4 0000000c00000005 &&
	echo "warning: ignoring decreasing changed-path index offsets" \
		"(12 > 5) for positions 1 and 2 of .git/objects/info/commit-graph" >expect.err &&
	git -c core.commitGraph=false log -- A/B/file2 >expect.out &&
	git -c core.commitGraph=true log -- A/B/file2 >out 2>err &&
	test_cmp expect.out out &&
	test_cmp expect.err err

++ corrupt_graph BIDX 4 0000000c00000005
++ graph=.git/objects/info/commit-graph
++ test_when_finished 'rm -rf .git/objects/info/commit-graph'
++ test 0 = 0
++ test_cleanup='{ rm -rf .git/objects/info/commit-graph
		} && (exit "$eval_ret"); eval_ret=$?; :'
++ git commit-graph write --reachable --changed-paths
++ corrupt_chunk_file .git/objects/info/commit-graph BIDX 4 0000000c00000005
++ fn=.git/objects/info/commit-graph
++ shift
++ perl /Users/tb/NoBackup/projects/git/git.pu/t/lib-chunk/corrupt-chunk-file.pl BIDX 4 0000000c00000005
++ command /usr/bin/perl /Users/tb/NoBackup/projects/git/git.pu/t/lib-chunk/corrupt-chunk-file.pl BIDX 4 0000000c00000005
++ /usr/bin/perl /Users/tb/NoBackup/projects/git/git.pu/t/lib-chunk/corrupt-chunk-file.pl BIDX 4 0000000c00000005
++ mv .git/objects/info/commit-graph.tmp .git/objects/info/commit-graph
override r--r--r--  tb/staff for .git/objects/info/commit-graph? (y/n [n]) not overwritten
++ echo 'warning: ignoring decreasing changed-path index offsets' '(12 > 5) for positions 1 and 2 of .git/objects/info/commit-graph'
++ git -c core.commitGraph=false log -- A/B/file2
++ git -c core.commitGraph=true log -- A/B/file2
++ test_cmp expect.out out
++ test 2 -ne 2
++ eval 'diff -u' '"$@"'
+++ diff -u expect.out out
++ test_cmp expect.err err
++ test 2 -ne 2
++ eval 'diff -u' '"$@"'
+++ diff -u expect.err err
--- expect.err	2024-05-02 05:51:11.000000000 +0000
+++ err	2024-05-02 05:51:11.000000000 +0000
@@ -1 +0,0 @@
-warning: ignoring decreasing changed-path index offsets (12 > 5) for positions 1 and 2 of .git/objects/info/commit-graph
error: last command exited with $?=1
++ rm -rf .git/objects/info/commit-graph
++ exit 1
++ eval_ret=1
++ :
not ok 144 - Bloom reader notices out-of-order index offsets
Previous: rsbecker@nexbridge.comNext: Junio C Hamano
Message 3 of 12 in “[ANNOUNCE] Git v2.45.0”
  1. Junio C HamanoApr 29, 2024
  2. rsbecker@nexbridge.comMay 1, 2024
  3. t4216-log-bloom.sh broken ?Torsten Bögershausen, May 2, 2024
  4. Junio C HamanoMay 2, 2024
  5. Torsten BögershausenMay 2, 2024
  6. SZEDER GáborMay 2, 2024
  7. Junio C HamanoMay 2, 2024
  8. Junio C HamanoMay 2, 2024
  9. Junio C HamanoMay 2, 2024
  10. Torsten BögershausenMay 2, 2024
  11. Junio C HamanoMay 2, 2024
  12. Junio C HamanoMay 2, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.