New issue
Advanced search Search tips

Issue 853722 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 14
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

depot_tools gclient sync misidentifies multiprocessing lock file failure and network download failure

Reported by juj...@gmail.com, Jun 18 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0

Steps to reproduce the problem:
depot_tools\cipd.ps1 has the following code:

# Use a lock fle to prevent simultaneous processes from stepping on each other.
$cipd_lock = Join-Path $myPath -ChildPath '.cipd_client.lock'
while ($true) {
  $cipd_lock_file = $false
  try {
      $cipd_lock_file = [IO.File]::OpenWrite($cipd_lock)

      if (!(Test-Path $client)) {
          echo "Bootstrapping cipd client for $plat-$arch from $url..."

          $wc = (New-Object System.Net.WebClient)
          $wc.Headers.add('User-Agent', $user_agent)
          $wc.DownloadFile($url, $client) # (*)
      }
      break
  } catch {
      echo "CIPD lock is held, trying again after delay..."
      Start-Sleep -s 1
  } finally {
      if ($cipd_lock_file) {
          $cipd_lock_file.close()
      }
  }
}

What is the expected behavior?
If the line marked with a (*) fails, it should report "failed to download file, check your firewall and network connection". 

What went wrong?
Instead, if line marked with a (*) fails, it will report a bogus "CIPD lock is held, trying again after delay..." message, leading user to wild goose chase about multiple processes of gclient accessing same lock file.

Did this work before? N/A 

Chrome version: depot_tools  Channel: n/a
OS Version: 10.0
Flash Version:
 

Comment 1 by juj...@gmail.com, Jun 18 2018

Tried to report this against depot_tools, but for whatever reason it the bug reporter tool insisted on that I go through the wizard. Probably the bug will need relocating to find the right home.
Components: -Internals>Installer Infra
Components: -Infra Infra>SDK
Owner: vadimsh@chromium.org
Status: Assigned (was: Unconfirmed)
Vadim, git tells me you're the person to assign this to. 
Please let me know if that's not the case.
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 14

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

commit dfedcc0666fe3a7e655642ec3385ecb3fb6286c0
Author: Vadim Shtayura <vadimsh@chromium.org>
Date: Fri Sep 14 19:47:37 2018

[cipd] More careful error handling during CIPD bootstrap on Windows.

Errors during the download should be reported as such, not as "failed to grab
the lock file".

R=nodir@chromium.org, iannucci@chromium.org
BUG= 853722 

Change-Id: If24f4587693852eed0608450bcd311cf3bafd2c3
Reviewed-on: https://chromium-review.googlesource.com/1226106
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>

[modify] https://crrev.com/dfedcc0666fe3a7e655642ec3385ecb3fb6286c0/cipd.ps1

Status: Fixed (was: Assigned)
Should be fixed now. Sorry about the sloppiness.
Project Member

Comment 7 by bugdroid1@chromium.org, Sep 15

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/54ad986c611b372ea9e32d19ea11d3ae32e9fbec

commit 54ad986c611b372ea9e32d19ea11d3ae32e9fbec
Author: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com>
Date: Sat Sep 15 02:37:04 2018

Roll src/third_party/depot_tools 53f9d8726afd..2174136d2520 (2 commits)

https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/53f9d8726afd..2174136d2520


git log 53f9d8726afd..2174136d2520 --date=short --no-merges --format='%ad %ae %s'
2018-09-14 vadimsh@chromium.org [cipd] Add presubmit support for checking *.digests file.
2018-09-14 vadimsh@chromium.org [cipd] More careful error handling during CIPD bootstrap on Windows.


Created with:
  gclient setdep -r src/third_party/depot_tools@2174136d2520

The AutoRoll server is located here: https://autoroll.skia.org/r/depot-tools-chromium-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



BUG= chromium:870166 , chromium:853722 
TBR=agable@chromium.org

Change-Id: I07c6783b636aaf2b3f6ab2f2fe0bb2d120c2ea8d
Reviewed-on: https://chromium-review.googlesource.com/1227433
Reviewed-by: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#591567}
[modify] https://crrev.com/54ad986c611b372ea9e32d19ea11d3ae32e9fbec/DEPS

Sign in to add a comment