# [bug]fatal: fetch-pack: invalid index-pack output

4 messages from 2022-08-13 to 2023-09-07. Participants: mingli zhang, Bagas Sanjaya, Junio C Hamano.
Thread: https://gitlist.dev/t/58302

## mingli zhang, 2022-08-13 21:09

Subject: [bug]fatal: fetch-pack: invalid index-pack output
Message-ID: <50B3E989-0405-4B05-9940-D3943C62260A@gmail.com>
URL: https://gitlist.dev/e/50B3E989-0405-4B05-9940-D3943C62260A%40gmail.com

```
HI,

At some point, I exec git pull/fetch/clone will got a fatal message:

ˋˋˋ

fatal: fetch-pack: invalid index-pack output

ˋˋˋ

I use git 2.36.1 on MacOS Monterey 12.3.1

ˋˋˋ
git --version
04:51:36.776640 git.c:459 trace: built-in: git version
git version 2.36.1

ˋˋˋ

Example:

ˋˋˋ

zml@localhashdata postgres % git pull -r
04:53:33.553655 git.c:459 trace: built-in: git pull -r
04:53:33.640927 run-command.c:654 trace: run_command: git merge-base --fork-point refs/remotes/origin/REL_14_STABLE REL_14_STABLE
04:53:33.651808 run-command.c:654 trace: run_command: git fetch --update-head-ok
04:53:33.658822 git.c:459 trace: built-in: git fetch --update-head-ok
04:53:33.683642 run-command.c:654 trace: run_command: unset GIT_PREFIX; GIT_PROTOCOL=version=2 ssh -o SendEnv=GIT_PROTOCOL git@github.com 'git-upload-pack '\''postgres/postgres.git'\'''
remote: Enumerating objects: 16843, done.
remote: Counting objects: 100% (16231/16231), done.
remote: Compressing objects: 100% (4164/4164), done.
04:53:40.822310 run-command.c:654 trace: run_command: git index-pack --stdin -v --fix-thin '--keep=fetch-pack 70208 on localhashdata' --pack_header=2,10035
04:53:40.828465 git.c:459 trace: built-in: git index-pack --stdin -v --fix-thin '--keep=fetch-pack 70208 on localhashdata' --pack_header=2,10035
remote: Total 10035 (delta 8554), reused 7150 (delta 5805), pack-reused 0
Receiving objects: 100% (10035/10035), 6.93 MiB | 2.42 MiB/s, done.
fatal: fetch-pack: invalid index-pack output

ˋˋˋ

I try to config memory or use git pull -r --depth 1, but didn’t help.

My git config is

ˋˋˋ
[core]
packedGitLimit = 512m
packedGitWindowSize = 512m
compression = 0

[pack]
deltaCacheSize = 2047m
packSizeLimit = 2047m
windowMemory = 2047m
ˋˋˋ

And the code dir permission is

ˋˋˋ
drwxrwxrwx

ˋˋˋ

Any suggestions ?

Regards,
Zhang Mingli
```

## Bagas Sanjaya, 2023-09-01 11:15

Subject: Re: [bug]fatal: fetch-pack: invalid index-pack output
Message-ID: <ZPHHuiFn3v06hhVe@debian.me>
URL: https://gitlist.dev/e/ZPHHuiFn3v06hhVe%40debian.me
In-Reply-To: <50B3E989-0405-4B05-9940-D3943C62260A@gmail.com>

