New issue
Advanced search Search tips

Issue 685479 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

imageloader shouldn't abort() when there's no image to load

Project Member Reported by vapier@chromium.org, Jan 26 2017

Issue description

if you load a VM initially, imageloader will fail to start with ABORT which causes a crash report and dump to be created.  since this is supposed to be an expected scenario, it should be exiting quietly instead.

if you search crash/, you'll see devices in the wild are also hitting this (although not at a terribly high frequency).
product.name='ChromeOS' OMIT RECORD IF SOME(ProductData.Key='exec_name' AND ProductData.Value='imageloader') = 0

# /usr/sbin/imageloader --mount   --mount_component=PepperFlashPlayer   --mount_point=/run/imageloader/PepperFlashPlayer 
[0125/214853:ERROR:imageloader_impl.cc(285)] Failed to read latest-version file.
[0125/214853:FATAL:imageloader_main.cc(58)] Failed to verify and mount component.
/usr/lib64/libbase-core-395517.so(base::debug::StackTrace::StackTrace()+0x13) [0x79a634d80273]

Aborted (core dumped)
 
I didn't think about that happening when I changed from imageloader_main.cc returning exit code 1 to using LOG(FATAL). I assume returning exit code 1 is fine?

Comment 2 by vapier@chromium.org, Jan 26 2017

i think s/FATAL/ERROR/ and adding exit(1) should be fine

i didn't realize FATAL could trigger a crash dump.  i'll have to keep that in mind in future reviews.

Comment 3 Deleted

Project Member

Comment 4 by bugdroid1@chromium.org, Jan 27 2017

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

commit 8becf5f5f191c7afcdb0d793a296c83e85a3078d
Author: Greg Kerr <kerrnel@chromium.org>
Date: Thu Jan 26 23:53:27 2017

Exit normally if the requested image is missing.

imageloader uses LOG(FATAL) if the image it attempted to mount is
missing, or fails to mount for some reason (corrupt, etc.). This
generates crash reports, so it should log the error and exit cleanly
with exit code 1.

BUG= chromium:685479 
TEST=test_that -b ${BOARD} ${DUT_ip} imageloader

Change-Id: Ic41d155c25bcd644dbc3410e7c55d0f2c4182397
Reviewed-on: https://chromium-review.googlesource.com/433446
Commit-Ready: Greg Kerr <kerrnel@chromium.org>
Tested-by: Greg Kerr <kerrnel@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/8becf5f5f191c7afcdb0d793a296c83e85a3078d/imageloader_main.cc

Status: Fixed (was: Available)

Comment 6 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 7 by dchan@google.com, May 30 2017

Labels: VerifyIn-60

Comment 8 by dchan@chromium.org, Aug 1 2017

Labels: VerifyIn-61

Comment 9 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment