gerrit error fatal: git fetch_pack: expected ACK/NAK

1,708 views
Skip to first unread message

SamT

unread,
Oct 30, 2015, 2:54:30 PM10/30/15
to Repo and Gerrit Discussion
We are running gerrit version 2.10.3.1 on Centos platform.
We had a repository which was a small repository. What we did was to create a sub directory at the top level called olddir and then we moved all the other sub directories under the olddir. We pushed the change to gerrit, reviewed it and committed it using gerrit successfully
git mv classdir  olddir
git mv propertydir  olddir

After we performed this operation we started to get these errors over ssh protocol when we attempt to clone:
===================================================
git clone ssh://servername:8081/repositoryname
Cloning into 'repositoryname'...
fatal: git fetch_pack: expected ACK/NAK, got 'ERR want ca452381fc2ec5e4e83fb235b08ba8f424908d90 not valid'
fatal: internal server error

Here is the stack trace on gerrit server:
=================================================
[2015-10-30 11:05:51,204] ERROR com.google.gerrit.sshd.BaseCommand : Internal server error (user username account 199) during git-upload-pack '/repositoryname'
org.eclipse.jgit.errors.PackProtocolException: want ca452381fc2ec5e4e83fb235b08ba8f424908d90 not valid
        at org.eclipse.jgit.transport.UploadPack.parseWants(UploadPack.java:1070)
        at org.eclipse.jgit.transport.UploadPack.processHaveLines(UploadPack.java:943)
        at org.eclipse.jgit.transport.UploadPack.negotiate(UploadPack.java:923)
        at org.eclipse.jgit.transport.UploadPack.service(UploadPack.java:689)
        at org.eclipse.jgit.transport.UploadPack.upload(UploadPack.java:628)
        at com.google.gerrit.sshd.commands.Upload.runImpl(Upload.java:80)
        at com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:101)
        at com.google.gerrit.sshd.AbstractGitCommand.access$000(AbstractGitCommand.java:32)
        at com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:70)
        at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:442)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
        at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:370)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing unknown ca452381fc2ec5e4e83fb235b08ba8f424908d90
        at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:148)
        at org.eclipse.jgit.lib.ObjectReader$1.open(ObjectReader.java:302)
        at org.eclipse.jgit.revwalk.RevWalk$2.next(RevWalk.java:977)
        at org.eclipse.jgit.transport.UploadPack.parseWants(UploadPack.java:1056)


We restart gerrit and the problem goes away. However after the next commit to the repository, the problem comes back. Our file systems seem to be ok and I do not see any issues.
The "git fsck" does not show any issues. Having said all this I have performed "git fsck" and "git gc" on the central repository and restarted the gerrit server with the hope of going around the issue.

I have seen a few posts in the past about a similar problem like this but no definite answer. These are the threads:

Can you please let me know if anyone has come across this error and what was the root cause and the fix for this issue? Thanks.







Matthias Sohn

unread,
Oct 30, 2015, 6:21:20 PM10/30/15
to SamT, Repo and Gerrit Discussion
upgrade at least to 2.10.7 or better 2.11.4, they have some JGit fixes fixing some reasons for MissingObjectExceptions.
For details see the release notes and the bugs referenced there

-Matthias 
Reply all
Reply to author
Forward
0 new messages