Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324868

Summary: git clone fails for org.eclipse.mdt
Product: [Technology] EGit Reporter: Erhard Weinell <weinell>
Component: CoreAssignee: Project Inbox <egit.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: caniszczyk, matthias.sohn, sop
Version: unspecified   
Target Milestone: 0.10.0-M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Erhard Weinell CLA 2010-09-09 12:25:18 EDT
What steps will reproduce the problem?
1. Clone a Git repository from git://dev.eclipse.org/org.eclipse.mdt/org.eclipse.mdt.git
2. Select the 'master' branch only
3. Click finish


-- Error Details --
Date: Thu Sep 09 18:17:43 CEST 2010
Message: Cloning Git Repository failed
Severity: Error
Product: Eclipse SDK 3.6.0.v201006080911 (org.eclipse.sdk.ide)
Plugin: org.eclipse.egit.ui
Session Data:
eclipse.buildId=I20100608-0911
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Command-line arguments:  -os win32 -ws win32 -arch x86_64

Features from installation details:
org.eclipse.egit (0.9.0.201009081513) "Git Team Provider (Incubation)" [Starting]
org.eclipse.egit.core (0.9.0.201009081513) "Git Team Provider Core (Incubation)" [Active]
org.eclipse.egit.doc (0.9.0.201009081513) "Git Team Provider Documentation (Incubation)" [Resolved]
org.eclipse.egit.ui (0.9.0.201009081513) "Git Team Provider UI (Incubation)" [Active]
org.eclipse.jgit (0.9.0.201009070311) "JGit Core (Incubation)" [Active]

Exception Stack Trace:
org.eclipse.jgit.errors.TransportException: Short skip of block.
	at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:286)
	at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:224)
	at org.eclipse.jgit.transport.FetchProcess.fetchObjects(FetchProcess.java:210)
	at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:171)
	at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:111)
	at org.eclipse.jgit.transport.Transport.fetch(Transport.java:880)
	at org.eclipse.egit.core.op.CloneOperation.doFetch(CloneOperation.java:201)
	at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:119)
	at org.eclipse.egit.ui.internal.clone.GitCloneWizard$4.run(GitCloneWizard.java:199)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.io.EOFException: Short skip of block.
	at org.eclipse.jgit.util.IO.skipFully(IO.java:205)
	at org.eclipse.jgit.storage.pack.DeltaStream.seekBase(DeltaStream.java:339)
	at org.eclipse.jgit.storage.pack.DeltaStream.read(DeltaStream.java:213)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
	at org.eclipse.jgit.lib.ObjectStream$Filter.read(ObjectStream.java:209)
	at org.eclipse.jgit.util.IO.readFully(IO.java:175)
	at org.eclipse.jgit.lib.ObjectLoader.getCachedBytes(ObjectLoader.java:211)
	at org.eclipse.jgit.transport.IndexPack.verifySafeObject(IndexPack.java:873)
	at org.eclipse.jgit.transport.IndexPack.resolveDeltas(IndexPack.java:544)
	at org.eclipse.jgit.transport.IndexPack.resolveChildDeltaChain(IndexPack.java:588)
	at org.eclipse.jgit.transport.IndexPack.resolveChildDeltas(IndexPack.java:581)
	at org.eclipse.jgit.transport.IndexPack.fixThinPack(IndexPack.java:627)
	at org.eclipse.jgit.transport.IndexPack.index(IndexPack.java:426)
	at org.eclipse.jgit.transport.BasePackFetchConnection.receivePack(BasePackFetchConnection.java:647)
	at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:279)
	... 9 more
Comment 1 Matthias Sohn CLA 2010-09-13 07:23:00 EDT
I tried to reproduce this problem with the current stable-0.9 jgit (0e8ef7784) and egit (06d14b39) version and hit another exception :

org.eclipse.jgit.errors.TransportException
at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:289)

at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:224)

at org.eclipse.jgit.transport.FetchProcess.fetchObjects(FetchProcess.java:210)

at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:171)

at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:111)

at org.eclipse.jgit.transport.Transport.fetch(Transport.java:880)

at org.eclipse.egit.core.op.CloneOperation.doFetch(CloneOperation.java:201)

at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:119)

at org.eclipse.egit.ui.internal.clone.GitCloneWizard.executeCloneOperation(GitCloneWizard.java:249)

at org.eclipse.egit.ui.internal.clone.GitCloneWizard.access$3(GitCloneWizard.java:242)

at org.eclipse.egit.ui.internal.clone.GitCloneWizard$4.run(GitCloneWizard.java:223)

at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Caused by: java.lang.UnsupportedOperationException

at org.eclipse.jgit.storage.file.CachedObjectDirectory.openObject2(CachedObjectDirectory.java:198)

at org.eclipse.jgit.storage.file.LargePackedDeltaObject.openStream(LargePackedDeltaObject.java:176)

at org.eclipse.jgit.lib.ObjectLoader.getCachedBytes(ObjectLoader.java:195)

at org.eclipse.jgit.transport.IndexPack.fixThinPack(IndexPack.java:616)

at org.eclipse.jgit.transport.IndexPack.index(IndexPack.java:426)

at org.eclipse.jgit.transport.BasePackFetchConnection.receivePack(BasePackFetchConnection.java:647)

at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:279)

... 11 more
Comment 2 Shawn Pearce CLA 2010-09-15 11:48:14 EDT
(In reply to comment #1)
> I tried to reproduce this problem with the current stable-0.9 jgit (0e8ef7784)
> and egit (06d14b39) version and hit another exception :
> 

I think http://egit.eclipse.org/r/1602 fixes this.
Comment 3 Shawn Pearce CLA 2010-09-15 12:32:09 EDT
Fixed by http://egit.eclipse.org/r/1602
Comment 4 Chris Aniszczyk CLA 2010-09-16 09:50:38 EDT
Reopening for more investigation...
Comment 5 Chris Aniszczyk CLA 2010-09-16 17:53:05 EDT
At the moment, the workaround is to select all branches or clone from the git CLI and then import.
Comment 6 Matthias Sohn CLA 2010-09-16 18:25:26 EDT
I tried with jgit/egit 0.9.3 in the debugger, it's failing on object 255bcb3f1b0a94afee327fdfb80b39b5438f4e28
in pack pack-14e306e6c06fbd28c12ab11eecc3841196046851.pack, it fails when cloning
only the master branch. When cloning all branches there is no error.

here the stack trace for cloning master only

org.eclipse.jgit.errors.TransportException
at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:289)
at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:224)
at org.eclipse.jgit.transport.FetchProcess.fetchObjects(FetchProcess.java:210)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:171)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:111)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:880)
at org.eclipse.egit.core.op.CloneOperation.doFetch(CloneOperation.java:201)
at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:119)
at org.eclipse.egit.ui.internal.clone.GitCloneWizard.executeCloneOperation(GitCloneWizard.java:249)
at org.eclipse.egit.ui.internal.clone.GitCloneWizard.access$3(GitCloneWizard.java:242)
at org.eclipse.egit.ui.internal.clone.GitCloneWizard$4.run(GitCloneWizard.java:223)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.UnsupportedOperationException
at org.eclipse.jgit.storage.file.CachedObjectDirectory.openObject2(CachedObjectDirectory.java:198)
at org.eclipse.jgit.storage.file.LargePackedDeltaObject.openStream(LargePackedDeltaObject.java:176)
at org.eclipse.jgit.lib.ObjectLoader.getCachedBytes(ObjectLoader.java:195)
at org.eclipse.jgit.transport.IndexPack.fixThinPack(IndexPack.java:616)
at org.eclipse.jgit.transport.IndexPack.index(IndexPack.java:426)
at org.eclipse.jgit.transport.BasePackFetchConnection.receivePack(BasePackFetchConnection.java:647)
at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:279)
... 11 more
Comment 7 Shawn Pearce CLA 2010-09-17 12:18:35 EDT
(In reply to comment #4)
> Reopening for more investigation...

http://egit.eclipse.org/r/1619 fixes the fixThinPack()
stack trace in comment #2 that I completely failed to
consider before.  :-)
Comment 8 Shawn Pearce CLA 2010-09-17 12:19:22 EDT
Fixed by commit 2ee6d95e5b24af2e462044053346df5bf1c440e9