error:"Unpack error, check server log","org.eclipse.jgit.errors.MissingObjectException: Missing tree..."

2,069 views
Skip to first unread message

Chunlin Zhang

unread,
Jul 13, 2011, 12:16:41 AM7/13/11
to repo-d...@googlegroups.com
We often meet with this kind of error these week,I have no idea about it.How can I do with this issue?
We use gerrit 2.1.6.1

[2011-07-13 12:02:07,980] ERROR com.google.gerrit.sshd.BaseCommand : Internal server error (user chens account 1000046) during gerrit receive-pack '/platform/vendor/mycompany'
com.google.gerrit.sshd.BaseCommand$Failure: fatal: Unpack error, check server log
        at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:134)
        at com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:104)
        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:395)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
        at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:324)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Unpack error on project "platform/vendor/lenovo":
  RefFilter: com.google.gerrit.server.git.ReceiveCommitsRefFilter@9a2f50class com.google.gerrit.server.git.ReceiveCommitsRefFilter

        at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:133)
        ... 13 more
Caused by: org.eclipse.jgit.errors.UnpackException: Exception while parsing pack stream
        at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:668)
        at org.eclipse.jgit.transport.ReceivePack.receive(ReceivePack.java:577)
        at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:89)
        ... 13 more
Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing tree ebe4cc402a417d2a91dbebc75902a37fb998cc5c
        at org.eclipse.jgit.transport.ReceivePack.checkConnectivity(ReceivePack.java:869)
        at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:632)
        ... 15 more

Rafael Rabelo

unread,
Jul 13, 2011, 1:33:40 PM7/13/11
to Repo and Gerrit Discussion
Hi.

Please, could you confirm if ebe4cc402a417d2a91dbebc75902a37fb998cc5c
appears in patch_sets database table and it does not exist in your git
repo file system (accessing in refs/changes/... ) ?

If your answer is yes I suggest you remove the patch_set row having
this sha-1, since in this case the referenced git object does not
exist.

BR,

Rafael

Chunlin Zhang

unread,
Jul 13, 2011, 9:26:23 PM7/13/11
to Repo and Gerrit Discussion
The developer report this issue have his change repo upload by another
developer in another computer,and it is OK this time.
And I have do the "Repository Repacking"(I don't know if it help to this issue).

I will try to examine refs/changes/ (in gerrit server?) next time this
issue happen.

> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
>

Chunlin Zhang

unread,
Jul 14, 2011, 2:20:42 AM7/14/11
to Repo and Gerrit Discussion
It happen again.

And I can not find this ebe4cc402a417d2a91dbebc75902a37fb998cc5c
anywhere,I search local .git,server side .git,use "git log --all|grep
ebe4",and all gerrit change ids.

What on earth this "tree ebe4cc402a417d2a91dbebc75902a37fb998cc5c" is???

Another infomation is when this issue happen,after "repo upload",it
show that "Writing objects: 100% (4521/4521), 76.32 MiB | 6.60 MiB/s,
done.",it is wired,because the patch is small,not more then
1Mbytes,and in the local there is just a patch compare with remote git
branch

'''
Counting objects: 4597, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1959/1959), done.
Writing objects: 100% (4521/4521), 76.32 MiB | 6.60 MiB/s, done.
Total 4521 (delta 1723), reused 4390 (delta 1664)
error: unpack failed: error Missing tree
ebe4cc402a417d2a91dbebc75902a37fb998cc5c


fatal: Unpack error, check server log

To ssh://che...@10.125.3.11:29418/platform/vendor/lenovo
! [remote rejected] lenovo -> refs/for/a60_dev (n/a (unpacker error))
error: failed to push some refs to
'ssh://ch...@10.125.3.11:29418/platform/vendor/mycompany'
'''

Chunlin Zhang

unread,
Jul 14, 2011, 3:18:28 AM7/14/11
to Repo and Gerrit Discussion, Rafael Rabelo
This time,after doing "repo sync" and rebase,the "repo upload" action is OK.
But I don't know if it works every time.

And this issue happen just after I config developer team 's acces
right to just access those branches they should access,before I just
simply config with all developer can access "refs/heads/*" .I don't
know if it is the reason.

Rafael Rabelo

unread,
Jul 14, 2011, 8:40:14 AM7/14/11
to Repo and Gerrit Discussion
Hi.

Actually I believe my question did not make all the sense :-(

The fact is that in 2.1.8 version I could reproduce a scenario that
maybe, somehow, could be related to this one you are talking about.
Let me describe it:

I have a project called a, and I grant Read Access +3 to refs/heads/*.
I have few commits, including a merge commit, the last one, and apply
tag to it. I push tags (I did not push the commit the tag was
associated with), since I have permission to do it. Gerrit code will
validate all descendant commit and the commit associated with the tag
if it (they) are not pushed yet. When validating it (them), it will
check to the merge commit if user is allowed to do so to refs/tags/
<tag-name> (this code was inserted by change https://review.source.android.com/#/c/21519
). It will reject it since the Read Access +3 permission is not
granted to refs/heads/*.

Notice before change 21519 this scenario could not happen.

I know the scenario described involve tags and merge commits. But
maybe it could be a hint to help us understanding your scenario. Or
maybe not.

BR,

Rafael

On Jul 14, 4:18 am, Chunlin Zhang <zhangchun...@gmail.com> wrote:
> This time,after doing "repo sync" and rebase,the "repo upload" action is OK.
> But I don't know if it works every time.
>
> And this issue happen just after I config developer team 's acces
> right to just access those branches they should access,before I just
> simply config with all developer can access "refs/heads/*" .I don't
> know if it is the reason.
>
> On Thu, Jul 14, 2011 at 2:20 PM, Chunlin Zhang <zhangchun...@gmail.com> wrote:
> > It happen again.
>
> > And I can not find this ebe4cc402a417d2a91dbebc75902a37fb998cc5c
> > anywhere,I search local .git,server side .git,use "git log --all|grep
> > ebe4",and all gerrit change ids.
>
> > What on earth this "tree ebe4cc402a417d2a91dbebc75902a37fb998cc5c" is???
>
> > Another infomation is when this issue happen,after "repo upload",it
> > show that "Writing objects: 100% (4521/4521), 76.32 MiB | 6.60 MiB/s,
> > done.",it is wired,because the patch is small,not more then
> > 1Mbytes,and in the local there is just a patch compare with remote git
> > branch
>
> > '''
> > Counting objects: 4597, done.
> > Delta compression using up to 4 threads.
> > Compressing objects: 100% (1959/1959), done.
> > Writing objects: 100% (4521/4521), 76.32 MiB | 6.60 MiB/s, done.
> > Total 4521 (delta 1723), reused 4390 (delta 1664)
> > error: unpack failed: error Missing tree
> > ebe4cc402a417d2a91dbebc75902a37fb998cc5c
> > fatal: Unpack error, check server log
> > To ssh://che...@10.125.3.11:29418/platform/vendor/lenovo
> >  ! [remote rejected] lenovo -> refs/for/a60_dev (n/a (unpacker error))
> > error: failed to push some refs to
> > 'ssh://ch...@10.125.3.11:29418/platform/vendor/mycompany'
> > '''
>
Reply all
Reply to author
Forward
0 new messages