Eclipse egit:“检测到包文件损坏:未知的 zlib 错误。”如何规避?
我们在 Ubuntu 下有一个由 gitosis 管理的 git 存储库,它一直运行良好,直到磁盘满为止。在阅读了有关该问题的一些内容后,我发现 git gc 和 git gc --aggresive 为我节省了相当多的磁盘空间。很不错。
不幸的是,这似乎破坏了 egit 中的某些内容,因为我在尝试克隆我们的存储库时收到此消息(在签出阶段大约 10%)
检测到包文件损坏:未知 zlib 错误。
有趣的是,msysgit 中的 git 和以前一样工作得很好。
我尝试将 egit 升级到 0.12 的夜间版本,因为有一些邮件列表消息暗示该问题已在上周修复,但无济于事。
我现在的问题是,我可以对我的存储库执行哪些操作才能达到 egit 再次工作的状态?我可以完全控制运行 gitosis 的 Ubuntu 实例。
编辑:我从 Eclipse 事件日志中获得了堆栈跟踪
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
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在没有 EGit 的情况下获取克隆的一种方法是:
既然您提到可以使用 msysgit 处理捆绑包,这表明 Egit 或 JGit 端存在错误,如 错误 330758。
通常的做法是使用此 p2 更新站点< /a>,看看问题是否仍然存在。
如果问题仍然存在,您可以提交错误报告或完成现有报告 (330758)。
One way to get a clone without EGit is to:
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).
请检查您正在运行的 Git 版本并确保它们匹配。
Please check the versions of Git you are running and make sure they match.
最新的 egit 0.12 没有显示此行为。
希望该错误已得到真正修复,而不仅仅是意外的副作用。
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.