{"thread":{"id":"54555","subject":"BUG: commit-graph.c:1068 when doing `git pull`","startedAt":"2020-11-02T18:30:57Z","lastAt":"2020-11-12T16:27:08Z","messageCount":4,"participants":["herr.kaste","Taylor Blau","Ævar Arnfjörð Bjarmason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"408872","messageId":"CAFzd1+7xQHgaOYKW7WZaWCPdp85Pfk8k_M-gVtBq6Wf7bbJTzg@mail.gmail.com","threadId":"54555","inReplyTo":null,"subject":"BUG: commit-graph.c:1068 when doing `git pull`","fromName":"herr.kaste","fromEmail":"herr.kaste@gmail.com","sentAt":"2020-11-02T18:30:30Z","receivedAt":"2020-11-02T18:30:57Z","isPatch":false,"sender":{"key":"herr.kaste@gmail.com","avatar":null},"body":"Hi all!\n\nI'm stuck with this error message\n\n    $ git pull\n    BUG: commit-graph.c:1068: missing parent\n104f5eb377763b2ed9663e8949aed265b69f000f for commit\nc59ed9b7b6d4268ae6cb1069a9b51e02ad9aa1d8\n\nThis happens since the last `fetch --prune origin`.\n\nIf I do it again, I get\n\n    $ git pull\n    fatal: Unable to create 'C:/Users/c-flo/AppData/Roaming/Sublime\nText 3/Packages/GitSavvy/.git/objects/info/commit-graphs/commit-graph-chain.lock':\nFile exists.\n    ...\n\nAnd upon removing that file, I get the first error message again.\n\nI actually don't know yet how to move on from here.  I'm stuck, so I\nappreciate any help.\n\n    $ git --version\n    git version 2.29.2.windows.1\n\n\nRegards\nCaspar Duregger\n"},{"id":"408895","messageId":"CAFzd1+7VxaGGMVKicuy8KnWdZoBxEHY8xS9kK1VF0Tgai=Kcxg@mail.gmail.com","threadId":"54555","inReplyTo":"CAFzd1+7xQHgaOYKW7WZaWCPdp85Pfk8k_M-gVtBq6Wf7bbJTzg@mail.gmail.com","subject":"Re: BUG: commit-graph.c:1068 when doing `git pull`","fromName":"herr.kaste","fromEmail":"herr.kaste@gmail.com","sentAt":"2020-11-02T19:12:07Z","receivedAt":"2020-11-02T19:12:35Z","isPatch":false,"sender":{"key":"herr.kaste@gmail.com","avatar":null},"body":"A\n\n    $ git commit-graph write\n\ndid the trick.\n\nLet me know if you think there could be something useful to reproduce,\nsomewhere.\n\nRegards\nCaspar Duregger\n\nAm Mo., 2. Nov. 2020 um 19:30 Uhr schrieb herr.kaste <herr.kaste@gmail.com>:\n>\n> Hi all!\n>\n> I'm stuck with this error message\n>\n>     $ git pull\n>     BUG: commit-graph.c:1068: missing parent\n> 104f5eb377763b2ed9663e8949aed265b69f000f for commit\n> c59ed9b7b6d4268ae6cb1069a9b51e02ad9aa1d8\n>\n> This happens since the last `fetch --prune origin`.\n>\n> If I do it again, I get\n>\n>     $ git pull\n>     fatal: Unable to create 'C:/Users/c-flo/AppData/Roaming/Sublime\n> Text 3/Packages/GitSavvy/.git/objects/info/commit-graphs/commit-graph-chain.lock':\n> File exists.\n>     ...\n>\n> And upon removing that file, I get the first error message again.\n>\n> I actually don't know yet how to move on from here.  I'm stuck, so I\n> appreciate any help.\n>\n>     $ git --version\n>     git version 2.29.2.windows.1\n>\n>\n> Regards\n> Caspar Duregger\n"},{"id":"409764","messageId":"X61J7bWDXO/r7Ob5@nand.local","threadId":"54555","inReplyTo":"CAFzd1+7VxaGGMVKicuy8KnWdZoBxEHY8xS9kK1VF0Tgai=Kcxg@mail.gmail.com","subject":"Re: BUG: commit-graph.c:1068 when doing `git pull`","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2020-11-12T14:42:53Z","receivedAt":"2020-11-12T14:43:02Z","isPatch":false,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"Hi Caspar,\n\nOn Mon, Nov 02, 2020 at 08:12:07PM +0100, herr.kaste wrote:\n> A\n>\n>     $ git commit-graph write\n>\n> did the trick.\n>\n> Let me know if you think there could be something useful to reproduce,\n> somewhere.\n\nI think this is worth trying to reproduce. The first message you're\nseeing about the commit-graph-chain.lock already existing is a\nred-herring: it's likely that the last time you tried to generate a\ncommit-graph, that it hit that same BUG() and left the stale lock laying\naround. (I can't remember off the top of my head whether we still run\nthe atexit handlers upon a BUG(), but even still, I could believe that\nsome other stray process left it laying around, too).\n\nSo, what's interesting is why your commit graph ended up in a state that\nit got some commit without all of its parents. If you could reproduce\nthat state, that would be interesting.\n\nAre you using shallow or partial clones?\n\n> Regards\n> Caspar Duregger\n>\n> Am Mo., 2. Nov. 2020 um 19:30 Uhr schrieb herr.kaste <herr.kaste@gmail.com>:\n> >\n> > Hi all!\n> >\n> > I'm stuck with this error message\n> >\n> >     $ git pull\n> >     BUG: commit-graph.c:1068: missing parent\n> > 104f5eb377763b2ed9663e8949aed265b69f000f for commit\n> > c59ed9b7b6d4268ae6cb1069a9b51e02ad9aa1d8\n> >\n> > This happens since the last `fetch --prune origin`.\n> >\n> > If I do it again, I get\n> >\n> >     $ git pull\n> >     fatal: Unable to create 'C:/Users/c-flo/AppData/Roaming/Sublime\n> > Text 3/Packages/GitSavvy/.git/objects/info/commit-graphs/commit-graph-chain.lock':\n> > File exists.\n> >     ...\n> >\n> > And upon removing that file, I get the first error message again.\n> >\n> > I actually don't know yet how to move on from here.  I'm stuck, so I\n> > appreciate any help.\n> >\n> >     $ git --version\n> >     git version 2.29.2.windows.1\n> >\n> >\n> > Regards\n> > Caspar Duregger\n\nThanks,\nTaylor\n"},{"id":"409769","messageId":"871rgyh76x.fsf@evledraar.gmail.com","threadId":"54555","inReplyTo":"X61J7bWDXO/r7Ob5@nand.local","subject":"Re: BUG: commit-graph.c:1068 when doing `git pull`","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2020-11-12T16:27:02Z","receivedAt":"2020-11-12T16:27:08Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Nov 12 2020, Taylor Blau wrote:\n\n> Hi Caspar,\n>\n> On Mon, Nov 02, 2020 at 08:12:07PM +0100, herr.kaste wrote:\n>> A\n>>\n>>     $ git commit-graph write\n>>\n>> did the trick.\n>>\n>> Let me know if you think there could be something useful to reproduce,\n>> somewhere.\n>\n> I think this is worth trying to reproduce. The first message you're\n> seeing about the commit-graph-chain.lock already existing is a\n> red-herring: it's likely that the last time you tried to generate a\n> commit-graph, that it hit that same BUG() and left the stale lock laying\n> around. (I can't remember off the top of my head whether we still run\n> the atexit handlers upon a BUG(), but even still, I could believe that\n> some other stray process left it laying around, too).\n>\n> So, what's interesting is why your commit graph ended up in a state that\n> it got some commit without all of its parents. If you could reproduce\n> that state, that would be interesting.\n\nNo matter how it got to that point we shouldn't be dying on a \"git pull\"\njust because the commit-graph code had a hickup. I thought I'd addressed\nthis in 43d3561805 (\"commit-graph write: don't die if the existing graph\nis corrupt\", 2019-03-25) and related commits, but I see that's not the\ncase.\n\nThat code really needs to learn how to operate in two different\nmodes. One in the write/verify codepath where we're the primary command\nbeing called, and one where we're just being called on\nfetch/pull/status/whatever when we shouldn't hard die just because we\ncan't access the commit-graph side data.\n"}]}