New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 864827 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Chameleon: The latest toolchain seems to break all C-language binaries

Project Member Reported by waihong@chromium.org, Jul 18

Issue description

All the binary files in chameleon bundle are broken:
  avsync
  histogram
  hpd_control
  pixeldump
  printer
  stream_server

They return "Segmentation fault" during runtime.
 
It blocks us releasing any new bundle. Have to stay using the stable version r230, i.e. http://crbug.com/852502
Cc: chihchung@chromium.org
Owner: yuhsuan@chromium.org
Status: Assigned (was: Untriaged)
Yuhsuan will take a look.
Thanks!
It is because our ARM compiler has new feature. It adds new section .relr.dyn in binary to compress its size. We use the new compiler to compile our binaries but the image of chameleon can not support it. Can see the site for details.
https://g3doc.corp.google.com/company/teams/language-platforms/compiler_optimizations/linker_optimizations/pie_dynamic_relocs.md?cl=head

The easier solution is to add -no-pie flag in Makefile. It works and these binaries can run normally in chameleon. The harder one is to update image of chameleon, it is more complicated and we don't need to do it now. 

So I will fix it temporarily by adding -no-pie flag.
I found the better way is to add --no-experimental-use-relr flag to disable the new feature.
Project Member

Comment 6 by bugdroid1@chromium.org, Jul 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/chameleon/+/8e8578be2310992db2aae404f3e108873e9d9412

commit 8e8578be2310992db2aae404f3e108873e9d9412
Author: Yu-Hsuan Hsu <yuhsuan@google.com>
Date: Tue Jul 31 06:08:13 2018

Makefile: append '--no-experimental-use-relr' to ldflags.

Due to compiler update, we need to add --no-experimental-use-relr flag
to disable new feature. So that binaries can run normally in the chameleon.

BUG= chromium:864827 
TEST=The binaries can run well in the chameleon

Change-Id: I2e8b5ae10b56a5f789a5cba85c75bd3c2f3fe02e
Reviewed-on: https://chromium-review.googlesource.com/1152837
Commit-Ready: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Tested-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>

[modify] https://crrev.com/8e8578be2310992db2aae404f3e108873e9d9412/Makefile

Status: Fixed (was: Assigned)
Hi Yuhsuan, did you also update the chameleon bundle to GS? The lab chameleon boards will also need this update.
Updated. Thanks for reminding!
Copy to kalin@ to have awareness, in case any failure, as a new chameleon bundle 0.0.2-r235 is updated to the GS.
Do we need to trigger the chameleon-updater in lab?
I think we can do it progressively. Update a small set of chameleons in the lab first.

Sign in to add a comment