Gerrit error: unpack failed: error Short read of block.

4,715 views
Skip to first unread message

Willie

unread,
Sep 22, 2011, 6:01:13 PM9/22/11
to Repo and Gerrit Discussion
Gerrit version 2.2.1


The full error dump is:

Counting objects: 68, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (36/36), done.
Writing objects: 100% (41/41), 11.19 KiB, done.
Total 41 (delta 14), reused 0 (delta 0)
fatal: Unpack error, check server log
remote: Resolving deltas: 14% (2/14)
error: unpack failed: error Short read of block.
To <remote repo>
! [remote rejected] HEAD -> refs/for/master (n/a (unpacker error))
error: failed to push some refs to '<remote repo>'


I get it when trying to push code using: git push review HEAD:refs/for/
master

After much searching, I have found scantly little on this problem.
I've tried restarting Gerrit, as well as the machine it's running on
with no luck.

Has anyone seen this before?

Shawn Pearce

unread,
Sep 22, 2011, 6:12:05 PM9/22/11
to Willie, Repo and Gerrit Discussion

This should have a stack trace on the server side. That might help...

Willie Williams

unread,
Sep 22, 2011, 6:38:22 PM9/22/11
to Shawn Pearce, Repo and Gerrit Discussion
Hi Shawn,

First off, thanks for the super quick reply.

Here's the stack trace:

[2011-09-22 21:51:19,499] ERROR com.google.gerrit.sshd.BaseCommand : Internal server error (user jordan account 1000001) during git-receive-pack '/tools/review'
com.google.gerrit.sshd.BaseCommand$Failure: fatal: Unpack error, check server log
at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:135)
at com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:103)
at com.google.gerrit.sshd.AbstractGitCommand.access$000(AbstractGitCommand.java:34)
at com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:69)
at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:399)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)
at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:324)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
Caused by: java.io.IOException: Unpack error on project "tools/review":
  RefFilter: com.google.gerrit.server.git.ReceiveCommitsRefFilter@1826b7aclass com.google.gerrit.server.git.ReceiveCommitsRefFilter

at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:134)
... 13 more
Caused by: org.eclipse.jgit.errors.UnpackException: Exception while parsing pack stream
at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:702)
at org.eclipse.jgit.transport.ReceivePack.receive(ReceivePack.java:600)
at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:90)
... 13 more
Caused by: java.io.EOFException: Short read of block.
at org.eclipse.jgit.util.IO.readFully(IO.java:218)
at org.eclipse.jgit.storage.file.UnpackedObject.open(UnpackedObject.java:108)
at org.eclipse.jgit.storage.file.ObjectDirectory.openObject2(ObjectDirectory.java:537)
at org.eclipse.jgit.storage.file.ObjectDirectory.openObject1(ObjectDirectory.java:428)
at org.eclipse.jgit.storage.file.FileObjectDatabase.openObjectImpl1(FileObjectDatabase.java:172)
at org.eclipse.jgit.storage.file.FileObjectDatabase.openObject(FileObjectDatabase.java:157)
at org.eclipse.jgit.storage.file.WindowCursor.open(WindowCursor.java:122)
at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:228)
at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:811)
at org.eclipse.jgit.transport.ReceivePack.checkConnectivity(ReceivePack.java:871)
at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:666)
... 15 more

Shawn Pearce

unread,
Sep 22, 2011, 7:26:41 PM9/22/11
to Willie Williams, Repo and Gerrit Discussion
On Thu, Sep 22, 2011 at 15:38, Willie Williams <bigwill...@gmail.com> wrote:
> First off, thanks for the super quick reply.
> Here's the stack trace:
> [2011-09-22 21:51:19,499] ERROR com.google.gerrit.sshd.BaseCommand :
> Internal server error (user jordan account 1000001) during git-receive-pack
> '/tools/review'
...

> Caused by: java.io.IOException: Unpack error on project "tools/review":
...

> Caused by: java.io.EOFException: Short read of block.
> at org.eclipse.jgit.util.IO.readFully(IO.java:218)
> at
> org.eclipse.jgit.storage.file.UnpackedObject.open(UnpackedObject.java:108)

Have you run `git fsck` in this repository yet? It seems JGit cannot
read a loose object file.

Willie

