Skip to contentSkip to conversation

git-fetch fails with error code 128

DISCUSSION Andy Parkins 5 participants 12 messages Aug 11, 2016

lore
Share & tools
lore
#4 lore raw
In reply to Junio C Hamano
Quoted 3 lines · Junio C Hamano

Thanks --- very much appreciated. When it comes to inter-repository object transfer, we take compatibility very seriously.

Okay. Before I started bisecting I thought I'd do some other experiments. Having tested fetch from remote and a fetch from local and finding the same results, I've done all the tests locally.

So; here goes. I've got these directories:

linux-partial/ (this is every patch from v1.0.0 to v2.1.63)
linux-full/ (this is every patch from v1.0.0 to v2.5.75)

linux-partial/ is the one I reported the original error on, later I confirmed that the same error happened with a local fetch from linux-full. I cloned both of these.

linux-partial-clone/ (made with git clone linux-partial linux-partial-clone)
linux-full-clone/ (made with git clone linux-full linux-full-clone)

Tests:
- A fetch from linux-full to linux-partial, this one failed with error 128
- A fetch from linux-full-clone to linux-partial, this one failed with error 128
- A fetch from linux-full to linux-partial-clone, this one succeeded
- A fetch from linux-full-clone to linux-partial-clone, this one succeeded (unsurprisingly)

Next I ran git-prune in linux-partial. The fetch then succeeded. Bizarre.

So, the strange result is that it is a difference in the destination directory that is triggering the error, and whatever that fault is is fixed by git-cloning that destination repository, or git-pruning the destination.

Unfortunately I've now lost my test case, because the prune fixed it. Bah. Oh well, this fault can be marked "on hold until I get it to fail again".

Andy

Signature · 1 line
Dr Andrew Parkins, M Eng (Hons), AMIEE
#8 lore raw
In reply to Andy Parkins
Quoted 11 lines · Andy Parkins
$ git fetch
remote: Generating pack...
remote: Done counting 189146 objects.
remote: Result has 186566 objects.
remote: Deltifying 186566 objects.
remote:  100% (186566/186566) done
Unpacking 186566 objects
fatal: failed to apply delta
fatal: unpack-objects died with error code 128
Fetch failure: /home/andyp/projects/temp/.git
Quoted 2 lines

What does that mean? I ran fsck --full on the source repository, but it's made no difference.

Bad voodoo. What does 'git fetch -k' do? It uses slightly different code for handling the deltas...

#6 lore raw
In reply to Nicolas Pitre
Quoted 8 lines · Nicolas Pitre

I really doubt it is a compatibility problem. The provided error message may only result from the fact that patch_delta() has returned NULL.

And since patch-delta is really simple, it doesn't have many reasons for returning NULL: either the object store on either the remote or local side is corrupted in which case a git-fsck-objects --full should catch that, or the system ran out of memory.

Hmmmm. True and sad. Sad because I do not offhand think of places to trim the memory usage.

#9 lore raw
In reply to Andy Parkins
Quoted 25 lines · Andy Parkins

Hello,

This is with my big "every linux patch" repository that I talked about in another thread. To bring you up to speed:

1. Made repository
2. Made a zip of the .git directory
3. Copied the zip elsewhere
4. Extracted it into a temporary directory
5. Went to an out-of-date version of this repository
6. Used git-fetch to update it.

This gave me the following output:

$ git fetch
remote: Generating pack...
remote: Done counting 189146 objects.
remote: Result has 186566 objects.
remote: Deltifying 186566 objects.
remote:  100% (186566/186566) done
Unpacking 186566 objects
fatal: failed to apply delta
fatal: unpack-objects died with error code 128
Fetch failure: /home/andyp/projects/temp/.git
Quoted 2 lines

What does that mean? I ran fsck --full on the source repository, but it's made no difference.

Could you please instrument patch-delta.c to determine which of the "return NULL" is executed?

#3 lore raw
In reply to Andy Parkins
Quoted 6 lines · Andy Parkins

I hadn't realised it was quite a serious as these responses are making it sound. I'll gather more precise data upon my return home.
...
Clearly it is version-specific. I'll do a bit of bisection later and see if I can nail the problem down.

Thanks --- very much appreciated. When it comes to inter-repository object transfer, we take compatibility very seriously.

#7 lore raw
In reply to Nicolas Pitre
Quoted 4 lines · Nicolas Pitre

And since patch-delta is really simple, it doesn't have many reasons for returning NULL: either the object store on either the remote or local side is corrupted in which case a git-fsck-objects --full should catch that, or the system ran out of memory.

It's not conclusive, but the system its failing on has more memory than the system it is working on.

Andy

Signature · 1 line
Dr Andrew Parkins, M Eng (Hons), AMIEE
#11 lore raw
In reply to Horst H. von Brand
Quoted 8 lines · Horst H. von Brand
Quoted 4 lines

