Closed Bug 1801525 Opened 1 year ago Closed 1 year ago

Intermittent TVw AttributeError: '_io.BytesIO' object has no attribute 'encoding'

Categories

(Testing :: Mozbase, defect, P5)

defect

Tracking

(firefox-esr102 unaffected, firefox107 unaffected, firefox108 unaffected, firefox109 fixed)

RESOLVED FIXED
109 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox107 --- unaffected
firefox108 --- unaffected
firefox109 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: jstutte)

References

(Regression)

Details

(Keywords: intermittent-failure, regression)

Attachments

(1 file)

Filed by: imoraru [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=397095783&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/TzML3VoqRaWQ4y91faRzWw/runs/0/artifacts/public/logs/live_backing.log
Reftest URL: https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml#logurl=https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/TzML3VoqRaWQ4y91faRzWw/runs/0/artifacts/public/logs/live_backing.log&only_show_unexpected=1


[task 2022-11-20T00:56:34.365Z] 00:56:34     INFO -  'WORKING_DIR': '/builds/worker'}
[task 2022-11-20T00:56:34.366Z] 00:56:34     INFO - Calling ['/builds/worker/workspace/build/venv/bin/python', '-u', '/builds/worker/workspace/build/tests/web-platform/runtests.py', '--log-raw=-', '--log-raw=/builds/worker/workspace/build/blobber_upload_dir/wpt-test1_raw.log', '--log-wptreport=/builds/worker/workspace/build/blobber_upload_dir/wptreport.json', '--log-errorsummary=/builds/worker/workspace/build/blobber_upload_dir/wpt-test1_errorsummary.log', '--symbols-path=https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/K9REPT3DSEODB3HtS0MTMw/artifacts/public/build/target.crashreporter-symbols.zip', '--stackwalk-binary=/builds/worker/fetches/minidump-stackwalk/minidump-stackwalk', '--stackfix-dir=/builds/worker/workspace/build/tests/bin', '--no-pause-after-test', '--instrument-to-file=/builds/worker/workspace/build/blobber_upload_dir/wpt_instruments.txt', '--specialpowers-path=/builds/worker/workspace/build/tests/extensions/specialpowers@mozilla.org.xpi', '--processes=1', '--binary=/builds/worker/workspace/build/application/firefox/firefox', '--install-fonts', '--test-type=reftest', '--setpref=media.peerconnection.mtransport_process=false', '--setpref=network.process.enabled=false', '--setpref=layers.d3d11.enable-blacklist=false', '--prefs-root=/builds/worker/workspace/build/tests/web-platform/prefs', '--config=/builds/worker/workspace/build/tests/web-platform/wptrunner.ini', '--ca-cert-path=/builds/worker/workspace/build/tests/web-platform/tests/tools/certs/cacert.pem', '--host-key-path=/builds/worker/workspace/build/tests/web-platform/tests/tools/certs/web-platform.test.key', '--host-cert-path=/builds/worker/workspace/build/tests/web-platform/tests/tools/certs/web-platform.test.pem', '--certutil-binary=/builds/worker/workspace/build/tests/bin/certutil', '--verify-log-full', '--verify', 'tests/web-platform/tests/css/css-backgrounds/background-image-shared-stylesheet.html'] with output_timeout 1000
[task 2022-11-20T00:56:34.563Z] 00:56:34     INFO - :::
[task 2022-11-20T00:56:34.563Z] 00:56:34     INFO - ::: Running test verification step "Running tests in a loop 10 times"...
[task 2022-11-20T00:56:34.563Z] 00:56:34     INFO - :::
[task 2022-11-20T00:56:34.762Z] 00:56:34     INFO - mozversion application_buildid: 20221120002607
[task 2022-11-20T00:56:34.762Z] 00:56:34 CRITICAL - Test harness output was not a valid structured log message: 
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL - mozlog.structuredlog: Failure calling log handler:
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL - Traceback (most recent call last):
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL -   File "/builds/worker/workspace/build/venv/lib/python3.6/site-packages/mozlog/structuredlog.py", line 294, in _handle_log
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL -     handler(data)
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL -   File "/builds/worker/workspace/build/venv/lib/python3.6/site-packages/mozlog/handlers/base.py", line 85, in __call__
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL -     target_enc = self.stream.encoding
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL - AttributeError: '_io.BytesIO' object has no attribute 'encoding'
[task 2022-11-20T00:56:34.764Z] 00:56:34     INFO - mozversion application_changeset: db51149fe9596f05600937729cb381b9a3ac390b
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL - Test harness output was not a valid structured log message: 
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL - mozlog.structuredlog: Failure calling log handler:
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL - Traceback (most recent call last):
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL -   File "/builds/worker/workspace/build/venv/lib/python3.6/site-packages/mozlog/structuredlog.py", line 294, in _handle_log
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL -     handler(data)
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL -   File "/builds/worker/workspace/build/venv/lib/python3.6/site-packages/mozlog/handlers/base.py", line 85, in __call__
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL -     target_enc = self.stream.encoding
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL - AttributeError: '_io.BytesIO' object has no attribute 'encoding'
[task 2022-11-20T00:56:34.764Z] 00:56:34     INFO - mozversion application_display_name: Firefox Nightly
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL - Test harness output was not a valid structured log message: 
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL - mozlog.structuredlog: Failure calling log handler:
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL - Traceback (most recent call last):
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL -   File "/builds/worker/workspace/build/venv/lib/python3.6/site-packages/mozlog/structuredlog.py", line 294, in _handle_log
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL -     handler(data)
[task 2022-11-20T00:56:34.764Z] 00:56:34 CRITICAL -   File "/builds/worker/workspace/build/venv/lib/python3.6/site-packages/mozlog/handlers/base.py", line 85, in __call__
[task 2022-11-20T00:56:34.765Z] 00:56:34 CRITICAL -     target_enc = self.stream.encoding
[task 2022-11-20T00:56:34.765Z] 00:56:34 CRITICAL - AttributeError: '_io.BytesIO' object has no attribute 'encoding'
[task 2022-11-20T00:56:34.765Z] 00:56:34     INFO - mozversion application_id: {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
[task 2022-11-20T00:56:34.766Z] 00:56:34 CRITICAL - Test harness output was not a valid structured log message: 
[task 2022-11-20T00:56:34.766Z] 00:56:34 CRITICAL - mozlog.structuredlog: Failure calling log handler:
[task 2022-11-20T00:56:34.766Z] 00:56:34 CRITICAL - Traceback (most recent call last):
[task 2022-11-20T00:56:34.766Z] 00:56:34 CRITICAL -   File "/builds/worker/workspace/build/venv/lib/python3.6/site-packages/mozlog/structuredlog.py", line 294, in _handle_log
[task 2022-11-20T00:56:34.766Z] 00:56:34 CRITICAL -     handler(data)
[task 2022-11-20T00:56:34.766Z] 00:56:34 CRITICAL -   File "/builds/worker/workspace/build/venv/lib/python3.6/site-packages/mozlog/handlers/base.py", line 85, in __call__
[task 2022-11-20T00:56:34.766Z] 00:56:34 CRITICAL -     target_enc = self.stream.encoding
[task 2022-11-20T00:56:34.767Z] 00:56:34 CRITICAL - AttributeError: '_io.BytesIO' object has no attribute 'encoding'
[task 2022-11-20T00:56:34.767Z] 00:56:34     INFO - mozversion application_name: Firefox
[task 2022-11-20T00:56:34.767Z] 00:56:34 CRITICAL - Test harness output was not a valid structured log message: 
<...>

Hi Emilio! Can you please take a look at this? Could this be regressed by your recent changes in Bug 1800979?
Thank you!

Flags: needinfo?(emilio)

Set release status flags based on info from the regressing bug 1800979

I don't see how bug 1800979 could've regressed this. That code comes from bug 1774462 which is somewhat recent. Jens can you take a look?

Flags: needinfo?(emilio) → needinfo?(jstutte)
Component: CSS Parsing and Computation → Mozbase
Product: Core → Testing
Regressed by: 1774462
No longer regressed by: 1800979

Did we update python recently? The changes from bug 1774462 are around for quite a while now. Anyhow, from the log it seems BytesIO streams can entirely lack the encoding attribute now, so we should probably check for its existence.

Flags: needinfo?(jstutte)
Assignee: nobody → jstutte
Status: NEW → ASSIGNED
Pushed by jstutte@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3979fc927b47
Check for the existence of the encoding attribute of an io.BytesIO stream. r=davehunt
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch

(In reply to Intermittent Failures Robot from comment #10)

32 failures in 3888 pushes (0.008 failures/push) were associated with this bug in the last 7 days.

Repository breakdown:

Seems these instances are happening on autoland without this patch.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: