New issue
Advanced search Search tips

Issue 897981 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Chrome
Pri: 3
Type: Bug



Sign in to add a comment

cros_mark_as_stable fails on cleanup when running locally

Project Member Reported by ahass...@chromium.org, Oct 22

Issue description

It fails on cleanup but it actually does the commit job. So it is not severe but would be good to get fixed.

(cr) ahassani@ahassani ~/trunk/src $ cros_mark_as_stable --force -p "dev-util/puffin:dev-util/bsdiff" -
o third_party/chromiumos-overlay/  -- commit
16:50:40: INFO: Determining whether to create new ebuild /mnt/host/source/src/third_party/chromiumos-overlay/dev-util/bsdiff/bsdiff-4.3.1-r19.ebuild
16:50:40: INFO: Creating new stable ebuild /mnt/host/source/src/third_party/chromiumos-overlay/dev-util/bsdiff/bsdiff-4.3.1-r19.ebuild
16:50:40: INFO: New ebuild commit id: ("7f19f4e88f0962ae2baf9e247106ae5957eb4aa3" "e80e2243950174015342af10a97cec3a84fec068")
16:50:40: INFO: Determining whether to create new ebuild /mnt/host/source/src/third_party/chromiumos-overlay/dev-util/puffin/puffin-1.0.0-r425.ebuild
16:50:40: INFO: Creating new stable ebuild /mnt/host/source/src/third_party/chromiumos-overlay/dev-util/puffin/puffin-1.0.0-r425.ebuild
16:50:40: INFO: New ebuild commit id: ("7f19f4e88f0962ae2baf9e247106ae5957eb4aa3" "f0bad1d0035d5045eac9d9e895239fc712d07715")
16:50:40: INFO: Adding new stable ebuild paths ['/mnt/host/source/src/third_party/chromiumos-overlay/dev-util/puffin/puffin-1.0.0-r425.ebuild', '/mnt/host/source/src/third_party/chromiumos-overlay/dev-util/bsdiff/bsdiff-4.3.1-r19.ebuild'] in overlay /mnt/host/source/src/third_party/chromiumos-overlay.
16:50:40: INFO: Removing old ebuild paths ['/mnt/host/source/src/third_party/chromiumos-overlay/dev-util/puffin/puffin-1.0.0-r424.ebuild', '/mnt/host/source/src/third_party/chromiumos-overlay/dev-util/bsdiff/bsdiff-4.3.1-r18.ebuild'] in overlay /mnt/host/source/src/third_party/chromiumos-overlay.
16:50:40: INFO: Committing changes with commit message: Marking 9999 ebuild for dev-util/puffin as stable.

Marking 9999 ebuild for dev-util/bsdiff as stable.
16:50:40: INFO: Cleaning up stale packages ['=dev-util/puffin-1.0.0-r425', '=dev-util/bsdiff-4.3.1-r19'].
cros_mark_as_stable: Unhandled exception:
Traceback (most recent call last):
  File "/mnt/host/source/chromite/bin/cros_mark_as_stable", line 169, in <module>
    DoMain()
  File "/mnt/host/source/chromite/bin/cros_mark_as_stable", line 165, in DoMain
    commandline.ScriptWrapperMain(FindTarget)
  File "/mnt/host/source/chromite/lib/commandline.py", line 912, in ScriptWrapperMain
    ret = target(argv[1:])
  File "/mnt/host/source/chromite/scripts/cros_mark_as_stable.py", line 306, in main
    git_project_overlays, manifest, package_list)
  File "/mnt/host/source/chromite/scripts/cros_mark_as_stable.py", line 372, in _WorkOnCommit
    new_package_atoms)
  File "/mnt/host/source/chromite/scripts/cros_mark_as_stable.py", line 80, in CleanStalePackages
    parallel.RunTasksInProcessPool(_CleanStalePackages, tasks)
  File "/mnt/host/source/chromite/lib/parallel.py", line 809, in RunTasksInProcessPool
    queue.put((idx, input_args))
  File "/usr/lib64/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/mnt/host/source/chromite/lib/parallel.py", line 750, in BackgroundTaskRunner
    queue.put(_AllTasksComplete())
  File "/mnt/host/source/chromite/lib/parallel.py", line 750, in BackgroundTaskRunner
    queue.put(_AllTasksComplete())
  File "/usr/lib64/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/mnt/host/source/chromite/lib/parallel.py", line 561, in ParallelTasks
    raise BackgroundFailure(exc_infos=errors)
chromite.lib.parallel.BackgroundFailure: <type 'exceptions.TypeError'>: can only concatenate list (not "ListProxy") to list
Traceback (most recent call last):
  File "/mnt/host/source/chromite/lib/parallel.py", line 602, in TaskRunner
    task(*x, **task_kwargs)
  File "/mnt/host/source/chromite/lib/parallel.py", line 800, in <lambda>
    fn = lambda idx, task_args: out_queue.put((idx, task(*task_args)))
  File "/mnt/host/source/chromite/scripts/cros_mark_as_stable.py", line 66, in _CleanStalePackages
    result = runcmd([emerge, '-q', '--unmerge'] + package_atoms,
TypeError: can only concatenate list (not "ListProxy") to list

 
Owner: dgarr...@chromium.org
looks like it was introduced with:
  https://chromium-review.googlesource.com/1171906

commit 4fef8c3ba87ad27df1544cd2f1bd026ab4340325 (HEAD)
Author: Don Garrett <dgarrett@google.com>
Date:   Fri Aug 10 18:04:01 2018 -0700

    cros_mark_as_stable: Switch --srcroot to --buildroot.
My first attempt to reproduce failed (well, didn't crash). Looking at code for answers.
it reproduced for me pretty regularly.  you do have to nuke the branch after each run.  here's what i used:
cros_sdk
cd ../third_party/chromiumos-overlay
git checkout HEAD^; git branch -D stabilizing_branch; cros_mark_as_stable --force -p "dev-util/puffin:dev-util/bsdiff" -o . -- commit

then i re-run that git+cros_mark_as_stable command everytime to retest.
Thanks! Using that, I was able to validate https://crrev.com/c/1297113.
Status: Started (was: Unconfirmed)
Not sure if this is related to this or not but it seems like it doesn't calculate the CROS_WORKON_TREE either. Exapmle, the second patch in:
https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/1295293/2/dev-util/puffin/puffin-1.0.0-r425.ebuild

Which is totally wrong! It has three values instead of two in the tuple.


I don't know enough to evaluate that. My CL was sorta monkey see / monkey do, not based on deep understanding.
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 24

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

commit 7100fff13dd034bce875aeb1e3c3a28a2831bada
Author: Don Garrett <dgarrett@google.com>
Date: Wed Oct 24 20:03:03 2018

cros_mark_as_stable: Force list type.

cros_mark_as_stable would fail with this assertion:

TypeError: can only concatenate list (not "ListProxy") to list

So... force the variable in question to be a list when concatenating
as a reasonable guess at a fit.

BUG=chromium:897981
TEST=run_tests
     manual reproduction based on vapier's instructions.

Change-Id: I88fb319951b889db4c1276e4f7edead38b907827
Reviewed-on: https://chromium-review.googlesource.com/1297113
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>

[modify] https://crrev.com/7100fff13dd034bce875aeb1e3c3a28a2831bada/scripts/cros_mark_as_stable.py

Is your second problem reproducing on builders, or only locally?
Locally, here is the command I run:

cros_mark_as_stable --force -p "dev-util/puffin:dev-util/bsdiff" -o ../../third_party/chromiumos-overlay/  -- commit

I just did it and it reproduced easily.

Sign in to add a comment