My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2295: git clone hangs with repo containing big items
3 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by jean.kan...@gmail.com, Dec 2, 2013
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.    *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS!  *****
************************************************************

Affected Version:

2.7.0


I have a git repo with some zip files commited in (one of the zip file is around 50Mo).
When I clone the repo via gerrit:

git clone http://192.168.0.18:8080/MyRepo

The git clone hangs:

Cloning into 'MyRepo'...
remote: Counting objects: 3105, done
remote: Finding sources: 100% (3105/3105)
error: RPC failed; result=56, HTTP code = 200 | 4.65 MiB/s   
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

When I clone the git repo via ssh, it works fine.
Dec 19, 2013
#1 jean.kan...@gmail.com
The problem is a little bit different with 2.8. I am still not able to clone my repo via http. The clone via ssh (but not via gerrit) wors fine.
Here is the new error message:

Cloning into 'CrystalOptimizationEngine'...
error: RPC failed; result=56, HTTP code = 200
fatal: The remote end hung up unexpectedly
error: inflate: data stream error (invalid block type)
fatal: pack has bad object at offset 301148: inflate returned -3
fatal: index-pack failed


Aug 18, 2014
#2 yujin...@wandoujia.com
gerrit 2.6
git clone via ssh. and 
when run git fetch, following info got:

remote: Counting objects: 13677, done
remote: Finding sources: 100% (10285/10285)
Write failed: Broken pipe8025/10285), 2.07 MiB| 420.00 MiB/s   
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

Jan 4, 2016
#3 hiramvan...@gmail.com
Similar here
I was cloning the linux kernel source (not vanilla, but I hardly think it will matter)
This is very reproduceable. Restarting Gerrit seems to help..

gerrit 2.11
git clone via http by yocto:
Cloning into bare repository '/var/lib/jenkins/workspace/project/downloads//git2/linux'...
error: RPC failed; result=22, HTTP code = 502
fatal: The remote end hung up unexpectedly

Gerrit log:

[2016-01-04 16:34:48,099] WARN  /gerrit : Internal error during upload-pack
org.eclipse.jetty.io.EofException
        at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:192)
        at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:408)
        at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:302)
        at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:129)
        at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:684)
        at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:246)
        at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:208)
        at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:480)
        at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:768)
        at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:801)
        at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:142)
        at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:135)
        at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:373)
        at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122)
        at org.eclipse.jgit.util.TemporaryBuffer.write(TemporaryBuffer.java:159)
        at org.eclipse.jgit.transport.SideBandOutputStream.writeBuffer(SideBandOutputStream.java:171)
        at org.eclipse.jgit.transport.SideBandOutputStream.write(SideBandOutputStream.java:151)
        at org.eclipse.jgit.internal.storage.pack.PackOutputStream.write(PackOutputStream.java:126)
        at org.eclipse.jgit.internal.storage.file.PackFile.copyAsIs2(PackFile.java:521)
        at org.eclipse.jgit.internal.storage.file.PackFile.copyAsIs(PackFile.java:359)
        at org.eclipse.jgit.internal.storage.file.WindowCursor.copyObjectAsIs(WindowCursor.java:190)
        at org.eclipse.jgit.internal.storage.pack.PackWriter.writeObjectImpl(PackWriter.java:1528)
        at org.eclipse.jgit.internal.storage.pack.PackWriter.writeObject(PackWriter.java:1505)
        at org.eclipse.jgit.internal.storage.pack.PackOutputStream.writeObject(PackOutputStream.java:164)
        at org.eclipse.jgit.internal.storage.file.WindowCursor.writeObjects(WindowCursor.java:196)
        at org.eclipse.jgit.internal.storage.pack.PackWriter.writeObjects(PackWriter.java:1493)
        at org.eclipse.jgit.internal.storage.pack.PackWriter.writeObjects(PackWriter.java:1478)
        at org.eclipse.jgit.internal.storage.pack.PackWriter.writePack(PackWriter.java:1036)
        at org.eclipse.jgit.transport.UploadPack.sendPack(UploadPack.java:1417)
        at org.eclipse.jgit.transport.UploadPack.sendPack(UploadPack.java:1271)
        at org.eclipse.jgit.transport.UploadPack.service(UploadPack.java:717)
        at org.eclipse.jgit.transport.UploadPack.upload(UploadPack.java:628)
        at org.eclipse.jgit.http.server.UploadPackServlet.doPost(UploadPackServlet.java:187)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
        at org.eclipse.jgit.http.server.glue.UrlPipeline$Chain.doFilter(UrlPipeline.java:237)
        at com.google.gerrit.httpd.GitOverHttpServlet$UploadFilter.doFilter(GitOverHttpServlet.java:271)

...
Caused by: java.io.IOException: Broken pipe
        at sun.nio.ch.FileDispatcherImpl.writev0(Native Method)
        at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51)
        at sun.nio.ch.IOUtil.write(IOUtil.java:148)
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:529)
        at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:172)
        ... 88 more


Jan 4 (6 days ago)
#4 yujin...@wandoujia.com
good practice in my works.
there are two ways, first to reduce the repo size, gc or repack( I mainly use gc)
second, for big one, use shallow clone.
e.g. 
1) git clone --depth 1 <repo_URI>
2) git fetch --unshallow
3) then do regular pull
    git pull --all
Sign in to add a comment

Powered by Google Project Hosting