Critical: Multiple git repositories corrupted after 7.14 upgrade
After upgrading to 7.14 yesterday we have noticed that many of our most critical git repositories are now at least partially corrupted.
Error when cloning are as follow:
git@gitlab.<removed>:systems/<removed>.git
Cloning into '<removed>'...
remote: error: inflate: data stream error (unknown compression method)
remote: fatal: loose object 5d796d921ef1ec27bdd41c7e1c8946d36a5896db (stored in objects/5d/796d921ef1ec27bdd41c7e1c8946d36a5896db) is corrupt
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed
git fsck
gives the following error:
fatal: loose object 5d796d921ef1ec27bdd41c7e1c8946d36a5896db (stored in ./objects/5d/796d921ef1ec27bdd41c7e1c8946d36a5896db) is corrupt
There appears to be fix for this other than to manually copy the corrupted git object from someone's copy of the repo at the risk of losing data:
# Get git object from somewhere's clone and copy to gitlab server:
scp git@gitlab.<removed>-<removed>.git/objects/5d # scp 796d921ef1ec27bdd41c7e1c8946d36a5896db gitlab:/mnt/repositories/repositories/<removed>/<removed>.git/objects/5d/
# Fix ownership on gitlab server:
chown git:git 796d921ef1ec27bdd41c7e1c8946d36a5896db
git fsck
Checking object directories: 100% (256/256), done.
Checking objects: 100% (367858/367858), done.
As we are a Gitlab Enterprise customer we are also emailing support with a link to this ticket.
Related to #2297 (closed)