Issue metadata
Sign in to add a comment
|
cros_config error at power_supply_info |
||||||||||||||||||||||
Issue descriptionChromeOS: 9592.0.0, 60.0.3112.0 What steps will reproduce the problem? (1) Sign in (2) Run "power_supply_info" at terminal (3) What is the expected result? No error What happens instead? chronos@localhost / $ power_supply_info [0530/121825:ERROR:cros_config.cc(89)] Could not run command mosys platform model [0530/121825:ERROR:prefs.cc(54)] Failed to init CrosConfig database. Device: Line Power Always on Kevin/Pi. I will check other devices.
,
May 30 2017
Probably introduced by https://chromium-review.googlesource.com/c/514402/. Does it still print the regular info in addition to the error?
,
May 30 2017
Yes. The rest info prints out.
,
May 30 2017
The error is coming from here: https://chromium.googlesource.com/chromiumos/platform2/+/master/chromeos-config/libcros_config/cros_config.cc#89 sjg@ do you see any problem with silencing those errors, since having the database missing is going to be a common situation?
,
May 30 2017
Another option may be hiding the cros_config calls behind #ifdefs that check a macro set by the ebuild. I usually try to stay away from build-time configuration since it makes testing harder (i.e. you need to test on multiple boards instead of just one), but it seems pretty safe here if it's just adding another prefs path.
,
May 30 2017
For the database yes that's fine. And perhaps we should adjust it so that it doesn't try to get the model from mosys if there is no database?
,
May 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/d594280d03b697b3d9836d9bcf113f8c82ebcbab commit d594280d03b697b3d9836d9bcf113f8c82ebcbab Author: Benjamin Gordon <bmgordon@chromium.org> Date: Wed May 31 19:38:32 2017 Clean up missing cros-config database errors Not every model will have a config database for some time to come, so don't print errors to stderr when the file is missing. BUG= chromium:727870 TEST=Installed on link and ran power_supply_info; ran tests for reef. Change-Id: I3bc9c6a72658ce2c238e535292064ecbc379a74c Reviewed-on: https://chromium-review.googlesource.com/519523 Commit-Ready: Benjamin Gordon <bmgordon@chromium.org> Tested-by: Benjamin Gordon <bmgordon@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> [modify] https://crrev.com/d594280d03b697b3d9836d9bcf113f8c82ebcbab/chromeos-config/libcros_config/cros_config.cc [modify] https://crrev.com/d594280d03b697b3d9836d9bcf113f8c82ebcbab/power_manager/common/prefs.cc
,
May 31 2017
The fix should be in. Does this need to be backported to M60?
,
May 31 2017
Merging probably isn't super-important, assuming that this isn't breaking any autotests that happen to run power_supply_info (which I'd like us to stop doing per issue 698386, although dump_power_status will probably print the same error without the fix). Outside of tests, I think that power_supply_info is only run for feedback reports, where this error seems harmless.
,
May 31 2017
Ok, I'll mark this fixed then.
,
May 31 2017
,
May 31 2017
Just in case people look at a certain type of telemetry failures recently, this is the reason. The error message is: rc2/telemetry_src/src/tools/perf/run_benchmark --verbose --browser=cros-chrome --output-format=chartjson --output-dir=/home/chromeos-test/images/chell-chrome-pfq/R61-9605.0.0-rc2/telemetry_src/src --remote=chromeos4-row12-rack9-host15 octane' 05/31 05:26:02.179 DEBUG| telemetry_runner:0285| Error occurred executing. 05/31 05:26:02.180 DEBUG| telemetry_runner:0291| Completed with exit code: 255. stdout:[ RUN ] http://chromium.github.io/octane/index.html?auto=1 Traceback (most recent call last): File "/home/chromeos-test/images/chell-chrome-pfq/R61-9605.0.0-rc2/telemetry_src/src/third_party/catapult/telemetry/telemetry/internal/story_runner.py", line 90, in _RunStoryAndProcessErrorIfNeeded state.RunStory(results) File "/home/chromeos-test/images/chell-chrome-pfq/R61-9605.0.0-rc2/telemetry_src/src/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 52, in traced_function return func(*args, **kwargs) File "/home/chromeos-test/images/chell-chrome-pfq/R61-9605.0.0-rc2/telemetry_src/src/third_party/catapult/telemetry/telemetry/page/shared_page_state.py", line 296, in RunStory self._current_page.Run(self) File "/home/chromeos-test/images/chell-chrome-pfq/R61-9605.0.0-rc2/telemetry_src/src/third_party/catapult/telemetry/telemetry/page/__init__.py", line 109, in Run shared_state.page_test.DidNavigateToPage(self, current_tab) File "/home/chromeos-test/images/chell-chrome-pfq/R61-9605.0.0-rc2/telemetry_src/src/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 52, in traced_function return func(*args, **kwargs) File "/home/chromeos-test/images/chell-chrome-pfq/R61-9605.0.0-rc2/telemetry_src/src/tools/perf/benchmarks/octane.py", line 100, in DidNavigateToPage self._power_metric.Start(page, tab) File "/home/chromeos-test/images/chell-chrome-pfq/R61-9605.0.0-rc2/telemetry_src/src/tools/perf/metrics/power.py", line 90, in Start self._platform.StartMonitoringPower(self._browser) File "/home/chromeos-test/images/chell-chrome-pfq/R61-9605.0.0-rc2/telemetry_src/src/third_party/catapult/telemetry/telemetry/core/platform.py", line 268, in StartMonitoringPower self._platform_backend.StartMonitoringPower(browser) File "/home/chromeos-test/images/chell-chrome-pfq/R61-9605.0.0-rc2/telemetry_src/src/third_party/catapult/telemetry/telemetry/internal/platform/cros_platform_backend.py", line 154, in StartMonitoringPower self._powermonitor.StartMonitoringPower(browser) File "/home/chromeos-test/images/chell-chrome-pfq/R61-9605.0.0-rc2/telemetry_src/src/third_party/catapult/telemetry/telemetry/internal/platform/power_monitor/cros_power_monitor.py", line 37, in StartMonitoringPower if self._IsOnBatteryPower(): File "/home/chromeos-test/images/chell-chrome-pfq/R61-9605.0.0-rc2/telemetry_src/src/third_party/catapult/telemetry/telemetry/internal/platform/power_monitor/cros_power_monitor.py", line 103, in _IsOnBatteryPower self._platform.RunCommand(['dump_power_status'])) File "/home/chromeos-test/images/chell-chrome-pfq/R61-9605.0.0-rc2/telemetry_src/src/third_party/catapult/telemetry/telemetry/internal/platform/cros_platform_backend.py", line 70, in RunCommand (str(args), stderr)) IOError: Failed to run: cmd = ['dump_power_status'], stderr = [0531/052542:ERROR:cros_config.cc(89)] Could not run command mosys platform model [0531/052542:ERROR:prefs.cc(54)] Failed to init CrosConfig database. [ FAILED ] http://chromium.github.io/octane/index.html?auto=1 (26917 ms) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] http://chromium.github.io/octane/index.html?auto=1 1 FAILED TEST
,
May 31 2017
Is this test code assuming that output on stderr means the command failed? It probably shouldn't. In any case, if this is causing test failures, I take back what I said earlier about not needing to merge to M60. :-P
,
Jun 1 2017
+hashimoto for comment 13.
,
Jun 1 2017
Sorry, my memory is vague about this, but IIRC, in https://codereview.chromium.org/798483004/, I changed CrosPlatformBackend.RunCommand to fail when stderr output is not empty, because before that RunCommand never raises an error no matter if the command execution succeeds or not. Probably I should have used the command's exit status instead of stderr, but I guess it didn't work because some commands just output stderr on errors but exits with no error status.
,
Jun 1 2017
FYI: This issue is blocking Chrome roll in M60 release branch due to failure in AFDO: https://uberchromegw.corp.google.com/i/chromeos_release/builders/samus-chrome-pre-flight-branch%20release-R60-9592.B/builds/5 I saw an error message "Failed to run: cmd = ['dump_power_status']" Please merge the fix to M60. Thanks!
,
Jun 1 2017
,
Jun 1 2017
Approved for M60
,
Jun 1 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/226c1f96ffb9c6d638a6c7d27092f24518f68d81 commit 226c1f96ffb9c6d638a6c7d27092f24518f68d81 Author: Benjamin Gordon <bmgordon@chromium.org> Date: Thu Jun 01 17:56:44 2017 Clean up missing cros-config database errors Not every model will have a config database for some time to come, so don't print errors to stderr when the file is missing. BUG= chromium:727870 TEST=Installed on link and ran power_supply_info; ran tests for reef. Change-Id: I3bc9c6a72658ce2c238e535292064ecbc379a74c Reviewed-on: https://chromium-review.googlesource.com/519523 Commit-Ready: Benjamin Gordon <bmgordon@chromium.org> Tested-by: Benjamin Gordon <bmgordon@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> (cherry picked from commit d594280d03b697b3d9836d9bcf113f8c82ebcbab) Reviewed-on: https://chromium-review.googlesource.com/521302 Commit-Queue: Benjamin Gordon <bmgordon@chromium.org> Reviewed-by: Benjamin Gordon <bmgordon@chromium.org> Trybot-Ready: Benjamin Gordon <bmgordon@chromium.org> [modify] https://crrev.com/226c1f96ffb9c6d638a6c7d27092f24518f68d81/chromeos-config/libcros_config/cros_config.cc [modify] https://crrev.com/226c1f96ffb9c6d638a6c7d27092f24518f68d81/power_manager/common/prefs.cc
,
Jun 2 2017
,
Jun 2 2017
Verified in Chrome OS 9592.5.0, 60.0.3112.10.
,
Jun 5 2017
This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible! If all merges have been completed, please remove any remaining Merge-Approved labels from this issue. Thanks for your time! To disable nags, add the Disable-Nags label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 5 2017
Already merged. I've removed the label.
,
Jul 5 2017
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by helenzhang@google.com
, May 30 2017Labels: M-60 Arch-All