Error when cloning gc'ed repository

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Error when cloning gc'ed repository

From: Andre Loker <hidden>
Date: 2016-06-15 22:48:04

Hi,

First of all, my setup:

Server:
Win 2008
cygwin git 1.6.6, built from source
gitosis

Client:
Win 7
cygwin git 1.6.6, built from source

The server is hosting several repositories, they all work fine, except 
for one (at least I've experienced the following error with only one of 
the repos). For this repository, cloning fails if the repository has 
been repacked (or gc'ed) on the client side:

$ git clone git@theserver:the/repository.git
Initialized empty Git repository in /e/Temp/dr/.git/
remote: Counting objects: 1396, done.
remote: Compressing objects: 100% (654/654), done.
fatal: The remote end hung up unexpectedly
fatal: early EOFs:  47% (657/1396)
fatal: index-pack failed

However, if I unpack the objects completely and delete the pack file, I 
can clone the repository without any problem:

$ git clone git@theserver:the/repository.git
Initialized empty Git repository in /e/Temp/dr/.git/
remote: Counting objects: 1396, done.
remote: Compressing objects: 100% (1293/1293), done.
remote: Total 1396 (delta 639), reused 0 (delta 0)
Receiving objects: 100% (1396/1396), 4.99 MiB | 1.70 MiB/s, done.
Resolving deltas: 100% (639/639), done.

fsck shows no error

Does this problem sound familiar to anyone? May it's a network issue, 
but other repositories (also larger ones) work flawlessly even when in a 
packed state. Any help is appreciated!

Kind regards,
Andre Loker

P.S.:

Here's a trace:
$ GIT_TRACE=1 git clone git@theserver:the/repository.git
trace: built-in: git 'clone' 'git@theserver:the/repository.git'
Initialized empty Git repository in /e/Temp/dr/.git/
trace: run_command: 'ssh' 'git@theserver' 'git-upload-pack 
'\''the/repository.git'\'''
trace: run_command: 'index-pack' '--stdin' '-v' '--fix-thin' 
'--keep=fetch-pack 5208 on Phobos'
trace: exec: 'git' 'index-pack' '--stdin' '-v' '--fix-thin' 
'--keep=fetch-pack 5208 on Phobos'
remote: Counting objects: 1396, done.
remote: Compressing objects:  19% (125/654)   race: exec: 
'git-index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 5208 on 
Phobos'
remote: Compressing objects:  21% (138/654)
remote: Compressing objects: 100% (654/654), done.
fatal: The remote end hung up unexpectedly
fatal: early EOFs:  88% (1229/1396), 4.76 MiB | 9.23 MiB/s
fatal: index-pack failed

And here's a trace of a successful run:

$ GIT_TRACE=1 git clone git@theserver:the/repository.git
trace: built-in: git 'clone' 'git@theserver:the/repository.git'
Initialized empty Git repository in /e/Temp/dr/.git/
trace: run_command: 'ssh' 'git@theserver' 'git-upload-pack 
'\''the/repository.git'\'''
trace: run_command: 'index-pack' '--stdin' '-v' '--fix-thin' 
'--keep=fetch-pack 4624 on Phobos'
trace: exec: 'git' 'index-pack' '--stdin' '-v' '--fix-thin' 
'--keep=fetch-pack 4624 on Phobos'
trace: exec: 'git-index-pack' '--stdin' '-v' '--fix-thin' 
'--keep=fetch-pack 4624 on Phobos'
trace: run_command: 'git-index-pack' '--stdin' '-v' '--fix-thin' 
'--keep=fetch-pack 4624 on Phobos'
remote: Counting objects: 1396, done.
remote: Compressing objects: 100% (1293/1293), done.
remote: Total 1396 (delta 639), reused 0 (delta 0)
Receiving objects: 100% (1396/1396), 4.99 MiB | 1.68 MiB/s, done.
Resolving deltas: 100% (639/639), done.

Re: Error when cloning gc'ed repository

From: Andre Loker <hidden>
Date: 2016-06-15 22:48:04

Andre Loker wrote:
Hi,

$ git clone git@theserver:the/repository.git
Initialized empty Git repository in /e/Temp/dr/.git/
remote: Counting objects: 1396, done.
remote: Compressing objects: 100% (654/654), done.
fatal: The remote end hung up unexpectedly
fatal: early EOFs:  47% (657/1396)
fatal: index-pack failed
To answer the question myself: it seems that it is a problem with 
openssh under cygwin 1.7.1. I found a similar problem here:

http://www.mail-archive.com/cygwin@cygwin.com/msg103749.html

The proposed workaround is to use plink instead of openssh. I tried it 
and so far it seems to work. It's not as nice as openssh, but at least 
it's a workaround until the issue is solved.

Kind Regards,
Andre

Re: Error when cloning gc'ed repository

From: Gabriel Burca <hidden>
Date: 2016-06-15 22:48:51

Andre Loker <loker <at> gmx.de> writes:
Andre Loker wrote:
quoted
Hi,

$ git clone git <at> theserver:the/repository.git
Initialized empty Git repository in /e/Temp/dr/.git/
remote: Counting objects: 1396, done.
remote: Compressing objects: 100% (654/654), done.
fatal: The remote end hung up unexpectedly
fatal: early EOFs:  47% (657/1396)
fatal: index-pack failed
To answer the question myself: it seems that it is a problem with 
openssh under cygwin 1.7.1. I found a similar problem here:

http://www.mail-archive.com/cygwin <at> cygwin.com/msg103749.html

The proposed workaround is to use plink instead of openssh. I tried it 
and so far it seems to work. It's not as nice as openssh, but at least 
it's a workaround until the issue is solved.

I downgraded just the openssh package in cygwin from 5.5p1-1 to 5.4p1-1 and the
problem went away. This was easier than switching to putty/plink.

Before the downgrade my rate of failure was 100%. I was doing a "git remote
update origin", not a clone, but the symptoms were the same as Andre's.

-- 
Gabriel Burca
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help