From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH] fsck: do not loop infinitely when processing packs
Date: Sun, 22 Feb 2026 23:07:41 +0000 [thread overview]
Message-ID: <aZuMPcMYwFi4Sch5@fruit.crustytoothpaste.net> (raw)
In-Reply-To: <xmqqv7fopflu.fsf@gitster.g>
[-- Attachment #1: Type: text/plain, Size: 1448 bytes --]
On 2026-02-22 at 22:39:57, Junio C Hamano wrote:
> "brian m. carlson" <sandals@crustytoothpaste.net> writes:
>
> > diff --git a/t/t1050-large.sh b/t/t1050-large.sh
> > index 5be273611a..75e75e627c 100755
> > --- a/t/t1050-large.sh
> > +++ b/t/t1050-large.sh
> > @@ -160,6 +160,10 @@ test_expect_success 'hash-object' '
> > git hash-object large1
> > '
> >
> > +test_expect_success 'fsck does not loop forever' '
> > + git fsck
> > +'
> > +
> > test_expect_success 'cat-file a large file' '
> > git cat-file blob :large1 >/dev/null
> > '
>
> Wow, this is a fun test ;-).
>
> Thanks. Will queue.
I noticed that the code here seems to have come in with the 2.53 cycle,
so we may want to cherry-pick it to `maint` at some point if it seems
like the problem occurs often. From what I can tell, it only occurs
when one explicitly invokes `git fsck`[0] and not on transfer, so it
shouldn't cause a DoS against server implementations.
Of course, we should wait for Patrick, who authored this code, to chime
in and lend his expertise here. I must admit I'm not very familiar with
this area, although I had recently seen the MRU code when working on
pack index v3 (and then I thought, "is this actually the problem?").
[0] The code I saw is the `if (check_full)` branch in `cmd_fsck`, which
is obviously only invoked by the `fsck` command itself.
--
brian m. carlson (they/them)
Toronto, Ontario, CA
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next prev parent reply other threads:[~2026-02-22 23:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-22 18:37 [PATCH] fsck: do not loop infinitely when processing packs brian m. carlson
2026-02-22 22:39 ` Junio C Hamano
2026-02-22 23:07 ` brian m. carlson [this message]
2026-02-23 7:12 ` Jeff King
2026-02-23 8:46 ` Patrick Steinhardt
2026-02-23 9:25 ` Jeff King
2026-02-23 9:36 ` Patrick Steinhardt
2026-02-23 9:46 ` Jeff King
2026-02-23 15:49 ` Junio C Hamano
2026-02-23 8:43 ` Patrick Steinhardt
2026-02-23 9:27 ` Jeff King
2026-02-23 9:53 ` Patrick Steinhardt
2026-02-24 22:23 ` brian m. carlson
2026-02-24 22:32 ` Junio C Hamano
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=aZuMPcMYwFi4Sch5@fruit.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.