{"thread":{"id":"55118","subject":"BUG: commit-reach.c:66: bad generation skip","startedAt":"2021-02-07T22:29:42Z","lastAt":"2021-02-10T20:15:48Z","messageCount":6,"participants":["Filippo Valsorda","Derrick Stolee","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"416387","messageId":"CA+2K_KotVrV=rjE6fcd_FfxxS0sewkywvO0EMVZdoHbSiqJTQw@mail.gmail.com","threadId":"55118","inReplyTo":null,"subject":"BUG: commit-reach.c:66: bad generation skip","fromName":"Filippo Valsorda","fromEmail":"valsorda@google.com","sentAt":"2021-02-07T22:28:28Z","receivedAt":"2021-02-07T22:29:42Z","isPatch":false,"sender":{"key":"valsorda@google.com","avatar":null},"body":"What did you do before the bug happened? (Steps to reproduce your issue)\n\n$ git merge origin/master\n\n\nWhat happened instead? (Actual behavior)\n\nBUG: commit-reach.c:66: bad generation skip     ad18 >        7 at\nbe28e5abc5ddca0d6b2d8c91b7bb9c05717154e7\n\n\nAnything else you want to add:\n\nRunning in a worktree of a clone of https://go.googlesource.com/go.\nHEAD is 0d34d85dee216b62a4212d25de57e1119c1e7ee5, branch is\nfilippo/boringcrypto/16,\ntracking and matching origin/dev.boringcrypto.\norigin/master is 724d0720b3e110f64598bf789cbe2a6a1b3b0fd8.\n\n\n[System Info]\ngit version:\ngit version 2.30.0\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Darwin 20.3.0 Darwin Kernel Version 20.3.0: Mon Dec  7 22:04:02\nPST 2020; root:xnu-7195.80.16.111.1~1/RELEASE_X86_64 x86_64\ncompiler info: clang: 12.0.0 (clang-1200.0.32.28)\nlibc info: no libc information available\n$SHELL (typically, interactive shell): /Users/valsorda/homebrew/bin/zsh\n\n\n[Enabled Hooks]\npre-commit\ncommit-msg\n"},{"id":"416388","messageId":"CA+2K_KqH=Gn=Yx-UYzMBO+gZje3G3PJ_3-5HeO81wyZKvVwOSA@mail.gmail.com","threadId":"55118","inReplyTo":"CA+2K_KotVrV=rjE6fcd_FfxxS0sewkywvO0EMVZdoHbSiqJTQw@mail.gmail.com","subject":"Re: BUG: commit-reach.c:66: bad generation skip","fromName":"Filippo Valsorda","fromEmail":"valsorda@google.com","sentAt":"2021-02-07T22:31:58Z","receivedAt":"2021-02-07T22:33:07Z","isPatch":false,"sender":{"key":"valsorda@google.com","avatar":null},"body":"I was able to workaround this bug with a \"git gc\" invocation.\n\nOn Sun, Feb 7, 2021 at 11:28 PM Filippo Valsorda <valsorda@google.com> wrote:\n>\n> What did you do before the bug happened? (Steps to reproduce your issue)\n>\n> $ git merge origin/master\n>\n>\n> What happened instead? (Actual behavior)\n>\n> BUG: commit-reach.c:66: bad generation skip     ad18 >        7 at\n> be28e5abc5ddca0d6b2d8c91b7bb9c05717154e7\n>\n>\n> Anything else you want to add:\n>\n> Running in a worktree of a clone of https://go.googlesource.com/go.\n> HEAD is 0d34d85dee216b62a4212d25de57e1119c1e7ee5, branch is\n> filippo/boringcrypto/16,\n> tracking and matching origin/dev.boringcrypto.\n> origin/master is 724d0720b3e110f64598bf789cbe2a6a1b3b0fd8.\n>\n>\n> [System Info]\n> git version:\n> git version 2.30.0\n> cpu: x86_64\n> no commit associated with this build\n> sizeof-long: 8\n> sizeof-size_t: 8\n> shell-path: /bin/sh\n> uname: Darwin 20.3.0 Darwin Kernel Version 20.3.0: Mon Dec  7 22:04:02\n> PST 2020; root:xnu-7195.80.16.111.1~1/RELEASE_X86_64 x86_64\n> compiler info: clang: 12.0.0 (clang-1200.0.32.28)\n> libc info: no libc information available\n> $SHELL (typically, interactive shell): /Users/valsorda/homebrew/bin/zsh\n>\n>\n> [Enabled Hooks]\n> pre-commit\n> commit-msg\n"},{"id":"416390","messageId":"c19b6e23-96cd-fd0a-163d-826b46b51da0@gmail.com","threadId":"55118","inReplyTo":"CA+2K_KqH=Gn=Yx-UYzMBO+gZje3G3PJ_3-5HeO81wyZKvVwOSA@mail.gmail.com","subject":"Re: BUG: commit-reach.c:66: bad generation skip","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2021-02-08T02:26:02Z","receivedAt":"2021-02-08T02:26:46Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 2/7/2021 5:31 PM, Filippo Valsorda wrote:\n> \n> On Sun, Feb 7, 2021 at 11:28 PM Filippo Valsorda <valsorda@google.com> wrote:\n\n>> [System Info]\n>> git version:\n>> git version 2.30.0\n\n_This_ is interesting. I haven't heard of this problem happening\nin a released version of Git.\n\nI'm CC'ing Jonathan Nieder who recently saw this happening, but that\nwas on a newer version than 2.30.0 with a topic that is not part\nof 2.30.0. But maybe the version shipped internally is versioned\nwithout extra information on top of the latest tag? (I see your\n@google.com email, which makes me think you have an internal version.)\n\n>> What happened instead? (Actual behavior)\n>>\n>> BUG: commit-reach.c:66: bad generation skip     ad18 >        7 at\n>> be28e5abc5ddca0d6b2d8c91b7bb9c05717154e7\n\nThis was recently reported, but it was thought to be due to an\nin-process topic branch. If you recently had that version installed,\nthen your data would have needed a rewrite anyway.\n\nThis hints towards more problems with generation numbers across\nsplit commit-graph layers. (The child has generation number 7, so\nit is likely part of a thin layer.)\n\nThis might be sufficient evidence to convert this BUG() to a\nwarning with something like:\n\n  warning: The commit-graph file has incorrect reachability index\n  warning: information. Results may be incorrect until commit-graph\n  warning: is rewritten with 'git commit-graph write'.\n\nThis could also be a die() instead of warning(), as that command\nitself might return incorrect results.\n\n> I was able to workaround this bug with a \"git gc\" invocation.\n\nYes, this will delete (and possibly replace) your commit-graph file\nwhere the bad data lies.\n\nTo better understand your situation, could you please run the\nfollowing commands?\n\n\tgit config --get-regexp graph\n\tgit config features.experimental\n\nI'm specifically looking for values of fetch.writeCommitGraph and\ngc.writeCommitGraph.\n\nThanks,\n-Stolee\n"},{"id":"416626","messageId":"CA+2K_KqEzH7XmrHXd0Vniu+tBQpFwFnYPyzoj-kMhyN2NnoZFQ@mail.gmail.com","threadId":"55118","inReplyTo":"c19b6e23-96cd-fd0a-163d-826b46b51da0@gmail.com","subject":"Re: BUG: commit-reach.c:66: bad generation skip","fromName":"Filippo Valsorda","fromEmail":"valsorda@google.com","sentAt":"2021-02-10T12:18:11Z","receivedAt":"2021-02-10T12:21:39Z","isPatch":false,"sender":{"key":"valsorda@google.com","avatar":null},"body":"On Mon, Feb 8, 2021 at 3:26 AM Derrick Stolee <stolee@gmail.com> wrote:\n> _This_ is interesting. I haven't heard of this problem happening\n> in a released version of Git.\n>\n> I'm CC'ing Jonathan Nieder who recently saw this happening, but that\n> was on a newer version than 2.30.0 with a topic that is not part\n> of 2.30.0. But maybe the version shipped internally is versioned\n> without extra information on top of the latest tag? (I see your\n> @google.com email, which makes me think you have an internal version.)\n\nAh, the issue indeed first showed up as I was using the internal\nversion. I then installed mainline 2.30.0 to check that it reproduced\non the same local repository before reporting a bug.\n\n> To better understand your situation, could you please run the\n> following commands?\n>\n>         git config --get-regexp graph\n>         git config features.experimental\n>\n> I'm specifically looking for values of fetch.writeCommitGraph and\n> gc.writeCommitGraph.\n\nfetch.writecommitgraph is enabled on the internal version.\n\n$ git version\ngit version 2.30.0.478.g8a0d178c01-goog\n$ git config --get-regexp graph\nfetch.writecommitgraph true\n$ git config features.experimental\n$ ~/homebrew/bin/git version\ngit version 2.30.0\n$ ~/homebrew/bin/git config --get-regexp graph\n$ ~/homebrew/bin/git config features.experimental\n\nI zipped up the repository and the worktree before running gc, so I can\nrun other commands for you if you need, but unfortunately I can't share\nthe archive, as it fetched from a private branch with security fixes.\n"},{"id":"416627","messageId":"962a2abc-6352-4d19-c39f-29f3c744f861@gmail.com","threadId":"55118","inReplyTo":"CA+2K_KqEzH7XmrHXd0Vniu+tBQpFwFnYPyzoj-kMhyN2NnoZFQ@mail.gmail.com","subject":"Re: BUG: commit-reach.c:66: bad generation skip","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2021-02-10T12:24:45Z","receivedAt":"2021-02-10T12:28:25Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 2/10/2021 7:18 AM, Filippo Valsorda wrote:\n> On Mon, Feb 8, 2021 at 3:26 AM Derrick Stolee <stolee@gmail.com> wrote:\n>> _This_ is interesting. I haven't heard of this problem happening\n>> in a released version of Git.\n>>\n>> I'm CC'ing Jonathan Nieder who recently saw this happening, but that\n>> was on a newer version than 2.30.0 with a topic that is not part\n>> of 2.30.0. But maybe the version shipped internally is versioned\n>> without extra information on top of the latest tag? (I see your\n>> @google.com email, which makes me think you have an internal version.)\n> \n> Ah, the issue indeed first showed up as I was using the internal\n> version. I then installed mainline 2.30.0 to check that it reproduced\n> on the same local repository before reporting a bug.\n\nThe mainline does have the BUG() statement, but it's really reflecting\nbad data in the commit-graph file. That data was written by the internal\nversion and was not reset until you rewrote the file.\n\n>> To better understand your situation, could you please run the\n>> following commands?\n>>\n>>         git config --get-regexp graph\n>>         git config features.experimental\n>>\n>> I'm specifically looking for values of fetch.writeCommitGraph and\n>> gc.writeCommitGraph.\n> \n> fetch.writecommitgraph is enabled on the internal version.\n> \n> $ git version\n> git version 2.30.0.478.g8a0d178c01-goog\n> $ git config --get-regexp graph\n> fetch.writecommitgraph true\n> $ git config features.experimental\n> $ ~/homebrew/bin/git version\n> git version 2.30.0\n> $ ~/homebrew/bin/git config --get-regexp graph\n> $ ~/homebrew/bin/git config features.experimental\n> \n> I zipped up the repository and the worktree before running gc, so I can\n> run other commands for you if you need, but unfortunately I can't share\n> the archive, as it fetched from a private branch with security fixes.\n\nThanks, but let me know if it reproduces again. The bug should be fixed\nin ds/commit-graph-genno-fix [1], and I think the Google internal release\nhas been rolled back until that branch is included.\n\n[1] https://github.com/gitster/git/commits/ds/commit-graph-genno-fix\n\nThanks,\n-Stolee\n"},{"id":"416654","messageId":"xmqq7dnf3ckf.fsf@gitster.c.googlers.com","threadId":"55118","inReplyTo":"962a2abc-6352-4d19-c39f-29f3c744f861@gmail.com","subject":"Re: BUG: commit-reach.c:66: bad generation skip","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-02-10T20:14:24Z","receivedAt":"2021-02-10T20:15:48Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Derrick Stolee <stolee@gmail.com> writes:\n\n> On 2/10/2021 7:18 AM, Filippo Valsorda wrote:\n>> On Mon, Feb 8, 2021 at 3:26 AM Derrick Stolee <stolee@gmail.com> wrote:\n>>> _This_ is interesting. I haven't heard of this problem happening\n>>> in a released version of Git.\n>>>\n>>> I'm CC'ing Jonathan Nieder who recently saw this happening, but that\n>>> was on a newer version than 2.30.0 with a topic that is not part\n>>> of 2.30.0. But maybe the version shipped internally is versioned\n>>> without extra information on top of the latest tag? (I see your\n>>> @google.com email, which makes me think you have an internal version.)\n>> \n>> Ah, the issue indeed first showed up as I was using the internal\n>> version. I then installed mainline 2.30.0 to check that it reproduced\n>> on the same local repository before reporting a bug.\n>\n> The mainline does have the BUG() statement, but it's really reflecting\n> bad data in the commit-graph file. That data was written by the internal\n> version and was not reset until you rewrote the file.\n\nThanks for digging, you two.  The above clearly explains the\nsymptom.\n\n> Thanks, but let me know if it reproduces again. The bug should be fixed\n> in ds/commit-graph-genno-fix [1], and I think the Google internal release\n> has been rolled back until that branch is included.\n\nThe topic has been cooking in 'next' since Feb 3rd, so jrnieder's\nteam would probably have already picked it up.  It would be in\n'master', together with the ak/corrected-commit-date topic it builds\non, not in a very distant future (typically a topic cooks in 'next'\nfor a week, unless it is a trivial typofix, doc updates, that sort\nof low-impact change).\n\nThanks.\n"}]}