Bug 263867 - www/gitlab-ce v14.10.0 failures when pushing or pulling
Summary: www/gitlab-ce v14.10.0 failures when pushing or pulling
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Matthias Fechner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-08 17:42 UTC by gwright
Modified: 2022-05-27 18:43 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (mfechner)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gwright 2022-05-08 17:42:18 UTC
Hi Matthais,

The recent gitlab-ce (v14.10.0) introduced an annoying bug.  It shows up as
failure to push/pull from a server running gitlab, and apparent corruption of
repositories on the Gitlab server.

Here are the observed symptoms.  When pushing, I get:

(base)  ~/src/vev-renormalization> git push
warning: core.fsyncObjectFiles is deprecated; use core.fsync instead
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 389 bytes | 389.00 KiB/s, done.
Total 3 (delta 2), reused 1 (delta 0), pack-reused 0
remote: warning: core.fsyncObjectFiles is deprecated; use core.fsync instead
remote: warning: core.fsyncObjectFiles is deprecated; use core.fsync instead
remote: fatal: commit-graph requires overflow generation data but has none
warning: core.fsyncObjectFiles is deprecated; use core.fsync instead
fatal: commit-graph requires overflow generation data but has none
remote: warning: core.fsyncObjectFiles is deprecated; use core.fsync instead
To ssh://<HOST REDACTED>/software/vev-renormalization.git
 ! [remote rejected] master -> master (missing necessary objects)
error: failed to push some refs to 'ssh://<HOST REDACTED>/software/vev-renormalization.git'


Going to the corresponding repository on the server, I see:

[git@gitlab ~/repositories/@hashed/92/2c/922c7954216ccfe7a61def609305ce1dc7c67e225f873f256d30d7a8ee4f404c.git]$ git fsck --full
Checking object directories: 100% (256/256), done.
fatal: commit-graph requires overflow generation data but has none
[git@gitlab ~/repositories/@hashed/92/2c/922c7954216ccfe7a61def609305ce1dc7c67e225f873f256d30d7a8ee4f404c.git]$ echo $?
128

After some searching, I found this recommendation: https://docs.gitlab.com/ee/install/installation.html#git

Now GitLab seems to depend on a version of git patched to work with a particular
version of gitaly.  In the jail in which I run gitlab, I did:

> cd /tmp
> git clone https://gitlab.com/gitlab-org/gitaly.git -b 14-10-stable /tmp/gitaly
> cd /tmp/gitaly
> gmake git GIT_PREFIX=/usr/local

This installed the patched version of git, overwriting the binaries installed
in /usr/local/by the git package.  After I did this, the repository checked
clean:

05ce1dc7c67e225f873f256d30d7a8ee4f404c.git # git fsck --full
Checking object directories: 100% (256/256), done.
Checking objects: 100% (107/107), done.
Verifying commits in commit graph: 100% (24/24), done.

Also after switching to the patched version of git, pushing from a remote
worked without error.

It is rather annoying that gitlab (or perhaps more specifically gitaly) can not
use the released git.  Let me know if I can run more experiments.  Reinstalling
git from packages seems to reliably recreate the failed state, at least for one
of my repositories.

BR,
Greg
Comment 1 Matthias Fechner freebsd_committer 2022-05-27 18:43:43 UTC
Could you please retry with version 15.0.0?
The changelog is mentioning some bugfixes:
https://gitlab.com/gitlab-org/gitaly/-/blob/master/CHANGELOG.md

that could be related to the problem you describe.