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

Issue 885913 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 19
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

perf_benchmark.py: browser_type not iterable

Project Member Reported by c...@chromium.org, Sep 19

Issue description

While running blink_perf locally in a recent checkout, I hit this error:

  TypeError: argument of type 'NoneType' is not iterable

Full output:

cmp@cmp:~/co/chromium/src$ ./tools/perf/run_benchmark blink_perf --test-path=./third_party/blink/perf_tests/owp_storage/idb-load-docs.html
WARNING:root:Unable to import cv2 due to: No module named cv2
(WARNING) 2018-09-18 17:48:08,468 desktop_browser_finder.FindAllAvailableBrowsers:278  Chrome build location for linux_x86_64 not found. Browser will be run without Flash.
(WARNING) 2018-09-18 17:48:08,470 browser_finder.FindBrowser:83  --browser omitted. Using most recent local build: release

Traceback (most recent call last):
  <module> at /usr/local/google/home/cmp/co/chromium/src/tools/perf/run_benchmark:27
    sys.exit(main())
  main at /usr/local/google/home/cmp/co/chromium/src/tools/perf/run_benchmark:23
    return benchmark_runner.main(config, [trybot_command.Trybot])
  main at /usr/local/google/home/cmp/co/chromium/src/third_party/catapult/telemetry/telemetry/benchmark_runner.py:439
    return command_instance.Run(options)
  Run at /usr/local/google/home/cmp/co/chromium/src/third_party/catapult/telemetry/telemetry/benchmark_runner.py:309
    return min(255, b.Run(args))
  Run at /usr/local/google/home/cmp/co/chromium/src/third_party/catapult/telemetry/telemetry/benchmark.py:104
    return story_runner.RunBenchmark(self, finder_options)
  RunBenchmark at /usr/local/google/home/cmp/co/chromium/src/third_party/catapult/telemetry/telemetry/internal/story_runner.py:314
    benchmark.CustomizeBrowserOptions(finder_options.browser_options)
  CustomizeBrowserOptions at /usr/local/google/home/cmp/co/chromium/src/tools/perf/core/perf_benchmark.py:111
    if 'android-webview' in options.browser_type:
TypeError: argument of type 'NoneType' is not iterable

It looks like the change that introduced this was:

commit 7863843fe3159bb57b9430cd4849fb33087cfed5
Author: Juan Antonio Navarro Perez <perezju@chromium.org>
Date:   Tue Sep 11 17:02:13 2018 +0000

    [tools/perf] Disable Surface Synchronization on all WebView variants
    
    The previous tweak did not disable all possible webview browsers like,
    e.g., android-webview-google.
    
    Bug: 879151
    Change-Id: Ic2b0e22b06893d7e7e769dd50fb86f46bbc9c936
    Reviewed-on: https://chromium-review.googlesource.com/1219614
    Commit-Queue: Ned Nguyen <nednguyen@google.com>
    Reviewed-by: Ned Nguyen <nednguyen@google.com>
    Cr-Commit-Position: refs/heads/master@{#590355}

diff --git a/tools/perf/core/perf_benchmark.py b/tools/perf/core/perf_benchmark.py
index 9f46a80e8f9c..4cb9fd688a13 100644
--- a/tools/perf/core/perf_benchmark.py
+++ b/tools/perf/core/perf_benchmark.py
@@ -108,7 +108,7 @@ class PerfBenchmark(benchmark.Benchmark):
 
     # TODO(crbug.com/881469): remove this once Webview support surface
     # synchronization.
-    if options.browser_type == 'android-webview':
+    if 'android-webview' in options.browser_type:
       options.AppendExtraBrowserArgs(
           '--disable-features=SurfaceSynchronization')
     self.SetExtraBrowserOptions(options)

I haven't scanned through enough of perf_benchmark.py to confirm whether options.browser_type should be iterable.  However, when I revert commit 7863843f, the test runs as expected.
 
Owner: nednguyen@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 19

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

commit eba5573c45e96dea5117e1eef46d0f4ec1ab4dda
Author: Ned Nguyen <nednguyen@google.com>
Date: Wed Sep 19 16:29:29 2018

Add None check to browser_type to fix crash with running Telemetry benchmark

Bug:  885913 
Cq-Include-Trybots: master.tryserver.chromium.perf:obbs_fyi
Change-Id: If4d056738ff1ae84fa43f1d229ca89a39a71e81d
Reviewed-on: https://chromium-review.googlesource.com/1234034
Reviewed-by: Juan Antonio Navarro Pérez <perezju@chromium.org>
Reviewed-by: Chase Phillips <cmp@chromium.org>
Commit-Queue: Ned Nguyen <nednguyen@google.com>
Cr-Commit-Position: refs/heads/master@{#592435}
[modify] https://crrev.com/eba5573c45e96dea5117e1eef46d0f4ec1ab4dda/tools/perf/core/perf_benchmark.py

Status: Fixed (was: Started)
Should be fixed. Feel free to reopen

Sign in to add a comment