Deleting tags in remote repository causes internal Gerrit error

296 views
Skip to first unread message

Zbyněk Schwarz

unread,
Oct 11, 2019, 9:46:31 AM10/11/19
to Repo and Gerrit Discussion

Hello, Gerrit community,


We have recently upgraded our Gerrit instance from 2.15 to 3.0.2 and everything was mostly fine up to this point. But today, one of our developers deleted a tag in his repository and when he tried to push this change he encountered an error. I reproduced it in our testing instance using the same steps, using the same client - Git Extensions 3.2.1. The message from the client Push dialogue window is as follows:


"C:\Program Files\Git\bin\git.exe" push "origin" :refs/tags/Test


remote: Processing changes: refs: 1, done

fatal: internal server error

To ssh://gerrittest:29418/test

 - [deleted] Test

error: failed to push some refs to 'ssh://test@gerrittest:29418/test'

Done


Press Enter or Esc to close console...



While the server logged this corresponding message:


gerrit: [2019-10-11 09:53:06,293] [SSH git-receive-pack /test (test)] ERROR com.google.gerrit.sshd.BaseCommand : Internal server error (user test account 1000206) during git-receive-pack '/test'

gerrit: java.lang.IllegalStateException: Pack size not yet set since it has not yet been received

gerrit: at org.eclipse.jgit.transport.BaseReceivePack.getPackSize(BaseReceivePack.java:1083)

gerrit: at com.google.gerrit.server.git.receive.LazyPostReceiveHookChain.affectsSize(LazyPostReceiveHookChain.java:82)

gerrit: at com.google.gerrit.server.git.receive.LazyPostReceiveHookChain.onPostReceive(LazyPostReceiveHookChain.java:64)

gerrit: at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:426)

gerrit: at org.eclipse.jgit.transport.ReceivePack.receive(ReceivePack.java:327)

gerrit: at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:104)

gerrit: at com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:98)

gerrit: at com.google.gerrit.sshd.AbstractGitCommand.access$000(AbstractGitCommand.java:31)

gerrit: at com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:63)

gerrit: at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:463)

gerrit: at com.google.gerrit.server.logging.LoggingContextAwareRunnable.run(LoggingContextAwareRunnable.java:83)

gerrit: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

gerrit: at java.util.concurrent.FutureTask.run(FutureTask.java:266)

gerrit: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)

gerrit: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)

gerrit: at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:610)

gerrit: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

gerrit: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

gerrit: at java.lang.Thread.run(Thread.java:748)


This used to work before, in the older version, using the same steps and although the push fails in such a manner, the tag does get deleted from the repository.


I rechecked that we have necessary permission for working with tags:


Reference: refs/tags/*

  • Create Reference
  • Create Annotated Tag
  • Allow pushing with or without force


For reproducing said issue can boil it down to following steps:

  1. Create a tag on a commit (Lightweight or Annotated)
  2. Push this tag to the remote
  3. Delete the same tag
  4. Push the change again



We might be doing something wrong or there might have been some changes made to how this currently works between the version we used in the past in which case I would appreciate pointers as to how to do this operation now.


Thank you

Seamus Connor

unread,
Oct 30, 2019, 2:41:32 PM10/30/19
to Repo and Gerrit Discussion
We are also having this issue on gerrit 3.0.2. Did you get a resolution?

James Hartig

unread,
Nov 13, 2019, 12:06:30 PM11/13/19
to Repo and Gerrit Discussion
We're having the same issue as well with 3.0.3 and with branches.

David Pursehouse

unread,
Nov 13, 2019, 12:23:00 PM11/13/19
to James Hartig, Repo and Gerrit Discussion
I've reproduced this issue.  Tracking it here: https://bugs.chromium.org/p/gerrit/issues/detail?id=11918

Will try to fix it today.

On Wed, Nov 13, 2019 at 9:06 AM James Hartig <faste...@gmail.com> wrote:
We're having the same issue as well with 3.0.3 and with branches.

--
--
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/bd5bc128-67ed-4de5-93f3-d3520084caf1%40googlegroups.com.

David Pursehouse

unread,
Nov 13, 2019, 12:51:25 PM11/13/19
to James Hartig, Repo and Gerrit Discussion
On Wed, Nov 13, 2019 at 9:22 AM David Pursehouse <david.pu...@gmail.com> wrote:
I've reproduced this issue.  Tracking it here: https://bugs.chromium.org/p/gerrit/issues/detail?id=11918

Will try to fix it today.


What is interesting here is that the error is not reproducible against gerrit at googlesource.com.

Sparsh Singhal

unread,
Mar 14, 2023, 3:21:04 AM3/14/23
to Repo and Gerrit Discussion
We have this issue in 3.0.3 of our gerrit server. How do we go about it?

Do we need to upgrade to any version? or restart?

Thanks

Edwin Kempin

unread,
Mar 14, 2023, 3:24:06 AM3/14/23
to Sparsh Singhal, Repo and Gerrit Discussion
On Tue, Mar 14, 2023 at 8:21 AM Sparsh Singhal <sngh...@gmail.com> wrote:
We have this issue in 3.0.3 of our gerrit server. How do we go about it?

Do we need to upgrade to any version? or restart?

If you go to the fix change and then check 'Included in' in the 3-dot menu you can find that this change is included from v3.0.10.
So you would need to upgrade at least to this version.
 
Reply all
Reply to author
Forward
0 new messages