Gerrit gc failing with java.lang.NullPointerException

72 views
Skip to first unread message

suman...@gmail.com

unread,
Apr 1, 2023, 2:08:52 PM4/1/23
to Repo and Gerrit Discussion
Hi All,

we are facing some issue in gerrit , while performing the gerrit gc , getting below error 

ssh <host> gerrit gc --show-progress <project>   

collecting garbage for " some_project":

Pack refs:              100% (1556/1556)

Counting objects:       2654

Finding sources:        100% (2654/2654)

Getting sizes:          100% (611/611)

Compressing objects:    100% (358998/358998)failed

java.lang.NullPointerException

gerrit version: 3.2.7

java version: jdk8

can anyone suggest for same.

Martin Fick

unread,
Apr 1, 2023, 2:34:27 PM4/1/23
to suman...@gmail.com, Repo and Gerrit Discussion
On Sat, 1 Apr 2023 at 12:08, suman...@gmail.com <suman...@gmail.com> wrote:

we are facing some issue in gerrit , while performing the gerrit gc , getting below error 
java.lang.NullPointerException

Is there a stacktrace in the logs for that NPE?

-Martin

doug.r...@wandisco.com

unread,
Apr 3, 2023, 5:10:40 PM4/3/23
to Repo and Gerrit Discussion
You might want to run "git fsck --verbose" on that repository and see what it tells you...

Doug Robinson

unread,
Apr 10, 2023, 9:46:45 AM4/10/23
to suman...@gmail.com, Repo and Gerrit Discussion
Suman:

Please always include the mailing list in your replies.  Also, please do not "top-post".

On Fri, Apr 7, 2023 at 2:58 AM suman...@gmail.com <suman...@gmail.com> wrote:
Thanks , i have tried it , found that , some of the dangling commits .
example:
Checking d3ff942e3ccc4c73c03b7e21febb349e96a15fea
Checking fg77fefafdce27c190cac4842fb7640327c52e339
Checking gc3f971eab45bb5c26a85ae71f066577368c339e
dangling commit 39c02169556a4688e6e769bee04fa9023
dangling commit 6242f2cb882c293587fbf947640327c52
dangling commit f10429f8f70095402b5f3bf7256ad23c2

The "dangling commit" messages are normal and do not indicate corruption.

Based on this, either the repository was healed by some  "git fsck" operation or jgit's gc operation in the version you are using has a bug.  The complete stack traceback from the NPE would likely be appreciated.

That said, in general doing git repository GC via Gerrit is not scalable due to java heap management.  You would do much better to disable repository GC via Gerrit and use the C language Git binaries to do that job (or the jgit standalone tool).

Cheers.

Doug


--
DOUGLAS B ROBINSON SENIOR PRODUCT MANAGER

https://wandisco.com/

THIS MESSAGE AND ANY ATTACHMENTS ARE CONFIDENTIAL, PROPRIETARY AND MAY BE PRIVILEGED

If this message was misdirected, WANdisco, Inc. and its subsidiaries, ("WANdisco") does not waive any confidentiality or privilege. If you are not the intended recipient, please notify us immediately and destroy the message without disclosing its contents to anyone. Any distribution, use or copying of this email or the information it contains by other than an intended recipient is unauthorized. The views and opinions expressed in this email message are the author's own and may not reflect the views and opinions of WANdisco, unless the author is authorized by WANdisco to express such views or opinions on its behalf. All email sent to or from this address is subject to electronic storage and review by WANdisco. Although WANdisco operates anti-virus programs, it does not accept responsibility for any damage whatsoever caused by viruses being passed.

Reply all
Reply to author
Forward
0 new messages