mash: ash crashes on startup if powerd is not running |
||||||||||||
Issue descriptionPowerManagerClient calls OnGetScreenBrightnessPercent, which returns an error because powerd isn't there. In the error handler it checks chromeos::system::StatisticsProvider->IsRunningOnVm() to decide whether to log an error. In mash ash we're not initializing a chromeos::system::StatisticsProvider, which means that hits a CHECK failure. https://cs.chromium.org/chromium/src/chromeos/dbus/power_manager_client.cc?q=OnGetScreenBrightnessPercent&sq=package:chromium&l=458&dr=CSs Dan, is it expected that chrome should run properly if powerd isn't running? People sometimes shut it off to keep the display from turning off. Regardless, it seems like we might need a statistics provider. From kylechar: I took the following steps to figure it out. I got the following stack trace as the first crash. [29601:29601:0901/111424:2568336503:FATAL:statistics_provider.cc(252)] Check failed: load_statistics_started_. #0 0x7fd28e43aee6 <unknown> #1 0x7fd28e45a49e <unknown> #2 0x7fd28f163288 <unknown> #3 0x7fd28f16401b <unknown> #4 0x7fd28f162a32 <unknown> #5 0x7fd28f1ac386 <unknown> #6 0x7fd28f20df7e <unknown> <truncated> Not a super useful stack trace but thankful it was a CHECK that failed and it lists the pid. At the very start of stderr we log the pid of every process mash_runner starts. [29591:29594:0901/111422:2566660381:INFO:child_process_host.cc(202)] Launched child process pid=29601, instance=ash, name=exe:chrome_mash, user_id=505C0EE9-3013-43C0-82B0-A84F50CF8D84 To get stack traces I just rsync'd over a chrome binary with symbols and reran chrome. [31504:31504:0901/112232:3056138078:FATAL:statistics_provider.cc(252)] Check failed: load_statistics_started_. #0 0x7f03dcfeaee6 base::debug::StackTrace::StackTrace() #1 0x7f03dd00a49e logging::LogMessage::~LogMessage() #2 0x7f03ddd13288 chromeos::system::StatisticsProviderImpl::WaitForStatisticsLoaded() #3 0x7f03ddd1401b chromeos::system::StatisticsProviderImpl::GetMachineStatistic() #4 0x7f03ddd12a32 chromeos::system::StatisticsProviderImpl::IsRunningOnVm() #5 0x7f03ddd5c386 chromeos::PowerManagerClientImpl::OnGetScreenBrightnessPercent() #6 0x7f03dddbdf7e dbus::ObjectProxy::OnCallMethodError() #7 0x7f03dddbb784 _ZN4base8internal7InvokerINS0_9BindStateIMN4dbus11ObjectProxyEFvRKSsS6_NS_8CallbackIFvPNS3_8ResponseEELNS0_8CopyModeE1EEEPNS3_13ErrorResponseEEJ13scoped_refptrIS4_ESsSsSC_EEEFvSE_EE3RunEPNS0_13BindStateBaseEOSE_ #8 0x7f03dddbc438 dbus::ObjectProxy::RunResponseCallback() <truncated> PowerManagerClientImpl::OnGetScreenBrightnessPercent() talks to dbus so that seemed like the failure. I didn't have time to investigate it further.
,
Sep 1 2016
Yeah. The tricky bit is that we don't have or want content dependencies in ash/mus right now, and there's only a single thread in ash, but StatisticsProviderImpl wants to run on the FILE thread. I'll take a look at how we could spin up something like a blocking pool. If that seems hard, I'll just reuse FakeStatisticsProvider in ash to keep people moving.
,
Sep 1 2016
You should feel free to ifdef out that check for ash/mus for now, too.
,
Sep 1 2016
It turns out that StatisticsProviderImpl launches a tool binary (crossystem) to gather machine information. That's why in runs on the file thread. We don't want to launch that binary twice (once from chrome, once from ash). So I'm going to wire up FakeStatisticsProvider for now, then later we'll need to sort out some chrome/mash communication to get the data ash needs.
,
Sep 6 2016
Fixed with the commit below. For some reason bugdroid didn't update this bug. commit fb20f602654bb390e495835aa5087f98d88143a5 Author: jamescook <jamescook@chromium.org> Date: Thu Sep 1 15:34:15 2016 -0700 mash: Provide a fake chromeos StatisticsProvider in ash Lower-level code in //chromeos (like the power manager client) assumes it can use chromeos::system::StatisticsProvider to determine if it is running in a VM (among other things). This is causing CHECK failures on mash when powerd isn't running. For now, provide a fake implementation, since we don't want to create a StatisticsProviderImpl in both chrome and ash, as it runs an external binary to get its information, and we don't want to do that twice. BUG= 643289 TEST=manual, stop powerd, start chrome on device with --mash, no CHECK failure Review-Url: https://codereview.chromium.org/2297193007 Cr-Commit-Position: refs/heads/master@{#416088}
,
Oct 7 2016
,
Nov 19 2016
,
Jan 21 2017
,
Mar 4 2017
,
Apr 17 2017
,
May 30 2017
,
Aug 1 2017
,
Oct 14 2017
,
Feb 26 2018
|
||||||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by derat@chromium.org
, Sep 1 2016