cros_mirror script fails with "Exited sync due to fetch errors"

270 views
Skip to first unread message

Florian Priede

unread,
Feb 19, 2015, 5:32:52 AM2/19/15
to chromiu...@chromium.org
Hi everybody,

today I recognized that updating our local repository via cros_mirror script stopped working.
It worked yesterday. As I had a new VM in place, I started from scratch to verify and got the same result.

This is the last output (truncated):

[...]
 * [new branch]      toolchain-3428.65.B -> toolchain-3428.65.B
 * [new branch]      toolchain-3701.42.B -> toolchain-3701.42.B
 * [new branch]      toolchainA -> toolchainA
 * [new branch]      toolchainB -> toolchainB
 * [new tag]         toolchain-minor-verified -> toolchain-minor-verified
Fetching projects:  99% (131/132)
error: Exited sync due to fetch errors

The same output is produced by the machine, which worked fine yesterday.
Any suggestions or ideas?

/Florian

Mike Frysinger

unread,
Feb 19, 2015, 10:36:48 AM2/19/15
to Florian Priede, chromium-os-dev
you've deleted the part of the log that contained the error.  please rerun the command and look for the actual error.
-mike

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en


Florian Priede

unread,
Feb 19, 2015, 12:57:31 PM2/19/15
to chromiu...@chromium.org, floria...@gmail.com
Hi Mike,

the output appeared at the initial run without any further lines:

[...]
Fetching projects:  99% (131/132)
error: Exited sync due to fetch errors

A second run gave this:

[...]
Fetching projects:  99% (131/132)  error: Trying to write non-commit object 97014a77e1652dec3f656298874ece1c4254f379 to branch refs/heads/stable-previous
 ! [new branch]      stable-previous -> stable-previous  (unable to update local ref)
error: Cannot fetch external/repo

error: Exited sync due to fetch errors

Both times I used this command  ./cros_mirror -r /home/dir -u git://IP_ADRESS


Mike Frysinger

unread,
Feb 19, 2015, 7:10:25 PM2/19/15
to Florian Priede, chromium-os-dev
On Thu, Feb 19, 2015 at 12:57 PM, Florian Priede <floria...@gmail.com> wrote:
the output appeared at the initial run without any further lines:

[...]
Fetching projects:  99% (131/132)
error: Exited sync due to fetch errors

i'm sure the error below was buried in there somewhere, just not at the end.  the sync runs many git clients in parallel by design.

A second run gave this:

[...]
Fetching projects:  99% (131/132)  error: Trying to write non-commit object 97014a77e1652dec3f656298874ece1c4254f379 to branch refs/heads/stable-previous
 ! [new branch]      stable-previous -> stable-previous  (unable to update local ref)
error: Cannot fetch external/repo

error: Exited sync due to fetch errors

you probably want to delete the repo.git in your checkout and sync again.  i don't know why it's dying in the first place though.
-mike

Hung-Te Lin

unread,
Feb 23, 2015, 10:35:34 PM2/23/15
to Mike Frysinger, Florian Priede, chromium-os-dev
I'm seeing exactly the same error, even after deleted repo.git.

 * [new branch]      maint      -> maint
 * [new branch]      master     -> master
 * [new branch]      stable     -> stable
 * [new branch]      stable-next -> stable-next
error: Trying to write non-commit object 97014a77e1652dec3f656298874ece1c4254f379 to branch refs/heads/stable-previous
error: Cannot update the ref 'refs/heads/stable-previous'.
 ! [new branch]      stable-previous -> stable-previous  (unable to update local ref)

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.

Florian Priede

unread,
Feb 24, 2015, 4:24:04 AM2/24/15
to chromiu...@chromium.org, vap...@chromium.org, floria...@gmail.com
Hi Mike,

I followed your advise and wiped the .repo.git directory. After syncing again, I run into the same error, with exactly the same message as Lin Hung-Te.
Same with a freshly installed VM. Both fail with:

Fetching projects:  99% (132/133)  error: Trying to write non-commit object 97014a77e1652dec3f656298874ece1c4254f379 to branch refs/heads/stable-previous
 ! [neuer Zweig]     stable-previous -> stable-previous  (kann lokale Referenz nicht aktualisieren)
error: Cannot fetch external/repo

error: Exited sync due to fetch errors

I assume, there is an issue with the cros_mirros script in addition with the repo. But I have no clue.
I will need to change all clients to sync via google repo again until this works.


Nevertheless, do you have any further ideas?

Regards,
Florian

Hung-Te Lin

unread,
Feb 24, 2015, 4:38:32 AM2/24/15
to Florian Priede, Chromium OS dev, Mike Frysinger
I think there's nothing wrong in cros_mirror script since you can simply reproduce this by running "repo sync" in the mirror folder.
Should be a problem in external/repo.git although I'm not sure how to fix it.

Florian Priede

unread,
Feb 25, 2015, 8:22:58 AM2/25/15
to chromiu...@chromium.org, floria...@gmail.com, vap...@chromium.org
Hi Lin,

I agree, that there is something wrong with external/repo.git.
I tried to force the sync (repo sync -f) which produces the same error, but somewhat finishes the checkout. Nevertheless the checkout is incomplete.

I think, we have to wait... 

Daniel Jacques

unread,
Feb 26, 2015, 12:16:27 AM2/26/15
to chromiu...@chromium.org, floria...@gmail.com, vap...@chromium.org
We encountered this problem on one of our infrastructure bots. I solved the problem in the local checkout by manually intervening (see https://code.google.com/p/chromium/issues/detail?id=461724). There is still a root problem with the repository (or repo), but I haven't delved that far into it yet. I'm hoping that the fix in the linked bug will get you working again in the meantime.

Summary: open up <path/to/checkout>/external/repo/packed-refs" and add the following lines:
97014a77e1652dec3f656298874ece1c4254f379 refs/heads/stable-previous                                                                                                                                                                            
^0cbde1e5dca1b2f19827ff57b59520a1f87ea967

You're effectively manually updating the refs, which Git isn't (for a yet-unknown reason) able to do. I suspect the problem has something to do with an annotated tag pushed as a ref in refs/heads.

Mike Frysinger

unread,
Jul 29, 2015, 2:33:32 AM7/29/15
to Daniel Jacques, chromium-os-dev, Florian Priede
yes, it looks like stable-previous was created pointing to an annotated tag instead of a normal commit.  i've deleted the branch and re-created it pointing to the commit instead of the annotated tag that pointed to the commit.  the sync script now works for me.
-mike
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages