power_supply_info is emitting logs and warnings from cros_config |
||||||||
Issue descriptionChrome OS Version: R63-9986.0.0 Chrome OS Platform: kahlee Steps To Reproduce: (1) power_supply_info (2) (3) Expected Result: No log messages, just results Actual Result: localhost ~ # power_supply_info [0929/094028:INFO:cros_config.cc(170)] Using master configuration for model kahlee [0929/094028:WARNING:cros_config.cc(84)] Cannot get path / property powerd-prefs: FDT_ERR_NOTFOUND Device: Line Power path: online: no type: enum type: Disconnected voltage (V): 0 current (A): 0 max voltage (V): 0 max current (A): 0 active source: available sources: supports dual-role: yes Device: Battery path: /sys/class/power_supply/BAT0 vendor: BYD model name: DELL FY serial number: 0276 state: Discharging voltage (V): 13.183 energy (Wh): 41.325 energy rate (W): 6.49922 current (A): 0.493 charge (Ah): 3.625 full charge (Ah): 3.625 full charge design (Ah): 3.684 percentage: 100 display percentage: 100 technology: Li-ion How frequently does this problem reproduce? (Always, sometimes, hard to reproduce?) Always - perhaps only on systems with unibuilds enabled? What is the impact to the user, and is there a workaround? If so, what is it? Distracting logging emitted from a debugging tool... this kind of logging looks like it belongs to a daemon and routed to a file in /var/log/
,
Sep 29 2017
The warning can be avoided by adding configuration, assuming it is needed. But in addition to what Dan says, I think it should change to an INFO message, not a warning. It is fine to have a config option with no value for a particular model. So cros_config should not warn, but perhaps cros_config_host should.
,
Sep 29 2017
Sent https://crrev.com/c/693286 to update the logging thresholds used by tools.
,
Sep 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/58c65f95b39a8daec19b3993c784d13bd1cfaee8 commit 58c65f95b39a8daec19b3993c784d13bd1cfaee8 Author: Daniel Erat <derat@chromium.org> Date: Sat Sep 30 06:25:36 2017 power: Set minimum logging level in tools. Call logging::SetMinLogLevel(logging::LOG_WARNING) in check_powerd_config, dump_power_status, and power_supply_info to avoid printing informational messages. Also get rid of system::PowerSupply::Init's log_shutdown_thresholds argument. It was initially added to avoid logging an information message when used by tools, but changing the minimum logging level is a cleaner way to accomplish the same thing. Also make check_powerd_config print a message to stderr and exit with 1 on bad flags instead of CHECK-ing. BUG= chromium:770236 TEST=tests pass; ran tools and verified the lack of log spam Change-Id: I21d4d366a9724948c4a3896a5380921cbfacc6b3 Reviewed-on: https://chromium-review.googlesource.com/693286 Commit-Ready: Dan Erat <derat@chromium.org> Tested-by: Dan Erat <derat@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> [modify] https://crrev.com/58c65f95b39a8daec19b3993c784d13bd1cfaee8/power_manager/tools/power_supply_info.cc [modify] https://crrev.com/58c65f95b39a8daec19b3993c784d13bd1cfaee8/power_manager/powerd/main.cc [modify] https://crrev.com/58c65f95b39a8daec19b3993c784d13bd1cfaee8/power_manager/tools/get_powerd_initial_backlight_level.cc [modify] https://crrev.com/58c65f95b39a8daec19b3993c784d13bd1cfaee8/power_manager/powerd/system/power_supply.h [modify] https://crrev.com/58c65f95b39a8daec19b3993c784d13bd1cfaee8/power_manager/tools/dump_power_status.cc [modify] https://crrev.com/58c65f95b39a8daec19b3993c784d13bd1cfaee8/power_manager/tools/backlight_tool.cc [modify] https://crrev.com/58c65f95b39a8daec19b3993c784d13bd1cfaee8/power_manager/powerd/system/power_supply_unittest.cc [modify] https://crrev.com/58c65f95b39a8daec19b3993c784d13bd1cfaee8/power_manager/tools/check_powerd_config.cc [modify] https://crrev.com/58c65f95b39a8daec19b3993c784d13bd1cfaee8/power_manager/powerd/system/power_supply.cc
,
Sep 30 2017
Over to you to fix the cros_config warning.
,
Oct 18 2017
,
Nov 4 2017
,
Nov 6 2017
I am currently seeing a different set of messages: # power_supply_info [1106/110204:WARNING:cros_config.cc(248)] Unknown key vendor in mosys output [1106/110204:WARNING:cros_config.cc(248)] Unknown key model in mosys output [1106/110204:WARNING:cros_config.cc(248)] Unknown key chassis in mosys output [1106/110204:WARNING:cros_config.cc(248)] Unknown key customization in mosys output [1106/110204:WARNING:cros_config.cc(248)] Unknown key version in mosys output [1106/110204:WARNING:cros_config.cc(248)] Unknown key family in mosys output [1106/110204:ERROR:lookup.cc(151)] Cannot find mapping node: FDT_ERR_NOTFOUND [1106/110204:ERROR:cros_config.cc(287)] Cannot find SKU for name Kahlee SKU ID -1 Which of these should be suppressed? Just FDT_ERR_NOTFOUND?
,
Nov 6 2017
That is a genuine error but I think this CL should fix it: https://chrome-internal-review.googlesource.com/c/chromeos/overlays/overlay-kahlee-private/+/496276 The WARNINGs are the things we should drop.
,
Nov 8 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/224f61925a105441330873b7b3543800f3364709 commit 224f61925a105441330873b7b3543800f3364709 Author: Lann Martin <lannm@chromium.org> Date: Wed Nov 08 23:10:10 2017 chromeos-config: Remove "Unknown key" WARNING from CrosConfig::DecodeIdentifiers BUG= 770236 TEST=deploy chromeos-config-tools to kahlee; run power_supply_info; observe no warnings Change-Id: Ib7553f8f3bce2277cc62d6c7b7fccf95ebbbb460 Reviewed-on: https://chromium-review.googlesource.com/755004 Commit-Ready: Lann Martin <lannm@chromium.org> Tested-by: Lann Martin <lannm@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> [modify] https://crrev.com/224f61925a105441330873b7b3543800f3364709/chromeos-config/libcros_config/cros_config.cc
,
Nov 9 2017
,
Jan 22 2018
,
Jan 23 2018
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by derat@chromium.org
, Sep 29 2017Status: Assigned (was: Available)