Closed Bug 1717054 Opened 4 years ago Closed 4 years ago

websocketprocessbridge does not seem to work with recent python3

Categories

(Testing :: Mochitest, task)

Firefox 91
task

Tracking

(firefox91 fixed)

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: bwc, Assigned: bwc)

References

Details

Attachments

(1 file, 1 obsolete file)

We're seeing failures like this:

task 2021-06-15T01:41:40.620Z] 01:41:40 INFO - Unhandled Error
[task 2021-06-15T01:41:40.621Z] 01:41:40 INFO - Traceback (most recent call last):
[task 2021-06-15T01:41:40.621Z] 01:41:40 INFO - File "Z:\task_162371889839717\build\venv\lib\site-packages\twisted\python\log.py", line 101, in callWithLogger
[task 2021-06-15T01:41:40.621Z] 01:41:40 INFO - return callWithContext({"system": lp}, func, *args, **kw)
[task 2021-06-15T01:41:40.622Z] 01:41:40 INFO - File "Z:\task_162371889839717\build\venv\lib\site-packages\twisted\python\log.py", line 85, in callWithContext
[task 2021-06-15T01:41:40.622Z] 01:41:40 INFO - return context.call({ILogContext: newCtx}, func, *args, **kw)
[task 2021-06-15T01:41:40.622Z] 01:41:40 INFO - File "Z:\task_162371889839717\build\venv\lib\site-packages\twisted\python\context.py", line 118, in callWithContext
[task 2021-06-15T01:41:40.623Z] 01:41:40 INFO - return self.currentContext().callWithContext(ctx, func, *args, **kw)
[task 2021-06-15T01:41:40.623Z] 01:41:40 INFO - File "Z:\task_162371889839717\build\venv\lib\site-packages\twisted\python\context.py", line 83, in callWithContext
[task 2021-06-15T01:41:40.623Z] 01:41:40 INFO - return func(*args, **kw)
[task 2021-06-15T01:41:40.623Z] 01:41:40 INFO - --- <exception caught here> ---
[task 2021-06-15T01:41:40.624Z] 01:41:40 INFO - File "Z:\task_162371889839717\build\venv\lib\site-packages\twisted\internet\selectreactor.py", line 149, in _doReadOrWrite
[task 2021-06-15T01:41:40.624Z] 01:41:40 INFO - why = getattr(selectable, method)()
[task 2021-06-15T01:41:40.624Z] 01:41:40 INFO - File "Z:\task_162371889839717\build\venv\lib\site-packages\twisted\internet\tcp.py", line 246, in doRead
[task 2021-06-15T01:41:40.625Z] 01:41:40 INFO - return self._dataReceived(data)
[task 2021-06-15T01:41:40.625Z] 01:41:40 INFO - File "Z:\task_162371889839717\build\venv\lib\site-packages\twisted\internet\tcp.py", line 251, in _dataReceived
[task 2021-06-15T01:41:40.625Z] 01:41:40 INFO - rval = self.protocol.dataReceived(data)
[task 2021-06-15T01:41:40.625Z] 01:41:40 INFO - File "Z:\task_162371889839717\build\venv\lib\site-packages\txws.py", line 707, in dataReceived
[task 2021-06-15T01:41:40.626Z] 01:41:40 INFO - self.parseFrames()
[task 2021-06-15T01:41:40.626Z] 01:41:40 INFO - File "Z:\task_162371889839717\build\venv\lib\site-packages\txws.py", line 489, in parseFrames
[task 2021-06-15T01:41:40.627Z] 01:41:40 INFO - frames, self.buf = parser(self.buf)
[task 2021-06-15T01:41:40.629Z] 01:41:40 INFO - File "Z:\task_162371889839717\build\venv\lib\site-packages\txws.py", line 368, in parse_hybi07_frames
[task 2021-06-15T01:41:40.629Z] 01:41:40 INFO - data = mask(data, key)
[task 2021-06-15T01:41:40.630Z] 01:41:40 INFO - File "Z:\task_162371889839717\build\venv\lib\site-packages\txws.py", line 244, in mask
[task 2021-06-15T01:41:40.630Z] 01:41:40 INFO - return buf.tostring()
[task 2021-06-15T01:41:40.634Z] 01:41:40 INFO - builtins.AttributeError: 'array.array' object has no attribute 'tostring'

This seems to be due to txws being old and abandoned. Autobahn is likely a viable alternative.

See Also: → 1668097
Attachment #9227707 - Attachment description: WIP: Bug 1717054: (WIP) Use autobahn instead of txws for websocketprocessbridge → Bug 1717054: Use autobahn instead of txws for websocketprocessbridge r?jmaher

(In reply to Byron Campen [:bwc] from comment #0)

We're seeing failures like this:

Thanks for the change to autobahn. I was concerned about continued use of txws, but wasn't aware of the alternative.

But I was sure it was working with py3, for many months now, and I don't see current failures on mozilla-central. Where/how are you seeing failures?

I saw them in testing new images of an updated windows10 where we had python 3.9.5 installed instead of 3.7.5. I suspect there have been reports from individual developers with a newer >3.7 version of python that was failing as well.

Attachment #9227707 - Attachment is obsolete: true
Pushed by bcampen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d3f281a0aad6 Use autobahn instead of txws for websocketprocessbridge r=jmaher
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: