Git corruption issue

131 views
Skip to first unread message

Diptiman

unread,
Jul 19, 2017, 1:14:45 PM7/19/17
to Repo and Gerrit Discussion
Now a days in one of our git codebase we are facing frequent Missing object issue in git. We have gerrit as our code review system. It's become a headache for us. Is there anyone who can guide use fix this issue.

Thanks
Diptiman

thomasmu...@yahoo.com

unread,
Jul 19, 2017, 2:00:36 PM7/19/17
to Repo and Gerrit Discussion
Is this gerrit?

It's probaly jgit gc doing this. To switch off gc do the following remove [gc] from gerrit.config please.

Diptiman

unread,
Jul 19, 2017, 2:12:28 PM7/19/17
to Repo and Gerrit Discussion
We do have configuration like
[gc]
starttime =3:00
interval = 1 day

Shall I remove it and try?

Diptiman

unread,
Jul 19, 2017, 2:16:27 PM7/19/17
to Repo and Gerrit Discussion
We are observing error pattern like this:

error: unpack failed: error Missing unknown xxxxxxxx
fatal: Unpack error, check server log

thomasmu...@yahoo.com

unread,
Jul 19, 2017, 2:38:04 PM7/19/17
to Repo and Gerrit Discussion
Yeh. Wikimedia foundation also had this problem once with mediawiki/core. One day all tests started to fail and then git pulling started to fail. We found it was gc so we disabled it.

Jonathan Nieder

unread,
Jul 19, 2017, 2:52:15 PM7/19/17
to thomasmu...@yahoo.com, Repo and Gerrit Discussion
Do you have more details about that? If "jgit gc" is broken, I don't think we want it to stay so.

The "File a Bug" link at https://eclipse.org/jgit/support/ would be a good place to track that.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Matthew Webber

unread,
Jul 19, 2017, 4:55:17 PM7/19/17
to Repo and Gerrit Discussion
On Wednesday, 19 July 2017 19:00:36 UTC+1, thomasmu...@yahoo.com wrote:
It's probaly jgit gc doing this. To switch off gc do the following remove [gc] from gerrit.config please.

Presumably turning off JGit gc will avoid any future corruption, but won't fix any existing corruption.
Are then any command line git options that might fix the corruption (eg git repack)?

Matthew  

bibo...@huawei.com

unread,
Jul 20, 2017, 4:03:18 AM7/20/17
to Repo and Gerrit Discussion
hi dip:
    i think you can add conifg below
    
[receive]
    checkReferencedObjectsAreReachable = false



在 2017年7月20日星期四 UTC+8上午2:16:27,Diptiman写道:

Diptiman

unread,
Jul 20, 2017, 11:22:52 PM7/20/17
to Repo and Gerrit Discussion
Thanks Bibo,

I will add this config and let's see if there is some behavioural changes observed in the coming days . Thanks for the suggestion, hope you are doing good :)

Thanks
Diptiman 

Diptiman

unread,
Jul 20, 2017, 11:45:18 PM7/20/17
to Repo and Gerrit Discussion
Hi Mathew,

To be frank we are following certain steps to resolve the issue which works most of the time:

1. Deleting corrupted ref: git update-ref -d <change>
2.git gc
3.git refog(optional)
4.gerrit gc

These days we are fixing this issue regularly with these commands.

Note: We are using gerrit version 2.10

Thanks
Diptiman

bibo...@huawei.com

unread,
Jul 21, 2017, 12:24:09 AM7/21/17
to Repo and Gerrit Discussion
dear dip :

    i do not think config gerrit gc in gerrit.config is a good idea.

    because all projects will run gerrit gc, but it can not filter the project, if the project is very very big and contains many many binary files, gerrit will hung when the project runs gerrit gc.

    i suggest that gerrit ls-projects and filter big project and gerrit gc in crontab on gerrit server.

    i run git gc and gerrit gc on gerrit server.

thomasmu...@yahoo.com

unread,
Jul 21, 2017, 6:35:25 AM7/21/17
to Repo and Gerrit Discussion
Gerrit 2.10 is very old. You should upgrade :)


On Wednesday, July 19, 2017 at 6:14:45 PM UTC+1, Diptiman wrote:

Diptiman

unread,
Jul 24, 2017, 5:06:56 AM7/24/17
to Repo and Gerrit Discussion
I will follow your suggestions 

Diptiman

unread,
Jul 24, 2017, 5:07:26 AM7/24/17
to Repo and Gerrit Discussion
Yeah we have plan to upgrade in coming days :)

diptim...@appdynamics.com

unread,
Jul 26, 2017, 11:13:03 PM7/26/17
to Repo and Gerrit Discussion
This week with the suggested changes we did not observe any issues as if now. Thanks to everyone for pointing to the right direction. :)

Cheers!!
Diptiman
Reply all
Reply to author
Forward
0 new messages