All of lore.kernel.org
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Thomas Braun <thomas.braun@virtuell-zuhause.de>,
	Jeff King <peff@peff.net>
Cc: Taylor Blau <me@ttaylorr.com>,
	GIT Mailing-list <git@vger.kernel.org>,
	Derrick Stolee <dstolee@microsoft.com>
Subject: Re: 2.29.0.rc0.windows.1: Duplicate commit id error message when fetching
Date: Fri, 9 Oct 2020 12:49:21 -0400	[thread overview]
Message-ID: <0d25e0ab-31ab-54c2-b518-bd9c0b0c4b7a@gmail.com> (raw)
In-Reply-To: <267a9f46-cce9-0bd3-f28d-55e71cc8a399@virtuell-zuhause.de>

On 10/9/2020 11:29 AM, Thomas Braun wrote:
> I think I have a starting point for what goes wrong. I found a local
> repo with another broken commit graph. And after some fiddling the
> following script can reproduce it. I tried with git/git first but that
> seems not to trigger that.

I'm glad you're able to trigger bad commit-graph data somehow.
Let's see what's going on:

> # rm -rf dummy
> mkdir dummy
> cd dummy
> 
> git init
> 
> git remote add origin https://github.com/tango-controls/cppTango
> git remote add fork1 https://github.com/bourtemb/cppTango
> git remote add fork2 https://github.com/t-b/cppTango
> git fetch --all --jobs 12

My gut reaction is that this parallel fetching is causing
an issue, but we will see. Do you get a repro if you drop
the "--jobs 12"?

> git commit-graph verify
> rm -rf .git/objects/info/commit-graphs/
> git commit-graph verify
> git fetch --jobs 12
> git remote add fork3 git@github.com:t-b/cppTango.git
> git commit-graph verify
> git remote add fork4 git@github.com:t-b/cppTango.git
> git fetch --jobs 12
> git commit-graph verify
> 
> The last verify outputs
> 
> commit-graph generation for commit
> 029341567c24582030592585b395f4438273263f is 1054 != 1
> commit-graph generation for commit
> 1e8d10aec7ca6075f622c447d416071390698124 is 4294967295 != 1171
> commit-graph generation for commit
> 296e93516189c0134843fd56ac4f10d36ccf284f is 1054 != 1
> commit-graph generation for commit
> 4c0a7a3cd369d06b99d867be6b47a96c519efd7f is 1054 != 1
> commit-graph has non-zero generation number for commit
> 4d39849950d3dc02b7426c780ac7991ec7221176, but zero elsewhere
> commit-graph has non-zero generation number for commit 4
> [....]

This looks more troubling than just duplicate rows, but
perhaps those duplicate rows are causing sufficient
confusion when reading the commit-graph during the
'verify' command?

I tried incorporating this into the Git test suite so I
could test it on v2.29.0-rc0 and the current merge-check,
but I'm failing to reproduce the failure with this script:

diff --git a/t/t5324-split-commit-graph.sh b/t/t5324-split-commit-graph.sh
index c334ee9155..2b3f3db593 100755
--- a/t/t5324-split-commit-graph.sh
+++ b/t/t5324-split-commit-graph.sh
@@ -440,4 +440,26 @@ test_expect_success '--split=replace with partial Bloom data' '
 	verify_chain_files_exist $graphdir
 '
 
+test_expect_success 'test' '
+	git init dummy &&
+	(
+		cd dummy &&
+		export GIT_TRACE2_EVENT="$TRASH_DIRECTORY/../trace.txt" &&
+		git config fetch.writeCommitGraph true &&
+		git remote add origin https://github.com/tango-controls/cppTango &&
+		git remote add fork1 https://github.com/bourtemb/cppTango &&
+		git remote add fork2 https://github.com/t-b/cppTango &&
+		git fetch --all --jobs 12 &&
+		git commit-graph verify &&
+		rm -rf .git/objects/info/commit-graphs/ &&
+		git commit-graph verify &&
+		git fetch --jobs 12 &&
+		git remote add fork3 git@github.com:t-b/cppTango.git &&
+		git commit-graph verify &&
+		git remote add fork4 git@github.com:t-b/cppTango.git &&
+		git fetch --jobs 12 &&
+		git commit-graph verify
+	)
+'
+
 test_done

I tried this on Linux and Windows, and under "--stress" but never
saw a failure.

Thomas: some things that could possibly help is if you repro this
situation but also do something like

	export GIT_TRACE2_EVENT="$(pwd)/trace.txt"

so we can read the details of everything Git is tracing during
these parallel jobs. We might be able to stitch together a
sequence of events that lead to these failures.

Thanks,
Stolee

  reply	other threads:[~2020-10-09 16:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07 20:28 2.29.0.rc0.windows.1: Duplicate commit id error message when fetching Thomas Braun
2020-10-07 21:06 ` Jeff King
2020-10-08  9:52   ` Thomas Braun
2020-10-08 12:06     ` Jeff King
2020-10-08 12:50       ` Derrick Stolee
2020-10-08 13:22         ` Derrick Stolee
2020-10-09 15:29           ` Thomas Braun
2020-10-09 16:49             ` Derrick Stolee [this message]
2020-10-09 17:12               ` Thomas Braun
2020-10-09 17:46                 ` Derrick Stolee
2020-10-09 17:55                   ` Jeff King
2020-10-09 18:28                     ` Taylor Blau
2020-10-09 18:33                       ` Derrick Stolee
2020-10-09 18:37                         ` Taylor Blau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0d25e0ab-31ab-54c2-b518-bd9c0b0c4b7a@gmail.com \
    --to=stolee@gmail.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=me@ttaylorr.com \
    --cc=peff@peff.net \
    --cc=thomas.braun@virtuell-zuhause.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.