git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BUG: commit-reach.c:66: bad generation skip
@ 2021-02-07 22:28 Filippo Valsorda
  2021-02-07 22:31 ` Filippo Valsorda
  0 siblings, 1 reply; 6+ messages in thread
From: Filippo Valsorda @ 2021-02-07 22:28 UTC (permalink / raw)
  To: git

What did you do before the bug happened? (Steps to reproduce your issue)

$ git merge origin/master


What happened instead? (Actual behavior)

BUG: commit-reach.c:66: bad generation skip     ad18 >        7 at
be28e5abc5ddca0d6b2d8c91b7bb9c05717154e7


Anything else you want to add:

Running in a worktree of a clone of https://go.googlesource.com/go.
HEAD is 0d34d85dee216b62a4212d25de57e1119c1e7ee5, branch is
filippo/boringcrypto/16,
tracking and matching origin/dev.boringcrypto.
origin/master is 724d0720b3e110f64598bf789cbe2a6a1b3b0fd8.


[System Info]
git version:
git version 2.30.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Darwin 20.3.0 Darwin Kernel Version 20.3.0: Mon Dec  7 22:04:02
PST 2020; root:xnu-7195.80.16.111.1~1/RELEASE_X86_64 x86_64
compiler info: clang: 12.0.0 (clang-1200.0.32.28)
libc info: no libc information available
$SHELL (typically, interactive shell): /Users/valsorda/homebrew/bin/zsh


[Enabled Hooks]
pre-commit
commit-msg

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG: commit-reach.c:66: bad generation skip
  2021-02-07 22:28 BUG: commit-reach.c:66: bad generation skip Filippo Valsorda
@ 2021-02-07 22:31 ` Filippo Valsorda
  2021-02-08  2:26   ` Derrick Stolee
  0 siblings, 1 reply; 6+ messages in thread
From: Filippo Valsorda @ 2021-02-07 22:31 UTC (permalink / raw)
  To: git

I was able to workaround this bug with a "git gc" invocation.

On Sun, Feb 7, 2021 at 11:28 PM Filippo Valsorda <valsorda@google.com> wrote:
>
> What did you do before the bug happened? (Steps to reproduce your issue)
>
> $ git merge origin/master
>
>
> What happened instead? (Actual behavior)
>
> BUG: commit-reach.c:66: bad generation skip     ad18 >        7 at
> be28e5abc5ddca0d6b2d8c91b7bb9c05717154e7
>
>
> Anything else you want to add:
>
> Running in a worktree of a clone of https://go.googlesource.com/go.
> HEAD is 0d34d85dee216b62a4212d25de57e1119c1e7ee5, branch is
> filippo/boringcrypto/16,
> tracking and matching origin/dev.boringcrypto.
> origin/master is 724d0720b3e110f64598bf789cbe2a6a1b3b0fd8.
>
>
> [System Info]
> git version:
> git version 2.30.0
> cpu: x86_64
> no commit associated with this build
> sizeof-long: 8
> sizeof-size_t: 8
> shell-path: /bin/sh
> uname: Darwin 20.3.0 Darwin Kernel Version 20.3.0: Mon Dec  7 22:04:02
> PST 2020; root:xnu-7195.80.16.111.1~1/RELEASE_X86_64 x86_64
> compiler info: clang: 12.0.0 (clang-1200.0.32.28)
> libc info: no libc information available
> $SHELL (typically, interactive shell): /Users/valsorda/homebrew/bin/zsh
>
>
> [Enabled Hooks]
> pre-commit
> commit-msg

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG: commit-reach.c:66: bad generation skip
  2021-02-07 22:31 ` Filippo Valsorda
@ 2021-02-08  2:26   ` Derrick Stolee
  2021-02-10 12:18     ` Filippo Valsorda
  0 siblings, 1 reply; 6+ messages in thread
From: Derrick Stolee @ 2021-02-08  2:26 UTC (permalink / raw)
  To: Filippo Valsorda, git, Jonathan Nieder

On 2/7/2021 5:31 PM, Filippo Valsorda wrote:
> 
> On Sun, Feb 7, 2021 at 11:28 PM Filippo Valsorda <valsorda@google.com> wrote:

>> [System Info]
>> git version:
>> git version 2.30.0

_This_ is interesting. I haven't heard of this problem happening
in a released version of Git.

I'm CC'ing Jonathan Nieder who recently saw this happening, but that
was on a newer version than 2.30.0 with a topic that is not part
of 2.30.0. But maybe the version shipped internally is versioned
without extra information on top of the latest tag? (I see your
@google.com email, which makes me think you have an internal version.)

>> What happened instead? (Actual behavior)
>>
>> BUG: commit-reach.c:66: bad generation skip     ad18 >        7 at
>> be28e5abc5ddca0d6b2d8c91b7bb9c05717154e7

This was recently reported, but it was thought to be due to an
in-process topic branch. If you recently had that version installed,
then your data would have needed a rewrite anyway.

This hints towards more problems with generation numbers across
split commit-graph layers. (The child has generation number 7, so
it is likely part of a thin layer.)

This might be sufficient evidence to convert this BUG() to a
warning with something like:

  warning: The commit-graph file has incorrect reachability index
  warning: information. Results may be incorrect until commit-graph
  warning: is rewritten with 'git commit-graph write'.

This could also be a die() instead of warning(), as that command
itself might return incorrect results.

> I was able to workaround this bug with a "git gc" invocation.

Yes, this will delete (and possibly replace) your commit-graph file
where the bad data lies.

To better understand your situation, could you please run the
following commands?

	git config --get-regexp graph
	git config features.experimental

I'm specifically looking for values of fetch.writeCommitGraph and
gc.writeCommitGraph.

Thanks,
-Stolee

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG: commit-reach.c:66: bad generation skip
  2021-02-08  2:26   ` Derrick Stolee
@ 2021-02-10 12:18     ` Filippo Valsorda
  2021-02-10 12:24       ` Derrick Stolee
  0 siblings, 1 reply; 6+ messages in thread
From: Filippo Valsorda @ 2021-02-10 12:18 UTC (permalink / raw)
  To: Derrick Stolee; +Cc: git, Jonathan Nieder

On Mon, Feb 8, 2021 at 3:26 AM Derrick Stolee <stolee@gmail.com> wrote:
> _This_ is interesting. I haven't heard of this problem happening
> in a released version of Git.
>
> I'm CC'ing Jonathan Nieder who recently saw this happening, but that
> was on a newer version than 2.30.0 with a topic that is not part
> of 2.30.0. But maybe the version shipped internally is versioned
> without extra information on top of the latest tag? (I see your
> @google.com email, which makes me think you have an internal version.)

Ah, the issue indeed first showed up as I was using the internal
version. I then installed mainline 2.30.0 to check that it reproduced
on the same local repository before reporting a bug.

> To better understand your situation, could you please run the
> following commands?
>
>         git config --get-regexp graph
>         git config features.experimental
>
> I'm specifically looking for values of fetch.writeCommitGraph and
> gc.writeCommitGraph.

fetch.writecommitgraph is enabled on the internal version.

$ git version
git version 2.30.0.478.g8a0d178c01-goog
$ git config --get-regexp graph
fetch.writecommitgraph true
$ git config features.experimental
$ ~/homebrew/bin/git version
git version 2.30.0
$ ~/homebrew/bin/git config --get-regexp graph
$ ~/homebrew/bin/git config features.experimental

I zipped up the repository and the worktree before running gc, so I can
run other commands for you if you need, but unfortunately I can't share
the archive, as it fetched from a private branch with security fixes.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG: commit-reach.c:66: bad generation skip
  2021-02-10 12:18     ` Filippo Valsorda
@ 2021-02-10 12:24       ` Derrick Stolee
  2021-02-10 20:14         ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Derrick Stolee @ 2021-02-10 12:24 UTC (permalink / raw)
  To: Filippo Valsorda; +Cc: git, Jonathan Nieder

On 2/10/2021 7:18 AM, Filippo Valsorda wrote:
> On Mon, Feb 8, 2021 at 3:26 AM Derrick Stolee <stolee@gmail.com> wrote:
>> _This_ is interesting. I haven't heard of this problem happening
>> in a released version of Git.
>>
>> I'm CC'ing Jonathan Nieder who recently saw this happening, but that
>> was on a newer version than 2.30.0 with a topic that is not part
>> of 2.30.0. But maybe the version shipped internally is versioned
>> without extra information on top of the latest tag? (I see your
>> @google.com email, which makes me think you have an internal version.)
> 
> Ah, the issue indeed first showed up as I was using the internal
> version. I then installed mainline 2.30.0 to check that it reproduced
> on the same local repository before reporting a bug.

The mainline does have the BUG() statement, but it's really reflecting
bad data in the commit-graph file. That data was written by the internal
version and was not reset until you rewrote the file.

>> To better understand your situation, could you please run the
>> following commands?
>>
>>         git config --get-regexp graph
>>         git config features.experimental
>>
>> I'm specifically looking for values of fetch.writeCommitGraph and
>> gc.writeCommitGraph.
> 
> fetch.writecommitgraph is enabled on the internal version.
> 
> $ git version
> git version 2.30.0.478.g8a0d178c01-goog
> $ git config --get-regexp graph
> fetch.writecommitgraph true
> $ git config features.experimental
> $ ~/homebrew/bin/git version
> git version 2.30.0
> $ ~/homebrew/bin/git config --get-regexp graph
> $ ~/homebrew/bin/git config features.experimental
> 
> I zipped up the repository and the worktree before running gc, so I can
> run other commands for you if you need, but unfortunately I can't share
> the archive, as it fetched from a private branch with security fixes.

Thanks, but let me know if it reproduces again. The bug should be fixed
in ds/commit-graph-genno-fix [1], and I think the Google internal release
has been rolled back until that branch is included.

[1] https://github.com/gitster/git/commits/ds/commit-graph-genno-fix

Thanks,
-Stolee

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: BUG: commit-reach.c:66: bad generation skip
  2021-02-10 12:24       ` Derrick Stolee
@ 2021-02-10 20:14         ` Junio C Hamano
  0 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2021-02-10 20:14 UTC (permalink / raw)
  To: Derrick Stolee; +Cc: Filippo Valsorda, git, Jonathan Nieder

Derrick Stolee <stolee@gmail.com> writes:

> On 2/10/2021 7:18 AM, Filippo Valsorda wrote:
>> On Mon, Feb 8, 2021 at 3:26 AM Derrick Stolee <stolee@gmail.com> wrote:
>>> _This_ is interesting. I haven't heard of this problem happening
>>> in a released version of Git.
>>>
>>> I'm CC'ing Jonathan Nieder who recently saw this happening, but that
>>> was on a newer version than 2.30.0 with a topic that is not part
>>> of 2.30.0. But maybe the version shipped internally is versioned
>>> without extra information on top of the latest tag? (I see your
>>> @google.com email, which makes me think you have an internal version.)
>> 
>> Ah, the issue indeed first showed up as I was using the internal
>> version. I then installed mainline 2.30.0 to check that it reproduced
>> on the same local repository before reporting a bug.
>
> The mainline does have the BUG() statement, but it's really reflecting
> bad data in the commit-graph file. That data was written by the internal
> version and was not reset until you rewrote the file.

Thanks for digging, you two.  The above clearly explains the
symptom.

> Thanks, but let me know if it reproduces again. The bug should be fixed
> in ds/commit-graph-genno-fix [1], and I think the Google internal release
> has been rolled back until that branch is included.

The topic has been cooking in 'next' since Feb 3rd, so jrnieder's
team would probably have already picked it up.  It would be in
'master', together with the ak/corrected-commit-date topic it builds
on, not in a very distant future (typically a topic cooks in 'next'
for a week, unless it is a trivial typofix, doc updates, that sort
of low-impact change).

Thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-10 20:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-07 22:28 BUG: commit-reach.c:66: bad generation skip Filippo Valsorda
2021-02-07 22:31 ` Filippo Valsorda
2021-02-08  2:26   ` Derrick Stolee
2021-02-10 12:18     ` Filippo Valsorda
2021-02-10 12:24       ` Derrick Stolee
2021-02-10 20:14         ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).