```
On Sun, Aug 14, 2022 at 05:09:13AM +0800, mingli zhang wrote:
> HI,
> 
> At some point, I exec git pull/fetch/clone will got a fatal message:
> 
> ˋˋˋ
> 
> fatal: fetch-pack: invalid index-pack output
> 
> ˋˋˋ
> 
> I use git 2.36.1 on MacOS Monterey 12.3.1
> 
> ˋˋˋ
> git --version
> 04:51:36.776640 git.c:459 trace: built-in: git version
> git version 2.36.1
> 
> ˋˋˋ
> 
> Example:
> 
> ˋˋˋ
> 
> zml@localhashdata postgres % git pull -r
> 04:53:33.553655 git.c:459 trace: built-in: git pull -r
> 04:53:33.640927 run-command.c:654 trace: run_command: git merge-base --fork-point refs/remotes/origin/REL_14_STABLE REL_14_STABLE
> 04:53:33.651808 run-command.c:654 trace: run_command: git fetch --update-head-ok
> 04:53:33.658822 git.c:459 trace: built-in: git fetch --update-head-ok
> 04:53:33.683642 run-command.c:654 trace: run_command: unset GIT_PREFIX; GIT_PROTOCOL=version=2 ssh -o SendEnv=GIT_PROTOCOL git@github.com 'git-upload-pack '\''postgres/postgres.git'\'''
> remote: Enumerating objects: 16843, done.
> remote: Counting objects: 100% (16231/16231), done.
> remote: Compressing objects: 100% (4164/4164), done.
> 04:53:40.822310 run-command.c:654 trace: run_command: git index-pack --stdin -v --fix-thin '--keep=fetch-pack 70208 on localhashdata' --pack_header=2,10035
> 04:53:40.828465 git.c:459 trace: built-in: git index-pack --stdin -v --fix-thin '--keep=fetch-pack 70208 on localhashdata' --pack_header=2,10035
> remote: Total 10035 (delta 8554), reused 7150 (delta 5805), pack-reused 0
> Receiving objects: 100% (10035/10035), 6.93 MiB | 2.42 MiB/s, done.
> fatal: fetch-pack: invalid index-pack output
> 
> ˋˋˋ
> 
> I try to config memory or use git pull -r --depth 1, but didn’t help.
> 
> My git config is
> 
> ˋˋˋ
> [core]
> packedGitLimit = 512m
> packedGitWindowSize = 512m
> compression = 0
> 
> [pack]
> deltaCacheSize = 2047m
> packSizeLimit = 2047m
> windowMemory = 2047m
> ˋˋˋ
> 
> And the code dir permission is
> 
> ˋˋˋ
> drwxrwxrwx
> 
> ˋˋˋ
> 
> Any suggestions ?

Related discussion is in [1] with the fix for OpenSSL users is in [2].
Please test.

[1]: https://lore.kernel.org/git/ZPCL11k38PXTkFga@debian.me/
[2]: https://lore.kernel.org/git/20230901020928.M610756@dcvr/

-- 
An old man doll... just what I always wanted! - Clara

```

## Junio C Hamano, 2023-09-01 16:53

Subject: Re: [bug]fatal: fetch-pack: invalid index-pack output
Message-ID: <xmqqwmx9q1he.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqwmx9q1he.fsf%40gitster.g
In-Reply-To: <ZPHHuiFn3v06hhVe@debian.me>

```
Bagas Sanjaya <bagasdotme@gmail.com> writes:

> On Sun, Aug 14, 2022 at 05:09:13AM +0800, mingli zhang wrote:
>> ...
>> I use git 2.36.1 on MacOS Monterey 12.3.1
>> ...
>
> Related discussion is in [1] with the fix for OpenSSL users is in [2].
> Please test.
>
> [1]: https://lore.kernel.org/git/ZPCL11k38PXTkFga@debian.me/
> [2]: https://lore.kernel.org/git/20230901020928.M610756@dcvr/

I somehow think they are not related.  The EVP thing appeared only
in Git 2.42 and the report says 2.36.1, which was released in May
2022 and predates it by more than a year, no?

```

## Bagas Sanjaya, 2023-09-07 09:06

Subject: Re: [bug]fatal: fetch-pack: invalid index-pack output
Message-ID: <919e4a91-18c6-f3f2-b7de-b407f791cc14@gmail.com>
URL: https://gitlist.dev/e/919e4a91-18c6-f3f2-b7de-b407f791cc14%40gmail.com
In-Reply-To: <xmqqwmx9q1he.fsf@gitster.g>

```
On 01/09/2023 23:53, Junio C Hamano wrote:
> Bagas Sanjaya <bagasdotme@gmail.com> writes:
> 
>> On Sun, Aug 14, 2022 at 05:09:13AM +0800, mingli zhang wrote:
>>> ...
>>> I use git 2.36.1 on MacOS Monterey 12.3.1
>>> ...
>>
>> Related discussion is in [1] with the fix for OpenSSL users is in [2].
>> Please test.
>>
>> [1]: https://lore.kernel.org/git/ZPCL11k38PXTkFga@debian.me/
>> [2]: https://lore.kernel.org/git/20230901020928.M610756@dcvr/
> 
> I somehow think they are not related.  The EVP thing appeared only
> in Git 2.42 and the report says 2.36.1, which was released in May
> 2022 and predates it by more than a year, no?

Ah! I missed the point.

mingli, can you test v2.42.0?

-- 
An old man doll... just what I always wanted! - Clara


```