Unpacking 186566 objects
fatal: failed to apply delta
fatal: unpack-objects died with error code 128
Fetch failure: /home/andyp/projects/temp/.git

Happened to me yesterday or so pulling the vanilla kernel (big push shortly before 2.6.20-rc1). Trying again somewhat later went through flawlessly. Might have been git running out of memory.

This is a very possible cause, especially if both processes (pack-objects and unpack-objects) are running at the same time on the same machine.

#2 lore raw
In reply to Junio C Hamano
Quoted 4 lines · Junio C Hamano

Andy, which version of git do you run (I presume they are the same version, as you are doing the local fetching), and which version of git was the "slightly out of date" repository prepared with?

One of them is switched off and in another place at the moment, so this is from memory:

The initial repository was made with origin/master from a few days ago, that's the one I've been calling "out-of-date". I cloned that to another computer and continued adding patches using "1.4.4.1.g3ece-dirty" (the dirt is just my colour branch patch on top of ba988a83). The fetch is being done back on the original system which has the newer git but older repository.

I hadn't realised it was quite a serious as these responses are making it sound. I'll gather more precise data upon my return home.

On the up-to-date computer I've just made a fresh repository, set .git/config to point locally at the full repository and ran git-fetch. Interestingly, that has worked perfectly.

Clearly it is version-specific. I'll do a bit of bisection later and see if I can nail the problem down.

Andy

Signature · 1 line
Dr Andy Parkins, M Eng (hons), MIEE
#0 lore raw

Hello,

This is with my big "every linux patch" repository that I talked about in another thread. To bring you up to speed:

1. Made repository
2. Made a zip of the .git directory
3. Copied the zip elsewhere
4. Extracted it into a temporary directory
5. Went to an out-of-date version of this repository
6. Used git-fetch to update it.

This gave me the following output:

$ git fetch
remote: Generating pack...
remote: Done counting 189146 objects.
remote: Result has 186566 objects.
remote: Deltifying 186566 objects.
remote:  100% (186566/186566) done
Unpacking 186566 objects
fatal: failed to apply delta
fatal: unpack-objects died with error code 128
Fetch failure: /home/andyp/projects/temp/.git

What does that mean? I ran fsck --full on the source repository, but it's made no difference.

Andy

Signature · 1 line
Dr Andrew Parkins, M Eng (Hons), AMIEE
#5 lore raw
In reply to Junio C Hamano
Quoted 9 lines · Junio C Hamano
Quoted 6 lines · Andy Parkins

I hadn't realised it was quite a serious as these responses are making it sound. I'll gather more precise data upon my return home.
...
Clearly it is version-specific. I'll do a bit of bisection later and see if I can nail the problem down.

Quoted 3 lines

Thanks --- very much appreciated. When it comes to inter-repository object transfer, we take compatibility very seriously.

I really doubt it is a compatibility problem. The provided error message may only result from the fact that patch_delta() has returned NULL.

And since patch-delta is really simple, it doesn't have many reasons for returning NULL: either the object store on either the remote or local side is corrupted in which case a git-fsck-objects --full should catch that, or the system ran out of memory.

#1 lore raw
In reply to Andy Parkins
Quoted 11 lines · Andy Parkins
$ git fetch
remote: Generating pack...
remote: Done counting 189146 objects.
remote: Result has 186566 objects.
remote: Deltifying 186566 objects.
remote:  100% (186566/186566) done
Unpacking 186566 objects
fatal: failed to apply delta
fatal: unpack-objects died with error code 128
Fetch failure: /home/andyp/projects/temp/.git
Quoted 2 lines

What does that mean? I ran fsck --full on the source repository, but it's made no difference.

Andy, which version of git do you run (I presume they are the same version, as you are doing the local fetching), and which version of git was the "slightly out of date" repository prepared with?

I think this is the second time I've seen a report of unpacker barfing on the mailing list. Nico, anything rings a bell?

#10 lore raw
In reply to Andy Parkins
Quoted 2 lines · Andy Parkins

This is with my big "every linux patch" repository that I talked about in another thread. To bring you up to speed:

[...]

Quoted 12 lines

This gave me the following output:

$ git fetch
remote: Generating pack...
remote: Done counting 189146 objects.
remote: Result has 186566 objects.
remote: Deltifying 186566 objects.
remote:  100% (186566/186566) done
Unpacking 186566 objects
fatal: failed to apply delta
fatal: unpack-objects died with error code 128
Fetch failure: /home/andyp/projects/temp/.git

Happened to me yesterday or so pulling the vanilla kernel (big push shortly before 2.6.20-rc1). Trying again somewhat later went through flawlessly. Might have been git running out of memory.

Signature · 4 lines
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                    Fono: +56 32 2654431
Universidad Tecnica Federico Santa Maria             +56 32 2654239
Casilla 110-V, Valparaiso, Chile               Fax:  +56 32 2797513