Git clone fails with "pack has bad object at offset blah inflate returned 1"

12,850 views
Skip to first unread message

Barney Garrett

unread,
Jul 27, 2017, 6:16:27 AM7/27/17
to git-for-windows
I've got a repo that I can clone successfully on Linux so I know the repo isn't corrupt but it fails on Windows 7 with an error :

fatal: pack has bad object at offset 1874462290: inflate returned 1
fatal: index-pack failed

I've been looking for things in the repo that might cause this such as path length, illegal characters, duplicate files due to case, or large files.  Is there anything else I should be looking at or is there a setting I can put in my git config that might work round the issue ?

philip...@iee.org

unread,
Jul 27, 2017, 8:55:08 AM7/27/17
to git-for-windows
Some thoughts are:

Is this with a 32 bit version of the OS, or a 64 bit version.
How much Ram doe you have?
Any other software running at the time (resource limits)
Any anti-virus scanners that may be 'interrupting' the processing?

Can you clone smaller repos?, and is your repo public?

Barney Garrett

unread,
Jul 27, 2017, 9:19:21 AM7/27/17
to git-for-windows
64bit os, 20GB RAM of which about 8GB is in use, Can clone smaller AND bigger repos Repo is not public I'm afraid.

Using git under cygwin works.
doing a git trace and setting debug on ssh (clone is using ssh protocol) I've seen a couple of things.  The error happens during the receiving objects stage, which if I understand means that the path length, file names and file size etc should have no bearing it is just doing an index-pack of the stream of git-upload-pack over ssh.

14:10:39.542564 run-command.c:369       trace: run_command: 'ssh' '-p' '29418' 'BLAH' 'git-upload-pack '\''/BLAH'\'''
14:10:44.671564 run-command.c:369       trace: run_command: 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 16192 on HOST' '--check-self-contained-and-connected'
14:10:44.747564 git.c:369               trace: built-in: git 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 16192 on HOST' '--check-self-contained-and-connected'

The debug on ssh and a packet tract shows that actually the stream coming from the remote repo actually continues after index-pack errors.
Looking into the zlib source, error code 1 is "Stream end".  This would kind of suggest that something in the stream coming from the remote repo makes index-pack think the stream has ended.

Does that sound reasonable ?
In which case why does this happen with git-for-windows but not cygwin ? :)

Philip Oakley

unread,
Jul 27, 2017, 5:25:50 PM7/27/17
to Barney Garrett, git-for-windows
Sounds like it will be a "windows" issue of some sort.
 
The underlying basis for the emulation layer is different between the GfW and the Cygwin, with GfW using MSYS2, plus a few local fixes/emulations for calling the Windows OS directly from Git.
 
I don't have enough knowledge to debug further. Hopefully there is a way to get at the index-pack - have a look in the .git sub-dir to see if you can find it... maybe.. .git\objects\pack
 
Philip
--
You received this message because you are subscribed to the Google Groups "git-for-windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to git-for-windo...@googlegroups.com.
To post to this group, send email to git-for...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/git-for-windows/0ad060d1-2ea7-4149-a191-9b6ad5ac968c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages