使用 msysGit 的 buildbot 导致间歇性数据流错误

发布于 2024-09-11 03:25:37 字数 464 浏览 1 评论 0原文

我们正在使用 buildbot 来运行持续集成。内置的 Git 构建步骤生成以下命令行: C:\Program Files\Git\bin\git.EXE fetch -t file:///s:/Repositories/repo +master

s: 是映射在 buildbot 上的 debian 服务器上的 samba 共享奴隶。

它间歇性地失败(大约 50 个构建中一次)并出现以下错误:

error: inflate: data stream error (incorrect data check)
fatal: pack has bad object at offset 26936: inflate returned -3
fatal: index-pack failed
fatal: write error: Invalid argument

有谁知道可能导致此问题的原因以及我们如何修复它?

We are using buildbot to run continuous integration. The built-in Git build step generates this command line:
C:\Program Files\Git\bin\git.EXE fetch -t file:///s:/Repositories/repo +master

s: is a samba share on a debian server mapped on the buildbot slave.

It fails intermittently (once in ~50 builds) with this error:

error: inflate: data stream error (incorrect data check)
fatal: pack has bad object at offset 26936: inflate returned -3
fatal: index-pack failed
fatal: write error: Invalid argument

Does anyone have any idea what might be causing this and how we can fix it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

土豪 2024-09-18 03:25:37

此问题的偶然性可能会导致外部原因,例如硬件原因(磁盘或内存损坏)。
例如,请参阅此线程。他们尝试所有过程来正确地重新克隆错误的回购协议,但这是针对旧的 git 1.5,所以它可能不再准确。
我将流程留在这里仅供参考。

显然,获得正确克隆的最简单方法是:

1/初始化一个新的空存储库,
2/这样添加“origin”远程:git remote add -f origin http://repo.or.cz/r/msysgit.git
3/ 尽管出现错误,请继续手动获取包:

(cd .git/objects/pack/ && curl -O \

http://repo.or.cz/r/msysgit.git/objects/pack/pack-5b51af9cb1b1122d27ddd53d40a8c3e4472ae9e4.pack)

4/ 使用附加的捆绑包添加未损坏的对象:
git bundle unbundle borked.bundle
5/ 现在再次从“origin”获取(以正确更新引用):git fetch origin
6/ 手动(!!!)删除 borked 临时对象文件:

find .git -name \*.temp -exec rm {} \;

7/ 现在,“git gc”

如果您已经进行了(无聊的)结帐,您可能可以使用 4、6 和 7。

The aleatory nature of this issue leads potentially to external causes, like hardware one (disk or memory corruption).
See this thread for instance. They try a all process to re-clone correctly the bad repo, but that was for an old git 1.5, so it may not be accurate anymore.
I leave the process here just for information.

Apparently, the easiest way to get a correct clone is to:

1/ initialize a new, empty repository,
2/ add the 'origin' remote thusly: git remote add -f origin http://repo.or.cz/r/msysgit.git
3/ in spite of the error, continue by fetching the pack manually:

(cd .git/objects/pack/ && curl -O \

http://repo.or.cz/r/msysgit.git/objects/pack/pack-5b51af9cb1b1122d27ddd53d40a8c3e4472ae9e4.pack)

4/ adding the non-corrupted objects using the attached bundle:
git bundle unbundle borked.bundle.
5/ Now fetch from 'origin' again (to update the refs correctly):git fetch origin
6/ Manually (!!!) remove the borked temporary object files:

find .git -name \*.temp -exec rm {} \;

7/ Now, 'git gc'

If you already have a (borked) checkout, you might be able to get away with 4, 6 and 7.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文