Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340305 - "git gc" + "git gc --aggresive" made my gitosis repository unusable with egit but not with msysgit
Summary: "git gc" + "git gc --aggresive" made my gitosis repository unusable with egit...
Status: CLOSED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Christian Halstrick CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-17 08:34 EDT by Thorbjørn Ravn Andersen CLA
Modified: 2013-03-20 08:06 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thorbjørn Ravn Andersen CLA 2011-03-17 08:34:11 EDT
Build Identifier: Version: Helios Service Release 2 Build id: 20110218-0911

I have used eGit from the Eclipse marketplace with Eclipse JEE 3.6.2 for a while and it has worked very nicely, allowing me to clone our git repository and commit back.  The repository is accessed through ssh to a gitosis installation under Ubuntu (fully updated).

The other day, the disk ran full, and I yesterday found out that the usual cure is "git gc" perhaps followed up with "git gc --aggressive".  I did both for the first time, and got about 1.5 Gb back.  I can still work with the repository using msysgit, but egit fails all the time.  When cloning I get to about 10% and then it fails with a 

"Packfile corruption detected:  Unknown zlib error"  (see attachment for stack trace)

A new workspace and a new Eclipse installation did not help.  Please see http://stackoverflow.com/questions/5327116/eclipse-egit-packfile-corruption-detected-unknown-zlib-error-how-to-circumve for additional details.  

This is a show stopper - please advise.

Thanks

/Thorbjørn


Reproducible: Always

Steps to Reproduce:
1.Ask Eclipse to clone our gitosis based repository.
2.Fail at 10%

Unfortunately the repository contains proprietary code, so I cannot make it publicly available, but I will be happy to run any test code and provide any additional information I possibly can.
Comment 1 Thorbjørn Ravn Andersen CLA 2011-03-17 08:34:43 EDT
org.eclipse.jgit.errors.TransportException: Packfile corruption detected: Unknown zlib error.
	at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:287)
	at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:225)
	at org.eclipse.jgit.transport.FetchProcess.fetchObjects(FetchProcess.java:214)
	at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:149)
	at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:111)
	at org.eclipse.jgit.transport.Transport.fetch(Transport.java:903)
	at org.eclipse.egit.core.op.CloneOperation.doFetch(CloneOperation.java:228)
	at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:135)
	at org.eclipse.egit.ui.internal.clone.GitCloneWizard.executeCloneOperation(GitCloneWizard.java:259)
	at org.eclipse.egit.ui.internal.clone.GitCloneWizard.access$3(GitCloneWizard.java:252)
	at org.eclipse.egit.ui.internal.clone.GitCloneWizard$4.run(GitCloneWizard.java:233)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.errors.CorruptObjectException: Packfile corruption detected: Unknown zlib error.
	at org.eclipse.jgit.transport.PackParser$InflaterStream.read(PackParser.java:1530)
	at org.eclipse.jgit.transport.PackParser$InflaterStream.skip(PackParser.java:1500)
	at org.eclipse.jgit.util.IO.skipFully(IO.java:203)
	at org.eclipse.jgit.transport.PackParser.inflateAndSkip(PackParser.java:1352)
	at org.eclipse.jgit.transport.PackParser.indexOneObject(PackParser.java:834)
	at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:448)
	at org.eclipse.jgit.storage.file.ObjectDirectoryPackParser.parse(ObjectDirectoryPackParser.java:178)
	at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:410)
	at org.eclipse.jgit.transport.BasePackFetchConnection.receivePack(BasePackFetchConnection.java:649)
	at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:280)
	... 11 more
