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

Issue 891747 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 5
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: ----

Blocked on:
issue 891332



Sign in to add a comment

UnicodeEncodeError: 'ascii' codec can't encode characters

Project Member Reported by sheriff-...@appspot.gserviceaccount.com, Oct 3

Issue description

The telemetry tests are "failing" but with the following output:

performance_test_suite on (102b) GPU on Windows on Windows-2008ServerR2-SP1 performance_test_suite on (102b) GPU on Windows on Windows-2008ServerR2-SP1
Run on OS: 'Windows-2008ServerR2-SP1'
Max pending time: 0:34:46.547406 (shard #0)
Max shard duration: 5:23:10.767064 (shard #3)
Min shard duration: 1:06:56.214706 (shard #2)
Total tests: 903
* Passed: 821 (821 expected, 0 unexpected)
* Skipped: 82 (82 expected, 0 unexpected)
* Failed: 0 (0 expected, 0 unexpected)
* Flaky: 0 (0 expected, 0 unexpected)

So it's unclear what is actually failing.
Both 

Benchmarks logs
Benchmarks shard map

links lead to empty LogDog pages.
THe only failure is shard #2. THe link to shard #2 output doesn't work because the logs are too long. I will try the isolated out link.
The isolated output from there https://chrome-isolated.appspot.com/browse?namespace=default-gzip&hash=d1d8c69dde8f123de7f3e004ddcef37a2b548049 doesn't provide links to any failures. 
Components: Speed>Telemetry
Labels: -Pri-2 Pri-1
Summary: performance_test_suite "failing" and there are no good logs. (was: performance_test_suite failing on multiple builders)
The only change that happened between the last successful run and the first failure is crrev.com/595521, which seems completely unrelated.
Ah, it's this bug: 

on trace
Traceback (most recent call last):
  File "c:\b\s\w\ir\testing\scripts\run_telemetry_benchmark_as_googletest.py", line 137, in run_benchmark
    rc = test_env.run_command_with_output(cmd, env=env, stdoutfile=stdoutfile)
  File "c:\b\s\w\ir\testing\scripts\..\test_env.py", line 187, in run_command_with_output
    sys.stdout.write(reader.read())
UnicodeEncodeError: 'ascii' codec can't encode characters in position 253-254: ordinal not in range(128)
Traceback (most recent call last):
  File "..\..\testing\scripts\run_performance_tests.py", line 277, in <module>
    sys.exit(main())
  File "..\..\testing\scripts\run_performance_tests.py", line 253, in main
    False, stories=stories) or return_code)
  File "..\..\testing\scripts\run_performance_tests.py", line 132, in execute_benchmark
    args, per_benchmark_args, is_histograms))
  File "c:\b\s\w\ir\testing\scripts\run_telemetry_benchmark_as_googletest.py", line 176, in run_benchmark
    if rc == 0:
UnboundLocalError: local variable 'rc' referenced before assignment
Failed to delete c:\b\s\w\ir (42 files remaining).
  Maybe the test has a subprocess outliving it.
  Sleeping 2 seconds.

Blockedon: 891332
The real error seems to be

Traceback (most recent call last):
  File "c:\b\s\w\ir\testing\scripts\run_telemetry_benchmark_as_googletest.py", line 137, in run_benchmark
    rc = test_env.run_command_with_output(cmd, env=env, stdoutfile=stdoutfile)
  File "c:\b\s\w\ir\testing\scripts\..\test_env.py", line 187, in run_command_with_output
    sys.stdout.write(reader.read())
UnicodeEncodeError: 'ascii' codec can't encode characters in position 253-254: ordinal not in range(128)

Also, I'm getting my logs from here: https://chrome-swarming.appspot.com/task?id=405246d3fd2bb810&refresh=10&show_raw=1

It just takes a really long time for them to load.
The problematic UNICODE character is '“'
Summary: UnicodeEncodeError: 'ascii' codec can't encode characters (was: performance_test_suite "failing" and there are no good logs.)
Project Member

Comment 13 by bugdroid1@chromium.org, Oct 3

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

commit 48142096a60f26a702039a263731a35e4456fdf3
Author: Ned Nguyen <nednguyen@google.com>
Date: Wed Oct 03 22:17:19 2018

[testing/test_env.py] Use utf-8 encoding for reading test log

Bug:  891747 
Change-Id: I73142c8bb5c4bbc78da71f230188e33d548a3dab
Reviewed-on: https://chromium-review.googlesource.com/c/1259475
Commit-Queue: Ned Nguyen <nednguyen@google.com>
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: Caleb Rouleau <crouleau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596397}
[modify] https://crrev.com/48142096a60f26a702039a263731a35e4456fdf3/testing/test_env.py

Project Member

Comment 14 by bugdroid1@chromium.org, Oct 4

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

commit 7f43ff6f4cbe7667988389c34edf5dca51d934aa
Author: Ned Nguyen <nednguyen@google.com>
Date: Thu Oct 04 04:58:46 2018

[testing/test_env.py] Update run_command_with_output to use rb and wb for processing log

This is based on Dirk's comment in https://chromium-review.googlesource.com/c/chromium/src/+/1259475#message-01cdaf3daae02840bb55b523a0eb71c9201adade

TBR=dpranke@chromium.org, jbudorick@chromium.org

Bug:  891747 
Change-Id: Iec031e348d26d77de3f897641f4a151d0b4f544d
Reviewed-on: https://chromium-review.googlesource.com/c/1260519
Reviewed-by: Ned Nguyen <nednguyen@google.com>
Commit-Queue: Ned Nguyen <nednguyen@google.com>
Cr-Commit-Position: refs/heads/master@{#596509}
[modify] https://crrev.com/7f43ff6f4cbe7667988389c34edf5dca51d934aa/testing/test_env.py

Owner: nednguyen@chromium.org
Status: Fixed (was: Available)
This error no longer happen, so I think it's fixed

Comment 16 by benhenry@google.com, Jan 16 (6 days ago)

Components: Test>Telemetry

Comment 17 by benhenry@google.com, Jan 16 (6 days ago)

Components: -Speed>Telemetry

Sign in to add a comment