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

Re: bug report - BUG: builtin/pack-objects.c:4310: should_include_obj should only be called on existing objects

From
NGNik Garza <nikolas@applied.co>
Date
Apr 28, 2025, 22:55 UTC
Message-ID
<CA+ODqj34b2DsvjxGgVb=jSaTUNYRh_nNtaCzCx8QiJ8QFsRecA@mail.gmail.com>
In-Reply-To
<20250428192320.3595509-1-jonathantanmy@google.com>
Resending....

I haven't been able to define a repro case unfortunately. The error surfaces randomly in our CI infrastructure. I'll take a look at some of the failures we have seen and try to come up with a repro. Will add a test if I can find something.

On Mon, Apr 28, 2025 at 12:23 PM Jonathan Tan <jonathantanmy@google.com> wrote:
Show 20 quoted lines
>
> Elijah Newren <newren@gmail.com> writes:
> > Cc'ing the author of that commit for his comments.
>
> I took a look. I'm not sure why I made the assumption that
> should_include_obj() would only ever be called on objects in the repo
> - in process_tree() in list-objects.c, the case of a missing object is
> handled only after should_include_obj() is called. Looking back at the
> earliest mention of this on the list [1] I don't see any clues either.
>
> In any case, the fix is probably to change it so that
> should_include_obj() returns 0 if the object is absent.
>
> Having said that, I couldn't come up with a test that exercises this
> failure mode. Nik, do you have a minimal repo that reproduces this
> error? If yes, if you could contribute a test in the form of the 'after
> fetching descendants of non-promisor commits, gc works' test in t5616,
> that would help prevent regressions in the future.
>
> [1] https://lore.kernel.org/git/fb2c202591b466eea33b4585e47b70e9086603bb.1729549127.git.jonathantanmy@google.com/
-- 
Nikolas Garza

Software Engineer

nikolas@applied.co

(209) 499-1193

Applied Intuition, Inc.
Previous: Jonathan TanNext: Sam Estep
Message 4 of 5 in “bug report - BUG: builtin/pack-objects.c:4310: should_include_obj should only be called on existing objects”
  1. Nik GarzaApr 25, 2025
  2. Elijah NewrenApr 25, 2025
  3. Jonathan TanApr 28, 2025
  4. Nik GarzaApr 28, 2025
  5. Sam EstepOct 17, 2025

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.