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

Re: [PATCH] prune: save reachable-from-recent objects with bitmaps

From
DEDavid Emett <dave@sp4m.net>
Date
Apr 28, 2021, 12:20 UTC
Message-ID
<CAJ-dYSOHEfRq3p_MQMJoHf5PjwQtbJOzJ9Dzxrfe+BDkov7Q8w@mail.gmail.com>
In-Reply-To
<YIgxPtDmr9sYj0ft@coredump.intra.peff.net>
> Here's a fix. Thanks very much for reporting.

Thanks for the quick response! I tried the fix out on the repo I was having trouble with. It's hitting a segfault in traverse_commit_list in the mark_recent block. It looks like the issue is that the bitmap code leaves revs->include_check set, with revs->include_check_data pointing at the stack. Setting revs->include_check to NULL after the traverse_commit_list call in find_objects in pack-bitmap.c fixes the segfault for me. And the original issue appears to be resolved as well, so thanks!

Show 6 quoted lines
> I was a little surprised you saw this with "git gc", as when I tried
> testing with that, I found that the "git repack" run before "git prune"
> works around the bug (see the discussion of t6501 below). But I think
> perhaps it is just that "gc --auto" is more willing to do a "repack -d"
> sometimes, rather than a full "repack -A". At any rate, I was able to
> easily reproduce it for the tests with just git-prune.

I can't say for sure that this bug is what I was seeing originally, however it does seem quite likely -- the commits that hit issues were minor updates of commits that had been fetched a month or so earlier, and so would certainly fit the bill. Like you though I've just been reproducing with git prune.

Previous: Jeff KingNext: Jeff King
Message 5 of 10 in “Two issues with mark_reachable_objects”
  1. David EmettApr 27, 2021
  2. Jeff KingApr 27, 2021
  3. Jeff KingApr 27, 2021
  4. prune: save reachable-from-recent objects with bitmapsJeff King, Apr 27, 2021
  5. David EmettApr 28, 2021
  6. Jeff KingApr 28, 2021
  7. 0/2 prune: save reachable-from-recent objects with bitmapsJeff King, Apr 28, 2021
  8. 1/2 pack-bitmap: clean up include_check after useJeff King, Apr 28, 2021
  9. 2/2 prune: save reachable-from-recent objects with bitmapsJeff King, Apr 28, 2021
  10. Junio C HamanoApr 29, 2021

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.