New issue
Advanced search Search tips

Issue 743114 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug



Sign in to add a comment

gclient sync errors on missing git revisions when checking out old code for bisect

Project Member Reported by jamescook@chromium.org, Jul 14 2017

Issue description

If I checkout older code (~January 2017) for a bisect and run gclient sync I get a bunch of errors like this:

git co 5374fbd4595be5190f3b9f93bb5aaafbdaef426f
gclient sync

src/third_party/sfntly/src (ERROR)
----------------------------------------
[0:00:01] Started.
----------------------------------------
Error: Command 'git checkout --quiet 1ef790afdd7818c1a3c76b18daacff14fdb983aa' returned non-zero exit status 128 in /x/chrome/src/third_party/sfntly/src
fatal: reference is not a tree: 1ef790afdd7818c1a3c76b18daacff14fdb983aa

It really ought to "just work". If it can't just work there should be a gclient flag like "--keep-going" so I can list all the busted directories at once and delete them to force a re-fetch.

 
Cc: aga...@chromium.org tandrii@chromium.org
Components: -Infra Infra>Git
Labels: -Pri-2 OS-All Pri-1

Comment 2 by aga...@chromium.org, Jul 19 2017

Owner: aga...@chromium.org
Status: WontFix (was: Untriaged)
That hash clearly does exist in the sfntly repo: https://chromium.googlesource.com/external/github.com/googlei18n/sfntly/+/1ef790afdd7818c1a3c76b18daacff14fdb983aa

And that hash is reachable from refs/heads/master, so it isn't that the repo has rewritten history or anything like that:
https://chromium.googlesource.com/external/github.com/googlei18n/sfntly/+log/1ef790afdd7818c1a3c76b18daacff14fdb983aa~..master

And that repo+hash is the correct thing for the src.git revision you chose to try to check out:
https://chromium.googlesource.com/chromium/src/+/5374fbd4595be5190f3b9f93bb5aaafbdaef426f/DEPS#170

So it seems more like something is corrupt in your local checkout. When your sfntly repo runs "git fetch", it reports that it already has object 1ef..., so it doesn't fetch it again. But when it tries to check it out, it fails, because your copy of that object is corrupt.

This hypothesis is backed up by the fact that I can checkout that revision and then gclient sync on my own machine cleanly.
I suspect this happened due to a shallow-fetch on my part sometime in the distant past.

I can reproduce it with this:
 7565  [2017-07-20 09:28:59 -0700] fetch --nohooks --no-history chromium
 7566  [2017-07-20 09:40:03 -0700] cd src
 7568  [2017-07-20 09:40:24 -0700] git co 5374fbd4595be5190f3b9f93bb5aaafbdaef426f
# Error because I didn't fetch history - whoops!
 7570  [2017-07-20 09:40:37 -0700] git rebase-update && gclient sync
# Appears to pull full history, but maybe only for the main repo?
# Sync runs fine
 7571  [2017-07-20 12:33:09 -0700] git co 5374fbd4595be5190f3b9f93bb5aaafbdaef426f
# Works fine
 7572  [2017-07-20 12:33:27 -0700] gclient sync
# Error

src/breakpad/src (ERROR)
----------------------------------------
[0:00:00] Started.
----------------------------------------
Error: Command 'git checkout --quiet 0e618edbe53593064efd4bfd9316d77731bdc593' returned non-zero exit status 128 in /usr/local/google/home/jamescook/chrome/src/breakpad/src
fatal: reference is not a tree: 0e618edbe53593064efd4bfd9316d77731bdc593

Everything works fine with a fresh checkout with history.

I dunno if we could be more clever about error messages here. I had a hard time figuring this out because most sub-repos work OK.

Sign in to add a comment