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

Issue 728751 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

chromeos-ec ERROR: ld.so: object 'libsandbox.so' from LD_PRELOAD cannot be preloaded

Project Member Reported by sjg@chromium.org, Jun 1 2017

Issue description

We should update the EC build to avoid this error.


Created from  crbug.com/636032 

From grundler@

sjg: I have a current example:
https://uberchromegw.corp.google.com/i/chromeos/builders/daisy_spring-release/builds/2487/steps/UnitTest/logs/stdio

chromeos-ec-0.0.1-r3867: ERROR: ld.so: object 'libsandbox.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

This build is loaded with these "ERROR"s.

It doesn't really matter if FEATURES="test" is triggering this. As sheriff, when I look through a build log to find the actual failure, I don't want to have to figure out which ERRORs have been ignored.


from vapier@

from sandbox's POV, things are WAI.  for this particular bug, i think it's a diff issue from what Luigi raised here.  that output looks like the chromeos-ec is doing stuff it shouldn't ... for example, all those "skipping incompatible" messages suggests the build is messed up.  probably want to file a sep bug for chromeos-ec.
 

Comment 1 by sjg@chromium.org, Jun 1 2017

Owner: la...@chromium.org

Comment 2 by la...@chromium.org, Jun 8 2017

The LD_PRELOAD errors are caused by the EC image signer being run with sudo, for reasons discussed here: http://crrev.com/c17c447a2574273e9baecacac5d1d827eb16ca3c
the build could be fixed to not use sudo.  sounds more like the system using the USB fob had misconfigured permissions and sudo was added as a hack instead of fixing the perms for the active user.

Comment 4 by sjg@chromium.org, Jun 8 2017

Cc: rspangler@chromium.org wfrichar@chromium.org
That's ugly.

What options do we have?
- Don't run with sudo in this case since there is no FOB (which I think means UBS stick)?
- Run with sudo but suppress the messages?

assuming it's just a USB device accessed via libusb, imo we should delete all the sudo logic and tell people to configure their systems correctly.  "my non-root user can't access USB devices" is an extremely common issue that one can Google for, and the answer is always to set up udev rules on that system to grant group write access to the right people based on VID/PID.

build tools shouldn't be running as root as the normal course of things.

Comment 6 by la...@chromium.org, Jun 8 2017

I attempted to suppress the messages with e.g. s/sudo/LD_PRELOAD='' sudo/g here [https://chromium.googlesource.com/chromiumos/platform/ec/+/master/Makefile.rules#64] but didn't have any luck, though I'm not clear on exactly how `quiet` is expanded/evaluated here:  [https://chromium.googlesource.com/chromiumos/platform/ec/+/master/Makefile.rules#320]

Comment 7 by la...@chromium.org, Jun 8 2017

Cc: vbendeb@chromium.org
vbendeb@: could you comment on the sudo requirement for signing images here?
Looks like this is from Cr50 signing.  +vbendeb
sandbox, by design, makes it very difficult to suppress those warnings :)
Cc: -vbendeb@chromium.org la...@chromium.org
Owner: vbendeb@chromium.org
the builder never uses fob, so sudo is not necessary when running on the builder.

let me take care of this.
Project Member

Comment 11 by bugdroid1@chromium.org, Jun 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/61b87c56b669eb10d546c6a3595726ec38a2eaa1

commit 61b87c56b669eb10d546c6a3595726ec38a2eaa1
Author: Vadim Bendebury <vbendeb@chromium.org>
Date: Fri Jun 09 01:52:40 2017

g: do not invoke signer with sudo unless it is necessary

Invoking signer with sudo is required only when signing requires a USB
fob. Let's not use it in unless necessary.

BRANCH=cr50
BUG= chromium:728751 
TEST=verified that Cr50 build succeeds when both using and not using
     the signing fob.

Change-Id: I8f40bd52f1752bfd88ec002f298b991faf7a2512
Reviewed-on: https://chromium-review.googlesource.com/528373
Commit-Ready: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>

[modify] https://crrev.com/61b87c56b669eb10d546c6a3595726ec38a2eaa1/chip/g/build.mk
[modify] https://crrev.com/61b87c56b669eb10d546c6a3595726ec38a2eaa1/Makefile.rules

Status: Fixed (was: Available)

Comment 13 by sjg@google.com, Jun 9 2017

Thanks Vadim!
Project Member

Comment 14 by bugdroid1@chromium.org, Jun 30 2017

Labels: merge-merged-firmware-cr50-9308.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/bf5c3c358e23dbe24587f8e3c020a00a5efc189e

commit bf5c3c358e23dbe24587f8e3c020a00a5efc189e
Author: Vadim Bendebury <vbendeb@chromium.org>
Date: Fri Jun 30 17:33:23 2017

g: do not invoke signer with sudo unless it is necessary

Invoking signer with sudo is required only when signing requires a USB
fob. Let's not use it in unless necessary.

BRANCH=cr50
BUG= chromium:728751 
TEST=verified that Cr50 build succeeds when both using and not using
     the signing fob.

Change-Id: I8f40bd52f1752bfd88ec002f298b991faf7a2512
Reviewed-on: https://chromium-review.googlesource.com/528373
Commit-Ready: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
(cherry picked from commit 61b87c56b669eb10d546c6a3595726ec38a2eaa1)
Reviewed-on: https://chromium-review.googlesource.com/556218
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>

[modify] https://crrev.com/bf5c3c358e23dbe24587f8e3c020a00a5efc189e/chip/g/build.mk
[modify] https://crrev.com/bf5c3c358e23dbe24587f8e3c020a00a5efc189e/Makefile.rules

Project Member

Comment 15 by bugdroid1@chromium.org, Aug 18 2017

Labels: merge-merged-firmware-cr50-9308.24.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/5a5c8596d00c670d2bf3648bce941447f40cfe9f

commit 5a5c8596d00c670d2bf3648bce941447f40cfe9f
Author: Vadim Bendebury <vbendeb@chromium.org>
Date: Fri Aug 18 20:07:24 2017

g: do not invoke signer with sudo unless it is necessary

Invoking signer with sudo is required only when signing requires a USB
fob. Let's not use it in unless necessary.

BRANCH=cr50
BUG= chromium:728751 
TEST=verified that Cr50 build succeeds when both using and not using
     the signing fob.

Change-Id: I8f40bd52f1752bfd88ec002f298b991faf7a2512
Reviewed-on: https://chromium-review.googlesource.com/528373
Commit-Ready: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
(cherry picked from commit 61b87c56b669eb10d546c6a3595726ec38a2eaa1)
Reviewed-on: https://chromium-review.googlesource.com/618398
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>

[modify] https://crrev.com/5a5c8596d00c670d2bf3648bce941447f40cfe9f/chip/g/build.mk
[modify] https://crrev.com/5a5c8596d00c670d2bf3648bce941447f40cfe9f/Makefile.rules

Sign in to add a comment