Sometimes need to clobber /usr/local/portage/crossdev/.configured.json |
|||||||||||||
Issue description
I've seen some cases where things die when trying to build in the chroot. In one case I did build_packages and saw:
Starting fast-emerge.
Building package cross-aarch64-cros-linux-gnu/binutils cross-aarch64-cros-linux-gnu/gcc cross-aarch64-cros-linux-gnu/gdb on root
Calculating deps...
Deps calculated in 0m3.2s
Done
cros_setup_toolchains: Unhandled exception:
Traceback (most recent call last):
File "/home/dianders/trunk/chromite/bin/cros_setup_toolchains", line 164, in <module>
commandline.ScriptWrapperMain(FindTarget)
File "/mnt/host/source/chromite/lib/commandline.py", line 834, in ScriptWrapperMain
ret = target(argv[1:])
File "/mnt/host/source/chromite/scripts/cros_setup_toolchains.py", line 1146, in main
root=root)
File "/mnt/host/source/chromite/scripts/cros_setup_toolchains.py", line 652, in UpdateToolchains
SelectActiveToolchains(targets, CONFIG_TARGET_SUFFIXES, root=root)
File "/mnt/host/source/chromite/scripts/cros_setup_toolchains.py", line 548, in SelectActiveToolchains
desired = desired_num[0]
IndexError: list index out of range
---
This was fixed (at vapier's suggestion) with:
sudo rm /usr/local/portage/crossdev/.configured.json
---
Others have seen this too.
,
Jul 11 2016
I hit the same issue today in setup_board. I tried with several different boards and tried exiting & re-entering the chroot and running repo sync.
Removing /usr/local/portage/crossdev/.configured.json inside the chroot fixed the issue for me too.
Full output is attached. Snippet below.
Starting fast-emerge.
Building package cross-x86_64-cros-linux-gnu/binutils sys-devel/llvm cross-x86_64-cros-linux-gnu/gcc cross-x86_64-cros-linux-gnu/go cross-x86_64-cros-linux-gnu/linux-headers on root
Calculating deps...
Deps calculated in 0m4.0s
Done
cros_setup_toolchains: Unhandled exception:
Traceback (most recent call last):
File "/mnt/host/source/chromite/bin/cros_setup_toolchains", line 164, in <module>
commandline.ScriptWrapperMain(FindTarget)
File "/mnt/host/source/chromite/lib/commandline.py", line 834, in ScriptWrapperMain
ret = target(argv[1:])
File "/mnt/host/source/chromite/scripts/cros_setup_toolchains.py", line 1144, in main
root=root)
File "/mnt/host/source/chromite/scripts/cros_setup_toolchains.py", line 650, in UpdateToolchains
SelectActiveToolchains(targets, CONFIG_TARGET_SUFFIXES, root=root)
File "/mnt/host/source/chromite/scripts/cros_setup_toolchains.py", line 546, in SelectActiveToolchains
desired = desired_num[0]
IndexError: list index out of range
,
Sep 9 2016
Issue https://code.google.com/p/chrome-os-partner/issues/detail?id=57176 has been merged into this issue.
,
Sep 9 2016
can someone who is still hitting this attach their /usr/local/portage/crossdev/.configured.json so i don't have to reverse engineer a broken one ?
,
Sep 9 2016
re:#4 sorry the file was already removed as per the workaround. I just looked at my terminal buffer history, but instead of doing a "cat" I did a "vi" before the "rm".
,
Sep 16 2016
I ran update_chroot and got the same error. json cache attached.
,
Sep 20 2016
looks like you got caught in the middle of the llvm work. rather than try to add logic to the script to detect these specific bad json files, it'll prob be easier to just upgrade crossdev -- the cache logic will automatically regen whenever the crossdev version is updated.
,
Sep 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/chromite/+/3bba503bbb6cd7946868211bb3eef822a3ad3a2b commit 3bba503bbb6cd7946868211bb3eef822a3ad3a2b Author: Mike Frysinger <vapier@chromium.org> Date: Tue Sep 20 18:15:04 2016 cros_setup_toolchains: improve logging output No real functional changes here, just adding more logging calls to make --debug easier to get useful info out of. BUG= chromium:626413 TEST=`./update_chroot` still works TEST=`cros_setup_toolchains --targets=boards --include-boards=amd64-generic --debug` logs more useful info Change-Id: I01140127dd725ab6f02045dfda156b5581e0204d Reviewed-on: https://chromium-review.googlesource.com/386947 Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/3bba503bbb6cd7946868211bb3eef822a3ad3a2b/scripts/cros_setup_toolchains.py
,
Sep 26 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/f74580a0b92d13a754287b21f4774aa8eb023d04 commit f74580a0b92d13a754287b21f4774aa8eb023d04 Author: Mike Frysinger <vapier@chromium.org> Date: Tue Sep 20 18:18:01 2016 crossdev: upgraded package to upstream Upgraded sys-devel/crossdev to version 20160602 for all. Sync to the latest to force a cache refresh (see bug). BUG= chromium:626413 TEST=chromiumos-sdk bot passes Change-Id: I09605fa3fee53c078f0db84158484cbae5f546f5 Reviewed-on: https://chromium-review.googlesource.com/386946 Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Yunlian Jiang <yunlian@chromium.org> [add] https://crrev.com/f74580a0b92d13a754287b21f4774aa8eb023d04/sys-devel/crossdev/files/use-new-path-for-functions.sh.patch [modify] https://crrev.com/f74580a0b92d13a754287b21f4774aa8eb023d04/sys-devel/crossdev/Manifest [modify] https://crrev.com/f74580a0b92d13a754287b21f4774aa8eb023d04/sys-devel/crossdev/metadata.xml [rename] https://crrev.com/f74580a0b92d13a754287b21f4774aa8eb023d04/sys-devel/crossdev/crossdev-20160602.ebuild
,
Sep 26 2016
ToT builds should get a new crossdev which should force a regen of the cache file for everyone
,
Oct 7 2016
,
Oct 10 2016
,
Oct 13 2016
I can see this error while board set up in chroot(./setup_board --board=cyan).
Starting fast-emerge.
Building package sys-devel/llvm on root
Calculating deps...
Deps calculated in 0m5.2s
Done
cros_setup_toolchains: Unhandled exception:
Traceback (most recent call last):
File "/mnt/host/source/chromite/bin/cros_setup_toolchains", line 168, in <module>
DoMain()
File "/mnt/host/source/chromite/bin/cros_setup_toolchains", line 164, in DoMain
commandline.ScriptWrapperMain(FindTarget)
File "/mnt/host/source/chromite/lib/commandline.py", line 834, in ScriptWrapperMain
ret = target(argv[1:])
File "/mnt/host/source/chromite/scripts/cros_setup_toolchains.py", line 1200, in main
root=root)
File "/mnt/host/source/chromite/scripts/cros_setup_toolchains.py", line 662, in UpdateToolchains
SelectActiveToolchains(targets, CONFIG_TARGET_SUFFIXES, root=root)
File "/mnt/host/source/chromite/scripts/cros_setup_toolchains.py", line 558, in SelectActiveToolchains
desired = desired_num[0]
IndexError: list index out of range
ERROR : Thu Oct 13 10:55:45 PDT 2016
ERROR : PGID PPID PID ELAPSED TIME %CPU COMMAND
ERROR : 10 6 10 01:54 00:00:00 0.1 -bash
ERROR : 3095 10 3095 00:15 00:00:00 0.7 \_ /bin/bash ./setup_board --board=cyan
ERROR : 3095 3095 3310 00:15 00:00:00 0.4 \_ /bin/bash /mnt/host/source/src/scripts/update_chroot --toolchain_boards=cyan --usepkg
ERROR : 3095 3310 4443 00:00 00:00:00 0.0 \_ /bin/bash /mnt/host/source/src/scripts/update_chroot --toolchain_boards=cyan --usepkg
ERROR : 3095 4443 4444 00:00 00:00:00 0.0 \_ ps f -o pgid,ppid,pid,etime,cputime,%cpu,command
ERROR : Arguments of 3310: '--toolchain_boards=cyan' '--usepkg'
ERROR : Backtrace: (most recent call is last)
ERROR : update_chroot:83:main(), called: die_err_trap
ERROR :
ERROR : Command failed:
ERROR : Command 'sudo -E $(type -p cros_setup_toolchains) "${TOOLCHAIN_FLAGS[@]}"' exited with nonzero code: 1
ERROR : Thu Oct 13 10:55:45 PDT 2016
ERROR : PGID PPID PID ELAPSED TIME %CPU COMMAND
ERROR : 10 6 10 01:54 00:00:00 0.1 -bash
ERROR : 3095 10 3095 00:15 00:00:00 0.7 \_ /bin/bash ./setup_board --board=cyan
ERROR : 3095 3095 4457 00:00 00:00:00 0.0 \_ /bin/bash ./setup_board --board=cyan
ERROR : 3095 4457 4458 00:00 00:00:00 0.0 \_ ps f -o pgid,ppid,pid,etime,cputime,%cpu,command
ERROR : Arguments of 3095: ./setup_board '--board=cyan'
ERROR : Backtrace: (most recent call is last)
ERROR : setup_board:108:main(), called: die_err_trap
ERROR :
ERROR : Command failed:
ERROR : Command '"${SRC_ROOT}/scripts"/update_chroot ${UPDATE_ARGS}' exited with nonzero code: 1
ERROR : (Note bash sometimes misreports "command not found" as exit code 1 instead of 127)
also observed same error by trying ./update_chroot.
,
Oct 13 2016
attach your .configured.json file please what version of crossdev do you have installed ?
,
Oct 13 2016
After deleting "sudo rm /usr/local/portage/crossdev/.configured.json" it is working fine.
,
Oct 13 2016
Sorry I have deleted file after getting that error and updated #15 comment lately. Output of "crossdev --version" is crossdev-20160602.
,
Nov 19 2016
,
Jan 21 2017
,
Mar 4 2017
,
Apr 17 2017
,
May 30 2017
,
Aug 1 2017
,
Aug 3 2017
Closing. Please reopen it if its not fixed. Thanks! |
|||||||||||||
►
Sign in to add a comment |
|||||||||||||
Comment 1 by allada@chromium.org
, Jul 7 2016