New issue
Advanced search Search tips

Issue 642833 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

crcmod fails to build because of root file ownship

Project Member Reported by dgarr...@chromium.org, Aug 31 2016

Issue description

dgarrett$cbuildbot/run_tests
run_tests: Unhandled exception:
Traceback (most recent call last):
  File "cbuildbot/run_tests", line 164, in <module>
    commandline.ScriptWrapperMain(FindTarget)
  File "/usr/local/google/home/dgarrett/sand/quick/chromite/lib/commandline.py", line 834, in ScriptWrapperMain
    ret = target(argv[1:])
  File "/usr/local/google/home/dgarrett/sand/quick/chromite/cbuildbot/run_tests.py", line 513, in main
    gs.GSContext.GetDefaultGSUtilBin()
  File "/usr/local/google/home/dgarrett/sand/quick/chromite/lib/gs.py", line 286, in GetDefaultGSUtilBin
    cls._CompileCrcmod(ref.path)
  File "/usr/local/google/home/dgarrett/sand/quick/chromite/lib/gs.py", line 317, in _CompileCrcmod
    osutils.Touch(flag)
  File "/usr/local/google/home/dgarrett/sand/quick/chromite/lib/osutils.py", line 155, in Touch
    open(path, 'a').close()
IOError: [Errno 13] Permission denied: '/usr/local/google/home/dgarrett/sand/quick/.cache/common/gsutil_4.19.tar.gz/gsutil/third_party/crcmod/.chromite.tried.build'



dgarrett$ls -al ~/sand/quick/.cache/common/gsutil_4.19.tar.gz/gsutil/third_party/
total 64K
drwxr-xr-x 16 root eng 4.0K Apr 13 10:58 .
drwxr-xr-x  4 root eng 4.0K Jun 15 15:53 ..
drwxr-xr-x  4 root eng 4.0K Apr 13 11:10 apitools
drwxr-xr-x  6 root eng 4.0K Apr 13 11:10 boto
drwxr-xr-x  6 root eng 4.0K Apr 13 11:10 crcmod
drwxr-xr-x  3 root eng 4.0K Apr 13 11:10 crcmod_osx
drwxr-xr-x  3 root eng 4.0K Apr 13 11:10 gcs-oauth2-boto-plugin
drwxr-xr-x  5 root eng 4.0K Apr 13 11:10 httplib2
drwxr-xr-x  7 root eng 4.0K Apr 13 11:10 oauth2client
drwxr-xr-x  5 root eng 4.0K Apr 13 11:10 pyasn1
drwxr-xr-x  5 root eng 4.0K Apr 13 11:10 pyasn1-modules
drwxr-xr-x  3 root eng 4.0K Jun 15 15:53 python-gflags
drwxr-xr-x  3 root eng 4.0K Apr 13 11:10 retry-decorator
drwxr-xr-x  5 root eng 4.0K Apr 13 11:10 rsa
drwxr-xr-x  3 root eng 4.0K Jun 15 15:53 six
drwxr-xr-x  2 root eng 4.0K Jun 15 15:53 socksipy-branch

 
If I blow away the .cache directory for gsutil, then it's re-created without problems.

I this this will only happen for people that somehow created that directory as root owned before your crcmod CL landed, so maybe it's safe to tell people that hit the issue to just clear their caches and move on.

Comment 2 by vapier@chromium.org, Aug 31 2016

Status: Started (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/313fe7b9fc0fa30ab1e411d1a01f5c7e8ebdd38e

commit 313fe7b9fc0fa30ab1e411d1a01f5c7e8ebdd38e
Author: Mike Frysinger <vapier@chromium.org>
Date: Wed Aug 31 18:48:31 2016

gs: handle bad perms w/crcmod compile

If the permissions on the cached gsutil are not what we'd like (for
whatever reason), create the flag file as root and then return.

BUG= chromium:642833 
TEST=changed gsutil ownership to root and checked the code failed
TEST=ran gs_fetch_binpkg and the flag was created after this patch

Change-Id: I4d2a01658a280703fe42f6c9184c107df63ed1c4
Reviewed-on: https://chromium-review.googlesource.com/379175
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>

[modify] https://crrev.com/313fe7b9fc0fa30ab1e411d1a01f5c7e8ebdd38e/lib/gs.py

Status: Fixed (was: Started)

Comment 5 by dchan@chromium.org, Oct 7 2016

Labels: VerifyIn-55

Comment 6 by dchan@chromium.org, Oct 10 2016

Labels: -VerifyIn-55

Comment 7 by dchan@google.com, Nov 19 2016

Labels: VerifyIn-56

Comment 8 by dchan@google.com, Jan 21 2017

Labels: VerifyIn-57

Comment 9 by dchan@google.com, Mar 4 2017

Labels: VerifyIn-58

Comment 10 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 11 by dchan@google.com, May 30 2017

Labels: VerifyIn-60
Labels: VerifyIn-61

Comment 13 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)
Status: Fixed (was: Archived)

Sign in to add a comment