v3.4.4: Git protocol V2 bug: fatal: internal server error

174 views
Skip to first unread message

Chaitra Raghunath

unread,
Jul 8, 2022, 2:03:43 PM7/8/22
to Repo and Gerrit Discussion
Gerrit version: 3.4.4
Git protocol version: 2.35.1

"git remote update" in a bare/mirrored repo fails with the following error:

Fetching origin
fatal: remote error: want f600974b091a8de781d24a6459fd814ec7d78670 not valid
fatal: internal server error
error: could not fetch origin


On the gerrit server:

gerrit2@test-vm:/data/git/test.git/refs/changes/33/454533$ git show f600974b091a8de781d24a6459fd814ec7d78670
commit f600974b091a8de781d24a6459fd814ec7d78670
Author: Gerrit User 213 <213@ac663f53-afa7-497f-99df-a2d520957877>
Date:   Fri Jul 8 10:29:13 2022 -0700

    Create change

    Uploaded patch set 1.

    Patch-set: 1
    Change-id: I1709a13460c8730522f736b40de011af6e75e646
    Subject: Added test file echo test_file1_92446
    Branch: refs/heads/master
    Status: new
    Topic:
    Commit: e1ee228dcb6f47e1e2531d2d64555f7466088d46
    Tag: autogenerated:gerrit:newPatchSet
    Groups: e1ee228dcb6f47e1e2531d2d64555f7466088d46
    Private: false
    Work-in-progress: false


error_log:

[2022-07-08T10:30:07.220-07:00] [SSH git-upload-pack /test (automation_user)] ERROR com.google.gerrit.sshd.BaseCommand : Internal server error (user automation_user account 213) during git-upload-pack '/test'
org.eclipse.jgit.transport.UploadPackInternalServerErrorException
        at org.eclipse.jgit.transport.UploadPack.upload(UploadPack.java:775)
        at com.google.gerrit.sshd.commands.Upload.runImpl(Upload.java:101)
        at com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:109)
        at com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:74)
        at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:490)
        at com.google.gerrit.server.logging.LoggingContextAwareRunnable.run(LoggingContextAwareRunnable.java:113)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
        at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:612)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.eclipse.jgit.transport.WantNotValidException: want f600974b091a8de781d24a6459fd814ec7d78670 not valid
        at org.eclipse.jgit.transport.UploadPack$AdvertisedRequestValidator.checkWants(UploadPack.java:1855)
        at org.eclipse.jgit.transport.UploadPack.parseWants(UploadPack.java:1806)
        at org.eclipse.jgit.transport.UploadPack.processHaveLines(UploadPack.java:1695)
        at org.eclipse.jgit.transport.UploadPack.fetchV2(UploadPack.java:1206)
        at org.eclipse.jgit.transport.UploadPack.serveOneCommandV2(UploadPack.java:1293)
        at org.eclipse.jgit.transport.UploadPack.serviceV2(UploadPack.java:1333)
        at org.eclipse.jgit.transport.UploadPack.uploadWithExceptionPropagation(UploadPack.java:836)
        at org.eclipse.jgit.transport.UploadPack.upload(UploadPack.java:752)
        ... 12 more

Subsequent "git remote update" goes through successfully. This seems like a bug. Is downgrading to Git V1 the only option here? Do I open a bug for this issue?

Björn Pedersen

unread,
Jul 11, 2022, 2:30:15 AM7/11/22
to Repo and Gerrit Discussion
chaitrara...@gmail.com schrieb am Freitag, 8. Juli 2022 um 20:03:43 UTC+2:
Gerrit version: 3.4.4
Git protocol version: 2.35.1

"git remote update" in a bare/mirrored repo fails with the following error:

Fetching origin
fatal: remote error: want f600974b091a8de781d24a6459fd814ec7d78670 not valid
fatal: internal server error
error: could not fetch origin


Subsequent "git remote update" goes through successfully. This seems like a bug. Is downgrading to Git V1 the only option here? Do I open a bug for this issue?


Seems similar to  https://bugs.chromium.org/p/gerrit/issues/detail?id=11962, possibly missing access rights?

Chaitra Raghunath

unread,
Jul 11, 2022, 1:14:31 PM7/11/22
to Repo and Gerrit Discussion
We are running Gerrit v3.4.4 and the bug fixes mentioned in this bug (https://bugs.chromium.org/p/gerrit/issues/detail?id=11962) are present in Gerrit v3.4.4. 

I verified that these fixes exist in v3.4.4:

The stack trace mentioned in the bug is different from the stack trace i posted earlier. The issue that we are running into doesn't seem to be related to access rights:
Reply all
Reply to author
Forward
0 new messages