1

We have a git repository managed by gitosis under Ubuntu, which has worked well all up to the disk ran full. After reading up a bit on the issue, I found that git gc and git gc --aggresive got me quite a bit of diskspace back. Very nice.

Unfortunately this appears to have broken something in egit, as I get this message when trying to clone our repository (during the checkout phase at around 10%)

Packfile corruption detected: Unknown zlib error.

Interestingly enough the git in msysgit works just fine as before.

I tried upgrading egit to the nightly build of 0.12 as there was some mailing list messages hinting this had been fixed within the last week, but to no avail.

My question now is, what can I do to my repository to get to a state where egit works again? I have full control over the Ubuntu instance running gitosis.


EDIT: I got a stack trace from the Eclipse event log

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

Edit: Opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=340305

Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347
  • Maybe it is some cache issue in the workspace regarding Egit metadata? Did you try with a fresh workspace and see if the issue persists? – VonC Mar 16 '11 at 15:24
  • Yes, I have tried with a fresh workspace, which unfortunately didn't change anything. I'll try with a freshly unzipped Eclipse a little later. – Thorbjørn Ravn Andersen Mar 16 '11 at 15:32
  • If you can clone the repo (in command-line mode, not with Egit), it would be interesting to see if Egit can clone that local copy, instead of cloning the gitosis remote repo. – VonC Mar 16 '11 at 15:34
  • I now tried cloning and a "git clone --mirror" also gave the Unknown zlib error, but only around 70%. A normal clone give a "short read of block" when trying to read in with egit. Got a suggestion for how to rebuild the git repository in a more friendly manner? – Thorbjørn Ravn Andersen Mar 16 '11 at 17:01
  • Is there any way to git bundle (see http://stackoverflow.com/questions/2046918/backing-up-project-which-uses-git/2047141#2047141 ) on the remote server, copy that bundle (it is only *one* file, after all) and see if you can clone locally that bundle? – VonC Mar 16 '11 at 17:48
  • @VonC, The fresh Eclipse gave same error. A locally created bundle did too, as well as the one created on the Ubuntu machine. The remote git version is 1.7.0.4. Got more suggestions? (and thanks for the bundle tip, very nice) – Thorbjørn Ravn Andersen Mar 17 '11 at 10:59
  • At this stage, I would go on testing the original repo (managed by gitosis) directly in command line: Eclipse or EGit isn't the problem here, if a `git clone`in a command-line fails. What a `git fsck` returns? – VonC Mar 17 '11 at 11:45
  • @VonC, I can process the bundles just fine with the git in msysgit, but it is egit that gives me trouble. Perhaps you would like to convert this to an answer, so I can upvote you? – Thorbjørn Ravn Andersen Mar 17 '11 at 11:59
  • I can see I have worded my answer ambiguously. "git fsck" returned no error. "git clone ...bundle" with the git in msysgit works nicely. My current guess is that this is a problem in jgit. – Thorbjørn Ravn Andersen Mar 17 '11 at 12:09
  • @Thorbjørn: I think so too, which is why I mentioned bug 330758 in my answer. – VonC Mar 17 '11 at 12:33

3 Answers3

1

One way to get a clone without EGit is to:

  • make a bundle on the server
  • copy the unique file representing that bundle on the client side
  • try to clone it in command-line.

Since you mention you can process the bundle with msysgit, that suggests a bug on the Egit or JGit side, as illustrated by bug 330758.
The usual course of action is to update to the nightly latest fo EGit, using this p2 update site, and see if the problem is still there.
If the issue persists, you can then file a bug report or complete the existing one (330758).

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • As upgrading to the nightly build of egit did not help, and this symptom did not appear to be in the bugzilla database, I've opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=340305 – Thorbjørn Ravn Andersen Mar 17 '11 at 12:48
0

Please check the versions of Git you are running and make sure they match.

Adam Dymitruk
  • 124,556
  • 26
  • 146
  • 141
0

The latest egit 0.12 does not show this behaviour.

Hopefully the bug has been fixed for real, and not just an accidental side effect.

Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347