unread,
Sep 22, 2011, 7:29:34 PM9/22/11
to Repo and Gerrit Discussion
Update:

It looks as though there was a corrupted object in refs/notes/review.
We deleted the folder, and now we can push, but we're not sure how
this might affect Gerrit operation.



On Sep 22, 3:38 pm, Willie Williams <bigwilliest...@gmail.com> wrote:
> Hi Shawn,
>
> First off, thanks for the super quick reply.
>
> Here's the stack trace:
>
> [2011-09-22 21:51:19,499] ERROR com.google.gerrit.sshd.BaseCommand :
> Internal server error (user jordan account 1000001) during git-receive-pack
> '/tools/review'
> com.google.gerrit.sshd.BaseCommand$Failure: fatal: Unpack error, check
> server log
>  at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:135)
> at
> com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:1 03)
>  at
> com.google.gerrit.sshd.AbstractGitCommand.access$000(AbstractGitCommand.jav a:34)
> at
> com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:69)
>  at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:399)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>  at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access $101(ScheduledThreadPoolExecutor.java:165)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Sc heduledThreadPoolExecutor.java:266)
>  at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:324)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1 110)
>  at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java: 603)
> at java.lang.Thread.run(Thread.java:636)
> Caused by: java.io.IOException: Unpack error on project "tools/review":
>   RefFilter:
> com.google.gerrit.server.git.ReceiveCommitsRefFil...@1826b7aclasscom.google.gerrit.server.git.ReceiveCommitsRefFilter
>
> at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:134)
> ... 13 more
> Caused by: org.eclipse.jgit.errors.UnpackException: Exception while parsing
> pack stream
>  at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:702)
> at org.eclipse.jgit.transport.ReceivePack.receive(ReceivePack.java:600)
>  at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:90)
> ... 13 more
> Caused by: java.io.EOFException: Short read of block.
>  at org.eclipse.jgit.util.IO.readFully(IO.java:218)
> at
> org.eclipse.jgit.storage.file.UnpackedObject.open(UnpackedObject.java:108)
>  at
> org.eclipse.jgit.storage.file.ObjectDirectory.openObject2(ObjectDirectory.j ava:537)
> at
> org.eclipse.jgit.storage.file.ObjectDirectory.openObject1(ObjectDirectory.j ava:428)
>  at
> org.eclipse.jgit.storage.file.FileObjectDatabase.openObjectImpl1(FileObject Database.java:172)
> at
> org.eclipse.jgit.storage.file.FileObjectDatabase.openObject(FileObjectDatab ase.java:157)
>  at org.eclipse.jgit.storage.file.WindowCursor.open(WindowCursor.java:122)
> at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:228)
>  at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:811)
> at
> org.eclipse.jgit.transport.ReceivePack.checkConnectivity(ReceivePack.java:8 71)
>  at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:666)
> ... 15 more
>
>
>
>
>
>
>
> On Thu, Sep 22, 2011 at 3:12 PM, Shawn Pearce <s...@google.com> wrote:

Willie

unread,
Sep 22, 2011, 7:39:01 PM9/22/11
to Repo and Gerrit Discussion
A couple related questions:

1) Is the data stored in refs/notes/review necessary for Gerrit
operation?

2) Is the data stored in refs/notes/review stored elsewhere (such as
the H2 database)?

Shawn Pearce

unread,
Sep 22, 2011, 7:50:44 PM9/22/11
to Willie, Repo and Gerrit Discussion
On Thu, Sep 22, 2011 at 16:39, Willie <bigwill...@gmail.com> wrote:
> A couple related questions:
>
> 1) Is the data stored in refs/notes/review necessary for Gerrit
> operation?

No, its exported to give you a record in Git of what has been submitted.

> 2) Is the data stored in refs/notes/review stored elsewhere (such as
> the H2 database)?

Yes, its a copy of the submitted change data from the H2 database.
There is a program you can run to re-export everything to the
notes/review branch:

http://gerrit-documentation.googlecode.com/svn/Documentation/2.2.0/pgm-ExportReviewNotes.html

Willie Williams

unread,
Sep 23, 2011, 1:29:28 PM9/23/11
to Shawn Pearce, Repo and Gerrit Discussion
Hey Shawn,

Thanks a ton for your help on this.  ExportReviewNotes worked like a charm.
Reply all
Reply to author
Forward
0 new messages