public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Sam Estep <sam@samestep•com>
To: jonathantanmy@google•com
Cc: nikolas@applied•co, diamond@applied•co, git@vger•kernel.org,
	jack@applied•co, jl@applied•co, newren@gmail•com
Subject: Re: bug report - BUG: builtin/pack-objects.c:4310: should_include_obj should only be called on existing objects
Date: Fri, 17 Oct 2025 11:57:54 -0400	[thread overview]
Message-ID: <20251017155754.1425091-1-sam@samestep.com> (raw)
In-Reply-To: <CA+ODqj34b2DsvjxGgVb=jSaTUNYRh_nNtaCzCx8QiJ8QFsRecA@mail.gmail.com>

I hit this same bug today: https://github.com/samestep/npc/issues/6

I'm using Git v2.51.0. As Nik mentioned, the issue is flaky, but I have
been able to reproduce it several times today on both x86_64-linux and
aarch64-darwin via these steps:

$ git clone --mirror --filter=tree:0 https://github.com/NixOS/nixpkgs.git
Cloning into bare repository 'nixpkgs.git'...
remote: Enumerating objects: 1403208, done.
remote: Counting objects: 100% (1204/1204), done.
remote: Compressing objects: 100% (1164/1164), done.
remote: Total 1403208 (delta 70), reused 273 (delta 40), pack-reused 1402004 (from 2)
Receiving objects: 100% (1403208/1403208), 550.95 MiB | 19.74 MiB/s, done.
Resolving deltas: 100% (71770/71770), done.
Enumerating objects: 1, done.
Counting objects: 100% (1/1), done.
Writing objects: 100% (1/1), done.
Total 1 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
$ cd nixpkgs.git
$ git fetch --no-show-forced-updates
From https://github.com/NixOS/nixpkgs
 - [deleted]                 (none)                 -> gh-readonly-queue/master/pr-452910-91484645881d96272b133ad577cbb314c3af446f
 - [deleted]                 (none)                 -> gh-readonly-queue/master/pr-452916-93e25250a9459a0d62e9156f06d9ab66fa081ebd
 - [deleted]                 (none)                 -> gh-readonly-queue/master/pr-452934-9347aa5ba848ac348dd123e5c6b28a5e69ebebee
 - [deleted]                 (none)                 -> refs/pull/435349/merge
 - [deleted]                 (none)                 -> refs/pull/452910/merge
 - [deleted]                 (none)                 -> refs/pull/452916/merge
 - [deleted]                 (none)                 -> refs/pull/452934/merge
remote: Enumerating objects: 228, done.
remote: Counting objects: 100% (228/228), done.
remote: Compressing objects: 100% (223/223), done.
remote: Total 228 (delta 5), reused 152 (delta 5), pack-reused 0 (from 0)
Receiving objects: 100% (228/228), 123.31 KiB | 17.62 MiB/s, done.
Resolving deltas: 100% (5/5), done.
BUG: builtin/pack-objects.c:4835: should_include_obj should only be called on existing objects
error: pack-objects died of signal 6
fatal: could not finish pack-objects to repack local links
fatal: index-pack failed

If the error doesn't occur immediately, it should eventually occur if
you keep re-running that last command:

$ git fetch --no-show-forced-updates

In case it's relevant, my Git version is built from Nixpkgs commit
82c2e0d6dde50b17ae366d2aa36f224dc19af469, and I have this in my global
Git config:

[fetch]
	all = true
	prune = true

On Mon, Apr 28, 2025 at 12:23 PM Jonathan Tan <jonathantanmy@google•com> wrote:
> In any case, the fix is probably to change it so that
> should_include_obj() returns 0 if the object is absent.

Does this still seem like the right approach?

      reply	other threads:[~2025-10-17 15:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25 18:14 bug report - BUG: builtin/pack-objects.c:4310: should_include_obj should only be called on existing objects Nik Garza
2025-04-25 18:30 ` Elijah Newren
2025-04-28 19:23   ` Jonathan Tan
2025-04-28 22:55     ` Nik Garza
2025-10-17 15:57       ` Sam Estep [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251017155754.1425091-1-sam@samestep.com \
    --to=sam@samestep$(echo .)com \
    --cc=diamond@applied$(echo .)co \
    --cc=git@vger$(echo .)kernel.org \
    --cc=jack@applied$(echo .)co \
    --cc=jl@applied$(echo .)co \
    --cc=jonathantanmy@google$(echo .)com \
    --cc=newren@gmail$(echo .)com \
    --cc=nikolas@applied$(echo .)co \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox