New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 774749 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocked on:
issue 776846



Sign in to add a comment

InitSDK failure with Download failed with certificate error? Try "sudo c_rehash"

Project Member Reported by dgarr...@chromium.org, Oct 14 2017

Issue description

We had a couple of reports of PreCQ flake failures like this:


https://luci-milo.appspot.com/buildbot/chromiumos.tryserver/no_vmtest_pre_cq/147878



17:27:44: INFO: RunCommand: /b/c/cbuild/repository/chromium/tools/depot_tools/ensure_bootstrap in /b/c/cbuild/repository/chromium/tools/depot_tools
Bootstrapping cipd client for linux-amd64 from https://chrome-infra-packages.appspot.com/client?platform=linux-amd64&version=git_revision:0aa5e4d06ec4d3b90980fcb0d0b7c34a5e65b9e1...
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
/b/c/cbuild/repository/chromium/tools/depot_tools/vpython: line 12: /b/c/cbuild/repository/chromium/tools/depot_tools/.cipd_bin/vpython: No such file or directory
17:27:46: INFO: RunCommand: /b/c/cbuild/repository/chromite/bin/cros_sdk --buildbot-log-version --nouse-image --create --replace in /b/c/cbuild/repository
17:27:46: NOTICE: Deleting chroot.

STEP_TEXT: 2017.10.12.072709
17:27:47: NOTICE: Downloading SDK tarball...
cros_sdk: Unhandled exception:
Traceback (most recent call last):
  File "/b/c/cbuild/repository/chromite/bin/cros_sdk", line 169, in <module>
    DoMain()
  File "/b/c/cbuild/repository/chromite/bin/cros_sdk", line 165, in DoMain
    commandline.ScriptWrapperMain(FindTarget)
  File "/b/c/cbuild/repository/chromite/lib/commandline.py", line 911, in ScriptWrapperMain
    ret = target(argv[1:])
  File "/b/c/cbuild/repository/chromite/scripts/cros_sdk.py", line 1115, in main
    sdk_cache, urls, 'stage3' if options.bootstrap else 'SDK')
  File "/b/c/cbuild/repository/chromite/scripts/cros_sdk.py", line 145, in FetchRemoteTarballs
    capture_output=True)
  File "/b/c/cbuild/repository/chromite/lib/retry_util.py", line 409, in RunCurl
    'Download failed with certificate error? Try "sudo c_rehash".')
chromite.lib.retry_util.DownloadError: Download failed with certificate error? Try "sudo c_rehash".
17:27:47: ERROR: 
return code: 1; command: /b/c/cbuild/repository/chromite/bin/cros_sdk --buildbot-log-version --nouse-image --create --replace
cmd=['/b/c/cbuild/repository/chromite/bin/cros_sdk', '--buildbot-log-version', '--nouse-image', '--create', '--replace'], cwd=/b/c/cbuild/repository, extra env={'USE': u'chrome_internal', 'FEATURES': 'separatedebug'}


 

Comment 2 by mar...@chromium.org, Oct 18 2017

Cc: hinoka@chromium.org
In the builds linked by Mike, the bot_update step is printing:
    return client.RunOnDeps('recurse', args, ignore_requirements=True,
AttributeError: 'NoneType' object has no attribute 'RunOnDeps'

I don't know if this error is expected, this would look like the .gclient/.gclient_entries files are broken. +Ryan for this. e.g.
https://logs.chromium.org/v/?s=chromeos%2Fbb%2Fchromiumos.tryserver%2Fno_vmtest_pre_cq%2F150239%2F%2B%2Frecipes%2Fsteps%2Fbot_update%2F0%2Fstdout


The rest of the failure is in chromite, e.g. https://logs.chromium.org/v/?s=chromeos%2Fbb%2Fchromiumos.tryserver%2Fno_vmtest_pre_cq%2F150239%2F%2B%2Frecipes%2Fsteps%2FInitSDK%2F0%2Fstdout


Project Member

Comment 3 by bugdroid1@chromium.org, Oct 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/depot_tools/+/e6e0641b1536d0b85d11d41977679ab5e562e564

commit e6e0641b1536d0b85d11d41977679ab5e562e564
Author: Marc-Antoine Ruel <maruel@chromium.org>
Date: Wed Oct 18 18:20:34 2017

gclient: print an error message instead of crashing

When 'gclient recurse' is called from a unconfigured directory.
No functional change otherwise.

R=agable@chromium.org
Bug:774749
Change-Id: Ifb2b74c042ce31faf3e1287c5614739e58e9178c
Reviewed-on: https://chromium-review.googlesource.com/726419
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>

[modify] https://crrev.com/e6e0641b1536d0b85d11d41977679ab5e562e564/gclient.py

Comment 4 by mar...@chromium.org, Oct 18 2017

The commit above is just to convert the crash observed into an error message, it is not fixing the problem, as I don't know what the problem is.

Comment 5 by vapier@chromium.org, Oct 19 2017

the InitSDK failure is chromite code running curl outside of the CrOS chroot.  as in curl that's installed in bot distro.  i'm not sure there's anything we're doing there that'd affect curl's ability to process certificates.
I've looked through a bunch of builds and it doesn't really seem certificate-specific. That is, there seem to be a lot of failures, some on InitSDK, some elsewhere, and the ones on InitSDK aren't all suggesting "sudo c_rehash" either (which I tried locally on a bot, and it didn't actually help).

I'm seeing a whole of Pre-CQ failures on this now too, still looking...
Cc: iannucci@chromium.org
Obvious question is obvious, but... what version of cacert.pem is being used inside the chroot?
That file does not exist as a standalone file inside the chroot (or my workstation), but I could strongly expect it to be 100% consistent across all chroots associated with a given branch.
Blockedon: 776846
Owner: bpastene@chromium.org
Status: Assigned (was: Untriaged)
All the listed builds in #0 and #1 ran on build247-m2. Assuming that machine (and its certs) are corrupt, I filed bug 776846.

In the meantime, I've taken that machine offline so it shouldn't be corrupting precq runs.
Labels: -Pri-1 Pri-2
Machine has been reimaged and is back online. I'll watch it for any further failures. Down-grading pri in the meantime.
Status: Fixed (was: Assigned)
This seems fixed? Reopen if it isn't.

Comment 13 by dchan@chromium.org, Jan 22 2018

Status: archived (was: Fixed)

Comment 14 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)

Sign in to add a comment