New issue
Advanced search Search tips

Issue 902391 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 7
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Startup tracing breaks on Android.

Project Member Reported by hanxi@chromium.org, Nov 6

Issue description

I build release version of Chrome, and run:
build/android/adb_profile_chrome_startup  --browser build --url=https://www.bbc.com/news

The startup tracing scrips failed to work, and I got the following logs:
build/android/adb_profile_chrome_startup  --browser build --url=https://www.bbc.com/news -o trace/traceEvent_with_change.html 
done
Traceback (most recent call last):
  File "/usr/local/google/home/hanxi/Projects/clankium/src/build/android/../../third_party/catapult/systrace/bin/adb_profile_chrome_startup", line 114, in <module>
    sys.exit(main())
  File "/usr/local/google/home/hanxi/Projects/clankium/src/build/android/../../third_party/catapult/systrace/bin/adb_profile_chrome_startup", line 105, in main
    write_json=options.write_json)
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/systrace/profile_chrome/profiler.py", line 88, in CaptureProfile
    result = controller.StartTracing()
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/systrace/systrace/tracing_controller.py", line 156, in StartTracing
    timeout=self._controller_config.timeout):
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/systrace/profile_chrome/../../common/py_utils/py_utils/__init__.py", line 103, in RunWithTimeout
    return timeout_retry.Run(func, timeout, 0, args=args)
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/utils/timeout_retry.py", line 158, in Run
    error_log_func=error_log_func)
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/utils/reraiser_thread.py", line 198, in JoinAll
    self._JoinAll(watcher, timeout)
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/utils/reraiser_thread.py", line 170, in _JoinAll
    thread.ReraiseIfException()
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/utils/reraiser_thread.py", line 93, in run
    self._ret = self._func(*self._args, **self._kwargs)
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/utils/timeout_retry.py", line 151, in <lambda>
    child_thread = reraiser_thread.ReraiserThread(lambda: func(*args, **kwargs),
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/systrace/profile_chrome/chrome_startup_tracing_agent.py", line 83, in StartAgentTracing
    self._SetupTracing()
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/systrace/profile_chrome/chrome_startup_tracing_agent.py", line 46, in _SetupTracing
    self._flag_changer.AddFlags(flags)
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/flag_changer.py", line 135, in AddFlags
    return self.PushFlags(add=flags)
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/flag_changer.py", line 176, in PushFlags
    return self.ReplaceFlags(new_flags)
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/flag_changer.py", line 121, in ReplaceFlags
    self._SetPermissive()
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/flag_changer.py", line 187, in _SetPermissive
    self._device.GetEnforce()):
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/decorators.py", line 51, in timeout_retry_wrapper
    return impl()
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/decorators.py", line 47, in impl
    return f(*args, **kwargs)
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/device_utils.py", line 2602, in GetEnforce
    ['getenforce'], check_return=True, single_line=True).lower()
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/decorators.py", line 51, in timeout_retry_wrapper
    return impl()
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/decorators.py", line 47, in impl
    return f(*args, **kwargs)
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/device_utils.py", line 1156, in RunShellCommand
    output = handle_large_output(cmd, large_output)
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/device_utils.py", line 1125, in handle_large_output
    return handle_large_command(cmd)
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/device_utils.py", line 1107, in handle_large_command
    return handle_check_return(cmd)
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/device_utils.py", line 1098, in handle_check_return
    return run(cmd)
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/device_utils.py", line 1094, in run
    return self.adb.Shell(cmd, ensure_logs_on_timeout=ensure_logs_on_timeout)
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/sdk/adb_wrapper.py", line 537, in Shell
    ensure_logs_on_timeout=ensure_logs_on_timeout)
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/sdk/adb_wrapper.py", line 315, in _RunDeviceAdbCmd
    ensure_logs_on_timeout=ensure_logs_on_timeout)
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/decorators.py", line 51, in timeout_retry_wrapper
    return impl()
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/decorators.py", line 47, in impl
    return f(*args, **kwargs)
  File "/usr/local/google/home/hanxi/Projects/clankium/src/third_party/catapult/devil/devil/android/sdk/adb_wrapper.py", line 269, in _RunAdbCmd
    timeout = 0.95 * timeout
TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'


The crash is caused by timeout_retry.CurrentTimeoutThreadGroup().GetRemainingTime() returns None (https://cs.chromium.org/chromium/src/third_party/catapult/devil/devil/android/sdk/adb_wrapper.py?rcl=6ba6af1e543b60cced283cf7490d81415fe934d1&l=267).

We need to check the return value, and handle the None case.

Sergiy, could you please take a look? Thanks!
 
Owner: serg...@chromium.org
Status: Started (was: Untriaged)
Will work on a fix.
Thank you sergiyb@!
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 7

The following revision refers to this bug:
  https://chromium.googlesource.com/catapult/+/e4ed2d1c2c6288bf4ef978885b0892eb259bb213

commit e4ed2d1c2c6288bf4ef978885b0892eb259bb213
Author: Sergiy Byelozyorov <sergiyb@chromium.org>
Date: Wed Nov 07 15:43:50 2018

Decrease timeout only if there is a watchdog timer configured

R=jbudorick@chromium.org, perezju@chromium.org

Bug:  chromium:902391 
Bug: chromium:899721
Change-Id: I200b8be52a4a5be849b1b04ed6d65bd5cf1d3c1d
Reviewed-on: https://chromium-review.googlesource.com/c/1321054
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>

[modify] https://crrev.com/e4ed2d1c2c6288bf4ef978885b0892eb259bb213/devil/devil/android/sdk/adb_wrapper.py

Status: Fixed (was: Started)
This should be working now. Please re-open if this is not the case.
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f749872e90d84d3d9df95fd1e257d0e177c77801

commit f749872e90d84d3d9df95fd1e257d0e177c77801
Author: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com>
Date: Thu Nov 08 05:11:46 2018

Roll src/third_party/catapult 1a1b38dabca6..026f83d49289 (5 commits)

https://chromium.googlesource.com/catapult.git/+log/1a1b38dabca6..026f83d49289


git log 1a1b38dabca6..026f83d49289 --date=short --no-merges --format='%ad %ae %s'
2018-11-08 nednguyen@google.com Revert "Remove legacy timeline based metrics (TBMv1) & all related code"
2018-11-07 benjhayden@chromium.org Permit lack of value.name in convertChartJson.
2018-11-07 pasko@chromium.org androidStartupMetric: workarund for missing main entry point marker
2018-11-07 sergiyb@chromium.org Decrease timeout only if there is a watchdog timer configured
2018-11-07 nednguyen@google.com Add a fixed mimetypes file to be used by Telemetry's memory_cache_http_server


Created with:
  gclient setdep -r src/third_party/catapult@026f83d49289

The AutoRoll server is located here: https://autoroll.skia.org/r/catapult-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel

BUG=chromium:900878, chromium:902391 ,chromium:899721, chromium:894868 
TBR=sullivan@chromium.org

Change-Id: I7d6e937f277bb7938ea7b66843d5415b8054f487
Reviewed-on: https://chromium-review.googlesource.com/c/1325373
Reviewed-by: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#606350}
[modify] https://crrev.com/f749872e90d84d3d9df95fd1e257d0e177c77801/DEPS

Sign in to add a comment