开发者

buildbot using msysGit causing intermittent datastreram error

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: pac开发者_如何学运维k 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