简体   繁体   English

Eclipse egit:“检测到打包文件损坏:未知的zlib错误。”如何规避?

[英]Eclipse egit: “Packfile corruption detected: Unknown zlib error.” How to circumvent?

We have a git repository managed by gitosis under Ubuntu, which has worked well all up to the disk ran full. 在Ubuntu下,我们有一个由gitosis管理的git存储库,在磁盘运行满之前,它一直运行良好。 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. 在阅读了一些有关此问题的内容后,我发现git gcgit gc --aggresive我获得了相当多的磁盘空间。 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%) 不幸的是,这似乎在egit中破坏了一些东西,因为当我尝试克隆我们的存储库时(在检出阶段大约为10%时)收到此消息

Packfile corruption detected: Unknown zlib error. 检测到Packfile损坏:未知的zlib错误。

Interestingly enough the git in msysgit works just fine as before. 有趣的是,msysgit中的git像以前一样可以正常工作。

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. 我尝试将egit升级到夜间版本0.12,因为有一些邮件列表消息暗示此问题已在上周内得到解决,但无济于事。

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. 我完全控制运行gitosis的Ubuntu实例。


EDIT: I got a stack trace from the Eclipse event log 编辑:我从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

Edit: Opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=340305 编辑:打开https://bugs.eclipse.org/bugs/show_bug.cgi?id=340305

One way to get a clone without EGit is to: 不使用EGit进行克隆的一种方法是:

  • 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 . 既然您提到过,您可以使用msysgit处理该包,这表明Egit或JGit方面存在错误,如错误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. 通常的做法是,使用此p2更新站点将夜间更新到最新的EGit,然后查看问题是否仍然存在。
If the issue persists, you can then file a bug report or complete the existing one (330758). 如果问题仍然存在,则可以提交错误报告或完成现有的报告(330758)。

请检查您正在运行的Git版本,并确保它们匹配。

The latest egit 0.12 does not show this behaviour. 最新的egit 0.12没有显示此行为。

Hopefully the bug has been fixed for real, and not just an accidental side effect. 希望该错误已得到修复,而不仅仅是偶然的副作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM