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

Issue 774940 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

video_WebRtcPerf failed on eve: 'BatteryStat' object has no attribute 'remaining_time'

Project Member Reported by henryhsu@chromium.org, Oct 16 2017

Issue description

The test failed six times continuously.

Log: 
https://pantheon.corp.google.com/storage/browser/chromeos-autotest-results/148052298-chromeos-test/chromeos2-row8-rack1-host13/debug

10/10 23:51:53.872 DEBUG|          parallel:0030| Traceback (most recent call last):
10/10 23:51:53.872 DEBUG|          parallel:0030|   File "/usr/local/autotest/bin/parallel.py", line 18, in fork_start
10/10 23:51:53.872 DEBUG|          parallel:0030|     l()
10/10 23:51:53.872 DEBUG|          parallel:0030|   File "/usr/local/autotest/bin/job.py", line 483, in <lambda>
10/10 23:51:53.872 DEBUG|          parallel:0030|     l = lambda : test.runtest(self, url, tag, args, dargs)
10/10 23:51:53.872 DEBUG|          parallel:0030|   File "/usr/local/autotest/bin/test.py", line 117, in runtest
10/10 23:51:53.872 DEBUG|          parallel:0030|     job.sysinfo.log_after_each_iteration)
10/10 23:51:53.873 DEBUG|          parallel:0030|   File "/usr/local/autotest/common_lib/test.py", line 902, in runtest
10/10 23:51:53.873 DEBUG|          parallel:0030|     mytest._exec(args, dargs)
10/10 23:51:53.873 DEBUG|          parallel:0030|   File "/usr/local/autotest/common_lib/test.py", line 610, in _exec
10/10 23:51:53.873 DEBUG|          parallel:0030|     _call_test_function(self.execute, *p_args, **p_dargs)
10/10 23:51:53.873 DEBUG|          parallel:0030|   File "/usr/local/autotest/common_lib/test.py", line 824, in _call_test_function
10/10 23:51:53.873 DEBUG|          parallel:0030|     raise error.UnhandledTestFail(e)
10/10 23:51:53.873 DEBUG|          parallel:0030| UnhandledTestFail: Unhandled AttributeError: 'BatteryStat' object has no attribute 'remaining_time'
10/10 23:51:53.873 DEBUG|          parallel:0030| Traceback (most recent call last):
10/10 23:51:53.873 DEBUG|          parallel:0030|   File "/usr/local/autotest/common_lib/test.py", line 818, in _call_test_function
10/10 23:51:53.873 DEBUG|          parallel:0030|     return func(*args, **dargs)
10/10 23:51:53.873 DEBUG|          parallel:0030|   File "/usr/local/autotest/common_lib/test.py", line 471, in execute
10/10 23:51:53.873 DEBUG|          parallel:0030|     dargs)
10/10 23:51:53.873 DEBUG|          parallel:0030|   File "/usr/local/autotest/common_lib/test.py", line 348, in _call_run_once_with_retry
10/10 23:51:53.874 DEBUG|          parallel:0030|     postprocess_profiled_run, args, dargs)
10/10 23:51:53.874 DEBUG|          parallel:0030|   File "/usr/local/autotest/common_lib/test.py", line 381, in _call_run_once
10/10 23:51:53.874 DEBUG|          parallel:0030|     self.run_once(*args, **dargs)
10/10 23:51:53.874 DEBUG|          parallel:0030|   File "/usr/local/autotest/cros/video/helper_logger.py", line 82, in call
10/10 23:51:53.874 DEBUG|          parallel:0030|     return func(*args, **kwargs)
10/10 23:51:53.874 DEBUG|          parallel:0030|   File "/usr/local/autotest/tests/video_WebRtcPerf/video_WebRtcPerf.py", line 182, in run_once
10/10 23:51:53.874 DEBUG|          parallel:0030|     keyvals = self.test_power(local_path)
10/10 23:51:53.874 DEBUG|          parallel:0030|   File "/usr/local/autotest/tests/video_WebRtcPerf/video_WebRtcPerf.py", line 299, in test_power
10/10 23:51:53.874 DEBUG|          parallel:0030|     current_power_status = power_status.get_status()
10/10 23:51:53.874 DEBUG|          parallel:0030|   File "/usr/local/autotest/cros/power_status.py", line 497, in get_status
10/10 23:51:53.874 DEBUG|          parallel:0030|     status.refresh()
10/10 23:51:53.874 DEBUG|          parallel:0030|   File "/usr/local/autotest/cros/power_status.py", line 427, in refresh
10/10 23:51:53.874 DEBUG|          parallel:0030|     self.battery = [ BatteryStat(self.battery_path) ]
10/10 23:51:53.874 DEBUG|          parallel:0030|   File "/usr/local/autotest/cros/power_status.py", line 254, in __init__
10/10 23:51:53.875 DEBUG|          parallel:0030|     self.update()
10/10 23:51:53.875 DEBUG|          parallel:0030|   File "/usr/local/autotest/cros/power_status.py", line 265, in update
10/10 23:51:53.875 DEBUG|          parallel:0030|     logging.warn(field + ': ' + repr(getattr(self, field)))
10/10 23:51:53.875 DEBUG|          parallel:0030| AttributeError: 'BatteryStat' object has no attribute 'remaining_time'
 
Status: Started (was: Assigned)
This is the regression in M61 only. ToT is fine.
https://wmatrix.googleplex.com/platform/unfiltered?hide_missing=True&tests=video_WebRtcPerf&days_back=60&releases=61&platforms=eve

Besides, the same regression is found during M62 9811.0.0 ~ 9825.0.0 (9826.0.0 is good)
https://wmatrix.googleplex.com/platform/unfiltered?hide_missing=True&tests=video_WebRtcPerf&days_back=90&releases=62&platforms=eve


The failure is caused from the unknown status while detecting battery (battery voltage_now is 0.0)
https://pantheon.corp.google.com/storage/browser/chromeos-autotest-results/145930931-chromeos-test/chromeos2-row8-rack1-host12/debug/
09/30 10:50:18.577 WARNI|      power_status:0263| Failed to determine battery voltage
09/30 10:50:18.584 WARNI|      power_status:0265| status: 'Unknown\n'
09/30 10:50:18.591 WARNI|      power_status:0265| energy: 0.0
09/30 10:50:18.597 WARNI|      power_status:0265| voltage_now: 0.0
This change should be cherry-picked to M61 as well
https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/607531
Cc: keta...@chromium.org mqg@chromium.org
Labels: Merge-Request-61
Hi Ketaki,
video_WebRtcPerf is failing in M61 now, the fix was landed in M62 and needed to merge back to M61
https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/607531
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 24 2017

Labels: merge-merged-release-R61-9765.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/780d4541595df1d58d51e32297e3c63ddbc11929

commit 780d4541595df1d58d51e32297e3c63ddbc11929
Author: Mengqi Guo <mqg@chromium.org>
Date: Tue Oct 24 01:26:03 2017

power: update power_status to ignore peripheral battery

Adding an if statement to check that the battery is not a
peripheral battery.

BUG=chromium:774940, chromium:752662
TEST=test_that power_Status

Change-Id: I2aeb419bdf1086d3de41a24a44d18313c2875bc2
Reviewed-on: https://chromium-review.googlesource.com/607531
Commit-Ready: Mengqi Guo <mqg@chromium.org>
Tested-by: Mengqi Guo <mqg@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
(cherry picked from commit d969cb04e6fec332e3908094741fc2b8a6feb002)
Reviewed-on: https://chromium-review.googlesource.com/727830
Reviewed-by: Kuang-che Wu <kcwu@chromium.org>
Commit-Queue: Pin-chih Lin <johnylin@chromium.org>
Tested-by: Pin-chih Lin <johnylin@chromium.org>
Trybot-Ready: Pin-chih Lin <johnylin@chromium.org>

[modify] https://crrev.com/780d4541595df1d58d51e32297e3c63ddbc11929/client/cros/power_status.py

Sign in to add a comment