Comment 2 Christian Halstrick CLA 2011-03-28 08:55:15 EDT
I think 339869 is quite similar. It's hard to find out where the problem is whithout beeing able to reproduce it. I tried to run "git gc --aggressive" on linux kernel and afterwards clone it with jgit - worked for me. I guess we have a bug in the transport which comes up only for certain repos. Have you tried to clone with an older version of jgit? See 339869 and 330758 where we are facing a similar problem but where jgit 0.10.1 was able to clone.
Comment 3 Thorbjørn Ravn Andersen CLA 2011-04-14 08:47:55 EDT
(In reply to comment #2)
> I think 339869 is quite similar. It's hard to find out where the problem is
> whithout beeing able to reproduce it. I tried to run "git gc --aggressive" on
> linux kernel and afterwards clone it with jgit - worked for me. I guess we have
> a bug in the transport which comes up only for certain repos. Have you tried to
> clone with an older version of jgit? See 339869 and 330758 where we are facing
> a similar problem but where jgit 0.10.1 was able to clone.

------
I tried with the 0.10.1 shell wrapped version from the homepage, which worked both under Linux and in an msysgit shell:

tra@Sandbox:~/x$ sh org.eclipse.jgit.pgm-0.10.1.sh clone gitosis@sandbox:git00
Initialized empty Git repository in /home/tra/x/git00/.git
Passphrase for /home/tra/.ssh/id_rsa:
Passphrase for /home/tra/.ssh/id_rsa:
remote: Counting objects: 77996
remote: Compressing objects: 100% (20329/20329)
Receiving objects:      100% (77996/77996)
Resolving deltas:       100% (43783/43783)
remote: Total 77996 (delta 43783), reused 77689 (delta 43617)
From {0}
(.... lots of branches...)

------
I also tried with a snapshot from January:

C:\tmp\x>java -jar \git\master_msysgit\hudson\git\jgit\jgit-cli-0.11-GITSNAPSHOT-2011-01-19-SEE-README.jar clone gitosis@sandbox:git00
Initialized empty Git repository in C:\tmp\x\git00\.git
Passphrase for C:\Users\TRA\.ssh\id_rsa:
remote: Counting objects: 77996
remote: Compressing objects: 100% (20329/20329)
Receiving objects:      100% (77996/77996)
fatal: Could not delete file C:\tmp\x\git00\.git\objects\incoming_6726566324996434241.idx
fatal: Could not delete file C:\tmp\x\git00\.git\objects\incoming_6726566324996434241.idx

-----

Please advise - I'd like to get a functional egit with Eclipse 3.6.2 at this stage.
Comment 4 Thorbjørn Ravn Andersen CLA 2011-04-14 08:55:35 EDT
(In reply to comment #3)

> Receiving objects:      100% (77996/77996)
> fatal: Could not delete file
> C:\tmp\x\git00\.git\objects\incoming_6726566324996434241.idx
> fatal: Could not delete file
> C:\tmp\x\git00\.git\objects\incoming_6726566324996434241.idx

Important note:  This jumped from around 23% to 100% and there was no files but .git in the git00 folder.
Comment 5 Thorbjørn Ravn Andersen CLA 2011-04-29 06:41:32 EDT
(In reply to comment #3)

> I tried with the 0.10.1 shell wrapped version from the homepage, which worked
> both under Linux and in an msysgit shell:

> Please advise - I'd like to get a functional egit with Eclipse 3.6.2 at this
> stage.

I understand that this does not have priority.  I would like a gentle push towards how to get something working while waiting.  Is there a simple way to get 0.10.1 working in Eclipse 3.6.2?   Are there anyone else to ask for assistance?

Thanks

/Thorbjørn
Comment 6 Thorbjørn Ravn Andersen CLA 2011-05-26 07:36:40 EDT
Hi.

I would like to have this bug fixed before Eclipse 3.7 and eGit 1.0, and I would like to help if at all possible, but I am unfamiliar with the code base.

I would appreciate some minor mentoring into getting a situation where I can provide additional information needed for identifying and hopefully fixing this issue.

Would signing an NDA for an eGit developer to access our repository be an option?

In any case, I would really like to hear a response to this message.

Thanks

/Thorbjørn
Comment 7 Thorbjørn Ravn Andersen CLA 2011-05-31 10:55:09 EDT
(In reply to comment #6)
> Hi.
> 
> I would like to have this bug fixed before Eclipse 3.7 and eGit 1.0, and I
> would like to help if at all possible, but I am unfamiliar with the code base.

I've just done a test with 0.12 as available from the marketplace and it did not fail as 0.11 did.

I therefore have a faint hope that this is not accidental but the bug has actually been fixed :)

/Thorbjørn
Comment 8 Christian Halstrick CLA 2011-07-07 10:54:54 EDT
Have you tested with 1.0? If your use-case works with 1.0 we can close this bug (and maybe 339869 also).
Comment 9 Rajesh Akkineni CLA 2012-02-16 09:37:14 EST
I have got the same problem. Here is the exception in Eclipse.
Eclipse Version: 3.7.1 Egit version: (what ever comes with 3.7.1)

org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of fetch command
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:145)
	at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:174)
	at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:118)
	at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:142)
	at org.eclipse.egit.ui.internal.clone.GitCloneWizard.executeCloneOperation(GitCloneWizard.java:306)
	at org.eclipse.egit.ui.internal.clone.GitCloneWizard.access$3(GitCloneWizard.java:299)
	at org.eclipse.egit.ui.internal.clone.GitCloneWizard$5.run(GitCloneWizard.java:278)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.errors.TransportException: Packfile corruption detected: Unknown zlib error.
	at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:291)
	at org.eclipse.jgit.transport.BasePackFetchConnection.fetch(BasePackFetchConnection.java:229)
	at org.eclipse.jgit.transport.FetchProcess.fetchObjects(FetchProcess.java:225)
	at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:151)
	at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:113)
	at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1062)
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:136)
	... 7 more
Caused by: org.eclipse.jgit.errors.CorruptObjectException: Packfile corruption detected: Unknown zlib error.
	at org.eclipse.jgit.transport.PackParser$InflaterStream.read(PackParser.java:1608)
	at org.eclipse.jgit.transport.PackParser$InflaterStream.skip(PackParser.java:1578)
	at org.eclipse.jgit.util.IO.skipFully(IO.java:244)
	at org.eclipse.jgit.transport.PackParser.inflateAndSkip(PackParser.java:1430)
	at org.eclipse.jgit.transport.PackParser.indexOneObject(PackParser.java:883)
	at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:469)
	at org.eclipse.jgit.storage.file.ObjectDirectoryPackParser.parse(ObjectDirectoryPackParser.java:178)
	at org.eclipse.jgit.transport.PackParser.parse(PackParser.java:431)
	at org.eclipse.jgit.transport.BasePackFetchConnection.receivePack(BasePackFetchConnection.java:672)
	at org.eclipse.jgit.transport.BasePackFetchConnection.doFetch(BasePackFetchConnection.java:284)
Comment 10 Christian Halstrick CLA 2012-09-25 02:01:27 EDT
Does anybody still see such a problem on public repo where we could reproduce the problem?
Comment 11 Christian Halstrick CLA 2013-03-20 08:06:28 EDT
I can see in the referenced stackoverflow discussion [1] that the bug seems to be fixed. Therefore I close it now.

[1] http://stackoverflow.com/questions/5327116/eclipse-egit-packfile-corruption-detected-unknown-zlib-error-how-to-circumve