Issue metadata
Sign in to add a comment
|
deploy_chrome --mount-dir error: "Cannot run an array command with a shell" |
||||||||||||||||||||
Issue description
When running deploy_chrome, I'm getting an unexpected error. This was working for me yesterday. Output below:
(sdk eve R63-9970.0.0) khorimoto@khorimoto /usr/local/google/chromium/src $ deploy_chrome --build-dir=out_${SDK_BOARD}/Release --to=${MYDEVICE} --target-dir=/usr/local/chrome --mount-dir=/opt/google/chrome --nostrip
13:51:35: INFO: GN_ARGS taken from environment: {'use_ozone': True, 'custom_toolchain': '//build/toolchain/cros:target', 'use_vaapi': True, 'ozone_platform_gbm': True, 'allow_posix_link_time_opt': False, 'use_system_libsync': True, 'use_v4lplugin': False, 'clang_use_chrome_plugins': False, 'cros_v8_snapshot_ar': '/usr/local/google/chromium/src/third_party/binutils/Linux_x64/Release/bin/ar', 'use_cups': True, 'use_system_harfbuzz': True, 'use_evdev_gestures': True, 'use_goma': True, 'cros_v8_snapshot_extra_cxxflags': ' -Wno-unknown-warning-option', 'cros_host_is_clang': True, 'cros_target_ar': 'x86_64-cros-linux-gnu-ar', 'cros_host_cxx': '/usr/local/google/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++', 'symbol_level': 2, 'cros_host_extra_cppflags': '', 'cros_target_extra_cxxflags': '-pipe -pipe -pipe -march=corei7 -fno-split-dwarf-inlining -D__google_stl_debug_vector=1 -Wno-unknown-warning-option -Wno-inline-asm', 'cros_target_extra_cflags': '-pipe -pipe -march=corei7 -fno-split-dwarf-inlining -Wno-unknown-warning-option -Wno-inline-asm', 'cros_v8_snapshot_extra_cflags': ' -Wno-unknown-warning-option', 'system_libdir': 'lib64', 'use_cras': True, 'use_system_minigbm': True, 'v8_snapshot_toolchain': '//build/toolchain/cros:v8_snapshot', 'use_system_freetype': True, 'cros_v8_snapshot_cxx': '/usr/local/google/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++', 'is_clang': True, 'cros_v8_snapshot_is_clang': True, 'use_v4l2_codec': True, 'cros_host_extra_cflags': ' -Wno-unknown-warning-option', 'target_sysroot': '/usr/local/google/chromium/.cros_cache/chrome-sdk/tarballs/eve+9972.0.0+sysroot_chromeos-base_chromeos-chrome.tar.xz', 'cros_host_ar': '/usr/local/google/chromium/src/third_party/binutils/Linux_x64/Release/bin/ar', 'use_xkbcommon': True, 'treat_warnings_as_errors': False, 'icu_use_data_file': True, 'use_system_libdrm': True, 'cros_v8_snapshot_extra_ldflags': '', 'enable_nacl': True, 'linux_use_bundled_binutils': True, 'cros_v8_snapshot_ld': '/usr/local/google/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++', 'enable_remoting': True, 'host_toolchain': '//build/toolchain/cros:host', 'use_debug_fission': True, 'cros_target_ld': 'x86_64-cros-linux-gnu-clang++ -B/usr/local/google/chromium/.cros_cache/chrome-sdk/tarballs/eve+9972.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.27.0-gold -Wno-unknown-warning-option', 'target_os': 'chromeos', 'cros_host_cc': '/usr/local/google/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang', 'cros_host_extra_cxxflags': ' -Wno-unknown-warning-option', 'cros_target_extra_cppflags': '', 'ozone_auto_platforms': False, 'cros_host_extra_ldflags': '', 'target_cpu': 'x64', 'cros_target_extra_ldflags': '-Wl,-O1 -Wl,-O2 -Wl,--as-needed', 'host_pkg_config': 'pkg-config', 'is_asan': False, 'cros_target_cc': 'x86_64-cros-linux-gnu-clang -B/usr/local/google/chromium/.cros_cache/chrome-sdk/tarballs/eve+9972.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.27.0-gold -Wno-unknown-warning-option', 'is_debug': False, 'cros_host_ld': '/usr/local/google/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++', 'cros_v8_snapshot_extra_cppflags': '', 'ozone_platform': 'gbm', 'goma_dir': '/usr/local/google/chromium/.cros_cache/common/goma+2', 'cros_target_cxx': 'x86_64-cros-linux-gnu-clang++ -B/usr/local/google/chromium/.cros_cache/chrome-sdk/tarballs/eve+9972.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.27.0-gold -Wno-unknown-warning-option', 'use_thin_lto': False, 'cros_v8_snapshot_cc': '/usr/local/google/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang'}
13:51:35: INFO: Staging flags taken from USE in environment: highdpi
13:51:35: INFO: Testing connection to the device...
13:51:41: INFO: Mounting Chrome...
deploy_chrome: Unhandled exception:
Traceback (most recent call last):
File "/usr/local/google/chromium/src/third_party/chromite/bin/deploy_chrome", line 169, in <module>
DoMain()
File "/usr/local/google/chromium/src/third_party/chromite/bin/deploy_chrome", line 165, in DoMain
commandline.ScriptWrapperMain(FindTarget)
File "/usr/local/google/chromium/src/third_party/chromite/lib/commandline.py", line 911, in ScriptWrapperMain
ret = target(argv[1:])
File "/usr/local/google/chromium/src/third_party/chromite/scripts/deploy_chrome.py", line 659, in main
deploy.Perform()
File "/usr/local/google/chromium/src/third_party/chromite/scripts/deploy_chrome.py", line 357, in Perform
self._MountTarget()
File "/usr/local/google/chromium/src/third_party/chromite/scripts/deploy_chrome.py", line 322, in _MountTarget
self.device.RunCommand(cmd % {'dir': self.options.mount_dir}, shell=True)
File "/usr/local/google/chromium/src/third_party/chromite/lib/remote_access.py", line 959, in RunCommand
return self.BaseRunCommand(cmd, **kwargs)
File "/usr/local/google/chromium/src/third_party/chromite/lib/remote_access.py", line 906, in BaseRunCommand
return self.GetAgent().RemoteSh(cmd, **kwargs)
File "/usr/local/google/chromium/src/third_party/chromite/lib/remote_access.py", line 341, in RemoteSh
return cros_build_lib.RunCommand(ssh_cmd, **kwargs)
File "/usr/local/google/chromium/src/third_party/chromite/lib/cros_build_lib.py", line 560, in RunCommand
raise Exception('Cannot run an array command with a shell')
Exception: Cannot run an array command with a shell
,
Oct 11 2017
Looks like it was caused by https://crrev.com/c/697065, which added that error message. Let's get that CL reverted. Should the other be reverted as well (it seems it builds off of the first one)?
,
Oct 11 2017
CrOS isn't as revert happy as Chromium looks like RemoteDevice.RunCommand has never really expected a string here ... extra_env actually requires it. in this case we haven't happened to hit it, but i'll see about converting it.
,
Oct 11 2017
Okay - if reverting is not possible, this is a P0 issue since we can no longer flash with the Simple Chrome workflow.
,
Oct 11 2017
that's simply not true. this only comes up when using --mount-dir which is not the default.
,
Oct 11 2017
Ah, okay; I didn't realize there was a workaround. I'll omit that parameter until this issue is fixed then - thanks!
,
Oct 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/chromite/+/e7dc3d57cbebdd9866e9d488990c70f7b13ccd59 commit e7dc3d57cbebdd9866e9d488990c70f7b13ccd59 Author: Mike Frysinger <vapier@chromium.org> Date: Thu Oct 12 07:09:34 2017 deploy_chrome: convert umount logic away from shell=True This code path requires an array all the time, so just convert it away from using shell=True. BUG= chromium:773831 TEST=deploy_chrome w/--mount-dir passes Change-Id: Ia7cccdb83e7eb9e3e63fd773734e308c876dab2e Reviewed-on: https://chromium-review.googlesource.com/714024 Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> [modify] https://crrev.com/e7dc3d57cbebdd9866e9d488990c70f7b13ccd59/scripts/deploy_chrome.py
,
Oct 13 2017
should be all set in ToT now via https://chromium-review.googlesource.com/719237
,
Oct 13 2017
The corresponding chromite-for-chrome roll also just landed here: https://chromium-review.googlesource.com/c/chromium/src/+/719237 So hopefully ToT will be working again.
,
Oct 13 2017
Thanks for the quick fix! :)
,
Jan 22 2018
,
Jan 23 2018
|
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by derat@chromium.org
, Oct 11 2017Status: Assigned (was: Untriaged)