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

[PATCH 0/1] commit-graph: writing missing parents is a BUG

From
Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Date
Dec 19, 2018, 20:14 UTC
Message-ID
<pull.102.git.gitgitgadget@gmail.com>
A user complained that they had the following message in a git command:
fatal: invalid parent position 2147483647

In hex, this value is 0x7fffffff, corresponding to the GRAPH_MISSING_PARENT constant. This constant was intended as a way to have the commit-graph store commits with parents that are not also in the commit-graph. During development, however, we chose to require the commit-graph to be closed under reachability. Thus, this value should never be written, and we don't fall back to parsing usual commits when we see the constant.

This actually happened, and the root cause is unknown. This either means the reachable closure logic is broken somewhere, or something caused the binary search to find the parent in our list of commits. This second problem is more likely, as we have seen RAM issues cause corrupted memory before. I'm still investigating the root cause, but for now we can hit a BUG() statement instead of writing bad data.

Thanks, -Stolee
Derrick Stolee (1):
  commit-graph: writing missing parents is a BUG
 commit-graph.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
base-commit: 0d0ac3826a3bbb9247e39e12623bbcfdd722f24c
Published-As: https://github.com/gitgitgadget/git/releases/tags/pr-102%2Fderrickstolee%2Fcommit-graph-bug-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-102/derrickstolee/commit-graph-bug-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/102
-- 
gitgitgadget
Next: Derrick Stolee via GitGitGadget
Message 1 of 3 in “commit-graph: writing missing parents is a BUG”
  1. 0/1 commit-graph: writing missing parents is a BUGDerrick Stolee via GitGitGadget, Dec 19, 2018
  2. 1/1 commit-graph: writing missing parents is a BUGDerrick Stolee via GitGitGadget, Dec 19, 2018
  3. Junio C HamanoJan 2, 2019

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.