Fail to replicate due to missing objects

141 views
Skip to first unread message

motorhe...@gmail.com

unread,
Mar 20, 2024, 3:23:18 PM3/20/24
to Repo and Gerrit Discussion
We gave started seeing errors like the following on our Gerrit 3.2.7:

[2024-03-20 15:10:21,478] Failed replicate of refs/heads/xxxx to gerritcr@xxxx:/home/gerritcr/repositories/xxxx.git, reason: missing necessary objects [CONTEXT pushOneId="625172aa" ]

We have tried rsyncing the project from master to proxy and forcing replication afterward looks to succeed. However, as new changes come in, we see these errors return. Not all of our mirror servers have this issue (only 3 out of 12 mirrors right now).

Is this a problem with the repo on the master? Any thought on how we might adress this to get it replicating normally again?

Regards,
Robert.

motorhe...@gmail.com

unread,
Mar 20, 2024, 5:29:08 PM3/20/24
to Repo and Gerrit Discussion
UPDATE

Running git gc on the affected repo on an affected mirror server produced a fatal: bad object refs/changes/blah. Removing that bad object allowed git gc run to caompletion, after which replication is working on that server. We are trying the same trick for the others.

Just to let you know (and anyone else who searches on this error message). Issue looks to be resolved.

[gerritcr@server project.git]$ git gc
fatal: bad object refs/changes/31/187131/meta
fatal: failed to run repack
[gerritcr@server project.git]$ mv refs/changes/31/187131/meta /tmp/investigate/
[gerritcr@server project.git]$ git gc
Enumerating objects: 13610674, done.
Counting objects: 100% (13610501/13610501), done.
Delta compression using up to 40 threads
Compressing objects: 100% (8152285/8152285), done.
Writing objects: 100% (13610501/13610501), done.
Total 13610501 (delta 5871605), reused 11457136 (delta 4741413), pack-reused 0
Checking connectivity: 13616038, done.
Expanding reachable commits in commit graph: 2260922, done.
Finding extra edges in commit graph: 100% (2260922/2260922), done.
Computing commit graph topological levels: 100% (2260922/2260922), done.
Computing commit graph generation numbers: 100% (2260922/2260922), done.
Writing out commit graph in 6 passes: 100% (13565532/13565532), done.
[gerritcr@server project.git]

Matthias Sohn

unread,
Mar 20, 2024, 5:31:26 PM3/20/24
to motorhe...@gmail.com, Repo and Gerrit Discussion
On Wed, Mar 20, 2024 at 10:29 PM motorhe...@gmail.com <motorhe...@gmail.com> wrote:
UPDATE

Running git gc on the affected repo on an affected mirror server produced a fatal: bad object refs/changes/blah. Removing that bad object allowed git gc run to caompletion, after which replication is working on that server. We are trying the same trick for the others.

You can use git fsck to check for corrupted objects.
 
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/2bc1eb0a-146f-4e5a-a3c0-a480da7a2d34n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages