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

Re: "fatal error in commit_refs" from pushing to github

From
Duy Nguyen <pclouds@gmail.com>
Date
Sep 8, 2016, 11:03 UTC
Message-ID
<CACsJy8DW1-EsfgGkbnD3LgiygAu2JV9vs_8e+oQbenXERUA6hw@mail.gmail.com>
In-Reply-To
<20160908012553.q2aubze4qggfzjxz@sigill.intra.peff.net>
On Thu, Sep 8, 2016 at 8:25 AM, Jeff King <peff@peff.net> wrote:
Show 28 quoted lines
> On Thu, Sep 08, 2016 at 07:49:12AM +0700, Duy Nguyen wrote:
>
>> I got the message in the subject when pushing to github today. Yes I
>> know it's github, not git. But according to stackoveflow [1] it's a
>> local problem. Which makes me think, if we know exactly what this is
>> (or at least roughly the problem area), maybe we could improve git to
>> catch it locally in the first place (and because other git servers may
>> not have the same protection as github).  Jeff maybe you can reveal
>> something about this "fatal error in commit_refs"? I'm sure it's not
>> in git code. But I would understand if the answer is "no".
>
> The short answer is that it's nothing to do with Git or the client; it's
> GitHub-specific code running on the server that is outside of Git
> entirely.
>
> The long answer is that pushes to GitHub don't hit Git directly these
> days. They hit a proxy layer that speaks just enough of the Git protocol
> to relay to N separate receives spread across N replica servers[1]. Those
> receive-packs take in the pack and verify it, but don't actually update
> any refs[2]. Then the proxy layer runs its own set of policy hooks, and
> speaks a commit-protocol to each of the replicas so that they all agree
> on the new ref state. That last step is called "commit_refs" internally.
>
> So this is really an internal failure at the ref-update stage. There
> _should_ be a reasonable error message, but I think "fatal error in
> commit_refs" is the generic last-ditch fallback. I'll pass this along to
> people in charge of that code, as we should be generating a more useful
> error message.

Hmm.. I'm interested in this because the "fix" is from client side. I did "git gc" and "git fetch" and the problem was gone. From this description, I suppose C Git sends a good pack (phew!), but probably with some stale ref or something that upsets this this last stage. It's hard to make a connection back to either gc or fetch. Maybe gc does ref trimming or something (that should probably be done by git-push as well). Oh well.. maybe next time I see it, I'll get a nice and clear message :)

-- 
Duy
Previous: Jeff KingNext: Jeff King
Message 3 of 4 in “"fatal error in commit_refs" from pushing to github”
  1. Duy NguyenSep 8, 2016
  2. Jeff KingSep 8, 2016
  3. Duy NguyenSep 8, 2016
  4. Jeff KingSep 8, 2016

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.