adb_profile_chrome with systrace fails on pre-Marshmallow devices
Reported by
mlopat...@yandex-team.ru,
Nov 27
|
||
Issue description
Device name: Galaxy Nexus (4.3), Samsung Galaxy S4 Mini (4.4)
Steps to reproduce:
(1) Install and run ChromePublic.apk on device
(2) Run `adb_profile_chrome --atrace-categories=gfx -t 2 -b chromium`
(3) Open generated traceEvents.html in your favorite desktop browser
Expected result:
Normal tracing report is opened with chromium and system traces combined.
Actual result:
ImportError: No clock sync markers exist pairing clock domain "LINUX_FTRACE_GLOBAL" with target clock domain "LINUX_CLOCK_MONOTONIC".
Broken html is attached.
Additionally, on S4 mini tracing fails with exception:
DEBUG:devil.utils.cmd_helper:[host]> /home/mlopatkin/projects/chromium/catapult/devil/bin/deps/linux2/x86_64/bin/adb -s 2024422b pull /sys/kernel/debug/tracing/tracing_on /tmp/tmprXmcLr/tmp_ReadFileWithPull
DEBUG:devil.utils.cmd_helper:STDOUT+STDERR: failed to copy '/sys/kernel/debug/tracing/tracing_on' to '/tmp/tmprXmcLr/tmp_ReadFileWithPull': Permission denied
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/mlopatkin/projects/chromium/catapult/systrace/systrace/tracing_agents/atrace_agent.py", line 202, in _collect_and_preprocess
trace_data = self._collect_trace_data()
File "/home/mlopatkin/projects/chromium/catapult/systrace/systrace/tracing_agents/atrace_agent.py", line 262, in _collect_trace_data
result = self._stop_collect_trace()
File "/home/mlopatkin/projects/chromium/catapult/systrace/systrace/tracing_agents/atrace_agent.py", line 253, in _stop_collect_trace
if int(self._device_utils.ReadFile(is_trace_enabled_file)):
File "/home/mlopatkin/projects/chromium/catapult/devil/devil/android/decorators.py", line 57, in timeout_retry_wrapper
retry_if_func=retry_if_func)
File "/home/mlopatkin/projects/chromium/catapult/devil/devil/utils/timeout_retry.py", line 158, in Run
error_log_func=error_log_func)
File "/home/mlopatkin/projects/chromium/catapult/devil/devil/utils/reraiser_thread.py", line 198, in JoinAll
self._JoinAll(watcher, timeout)
File "/home/mlopatkin/projects/chromium/catapult/devil/devil/utils/reraiser_thread.py", line 170, in _JoinAll
thread.ReraiseIfException()
File "/home/mlopatkin/projects/chromium/catapult/devil/devil/utils/reraiser_thread.py", line 93, in run
self._ret = self._func(*self._args, **self._kwargs)
File "/home/mlopatkin/projects/chromium/catapult/devil/devil/utils/timeout_retry.py", line 151, in <lambda>
child_thread = reraiser_thread.ReraiserThread(lambda: func(*args, **kwargs),
File "/home/mlopatkin/projects/chromium/catapult/devil/devil/android/decorators.py", line 47, in impl
return f(*args, **kwargs)
File "/home/mlopatkin/projects/chromium/catapult/devil/devil/android/device_utils.py", line 1949, in ReadFile
return self._ReadFileWithPull(device_path)
File "/home/mlopatkin/projects/chromium/catapult/devil/devil/android/device_utils.py", line 1901, in _ReadFileWithPull
self.adb.Pull(device_path, host_temp_path)
File "/home/mlopatkin/projects/chromium/catapult/devil/devil/android/sdk/adb_wrapper.py", line 496, in Pull
device_serial=str(self))
AdbCommandFailedError: (device: 2024422b) adb pull /sys/kernel/debug/tracing/tracing_on /tmp/tmprXmcLr/tmp_ReadFileWithPull: failed and output:
- File pulled from the device did not arrive on the host: /tmp/tmprXmcLr/tmp_ReadFileWithPull
,
Nov 29
The following revision refers to this bug: https://chromium.googlesource.com/catapult/+/ee85992c5c619df6e291ba6dc2e86654f344a492 commit ee85992c5c619df6e291ba6dc2e86654f344a492 Author: Mikhail Lopatkin <mlopatkin@yandex-team.ru> Date: Thu Nov 29 18:32:42 2018 Fix atrace_agent on pre-M devices The 'atrace --async_stop' command is broken in multiple ways on pre-M. It not only doesn't stop tracing but also doesn't dump collected data wiping trace buffer instead. Therefore calling async_stop isn't safe on such devices. Not using async_stop at all on pre-M makes the code slightly easier than dumping, stoping and then checking if the fallback trace stop is still necessary (because it almost certainly is). BUG= chromium:908761 Change-Id: I1176a6687b775213bb40c13a60e2a605f7a4a9d9 Reviewed-on: https://chromium-review.googlesource.com/c/1351001 Reviewed-by: John Reck <jreck@google.com> Commit-Queue: John Reck <jreck@google.com> [modify] https://crrev.com/ee85992c5c619df6e291ba6dc2e86654f344a492/systrace/systrace/tracing_agents/atrace_agent.py
,
Nov 29
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e15fd313ca172d6a5ae33e7cc6c9c4c6149ef6c1 commit e15fd313ca172d6a5ae33e7cc6c9c4c6149ef6c1 Author: chromium-autoroll <chromium-autoroll@skia-public.iam.gserviceaccount.com> Date: Thu Nov 29 21:06:27 2018 Roll src/third_party/catapult b88aa2d8ba8e..ee85992c5c61 (1 commits) https://chromium.googlesource.com/catapult.git/+log/b88aa2d8ba8e..ee85992c5c61 git log b88aa2d8ba8e..ee85992c5c61 --date=short --no-merges --format='%ad %ae %s' 2018-11-29 mlopatkin@yandex-team.ru Fix atrace_agent on pre-M devices Created with: gclient setdep -r src/third_party/catapult@ee85992c5c61 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:908761 TBR=sullivan@chromium.org Change-Id: Ibdddb4067a1cd003f68b4a2127aebd55180d2011 Reviewed-on: https://chromium-review.googlesource.com/c/1355620 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@{#612351} [modify] https://crrev.com/e15fd313ca172d6a5ae33e7cc6c9c4c6149ef6c1/DEPS
,
Nov 30
|
||
►
Sign in to add a comment |
||
Comment 1 by mlopat...@yandex-team.ru
, Nov 27