Closed Bug 1879832 Opened 5 months ago Closed 2 months ago

Intermittent Wd RuntimeError: Event loop is closed | single tracking bug - DO NOT USE FOR CLASSIFICATION

Categories

(Remote Protocol :: WebDriver BiDi, defect, P5)

defect
Points:
2

Tracking

(firefox128 fixed)

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

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

References

Details

(Keywords: intermittent-failure, intermittent-testcase, Whiteboard: [webdriver:m11])

Attachments

(1 file, 1 obsolete file)

Attachment #9385548 - Attachment is obsolete: true

As discussed in the triage meeting Julian will have a look.

Flags: needinfo?(jdescottes)

Sorry Julian, but due to the amount of failures I've already taken a look. So our WebDriver BiDi Python client actually uses the websockets package in version 10.3: https://searchfox.org/mozilla-central/source/testing/web-platform/tests/tools/third_party/websockets

Note that this release is from April 17th, 2022 while there is already version 12.0 out. As such there might have gone fixes into the package which probably could prevent this issue.

But note that there is also pywebsocket3 vendored as 3rd party package:
https://searchfox.org/mozilla-central/source/testing/web-platform/tests/tools/third_party/pywebsocket3

James do you remember why we have two different websocket clients vendored in? Should we consolidate these two to maybe just use pywebsocket? Easier for now might be upgrading websockets (in case there are no backward incompatible changes).

Flags: needinfo?(jdescottes) → needinfo?(james)

pywebsocket3 is just a server, not a client.

Updating websockets to 11.0.4 seems possible, but 12.0 seems to require Python 3.8 (at least it doesn't have 3.7 wheels) which AIUI we are still not using in Gecko CI, so we can't update to that one.

Flags: needinfo?(james)

(In reply to James Graham [:jgraham] from comment #12)

Updating websockets to 11.0.4 seems possible, but 12.0 seems to require Python 3.8 (at least it doesn't have 3.7 wheels) which AIUI we are still not using in Gecko CI, so we can't update to that one.

Oh we run Python 3.8 in Gecko CI for Linux jobs, while for [Mac](https://treeherder.mozilla.org/logviewer?job_id=453307846&repo=mozilla-central&lineNumber=214 and Windows we even have Python 3.11. So it means nothing should actually block us from getting the websockets client upgraded to the newest release.

Let me create an upstream PR for it so that we can be sure that it works for all supported browsers.

Alex can you verify my last comment and that we no longer use Python 3.7 in our CI? As it looks like the minimum version that we run now is 3.8. Thanks.

Flags: needinfo?(ahochheiden)

Confirmed, everything in CI should be on at least Python 3.8.

The minimum version bump was ~3 months ago, and mach will explicitly not run on older versions. See https://searchfox.org/mozilla-central/source/mach#83-88 (If it is invoked with an older version, it will try_alternate_python3_executables and re-launch with a 3.8+ python version if it's available on the system, if not, it mach will terminate).

Flags: needinfo?(ahochheiden)

Thanks Alex! I've created a RFC for web-platform tests to bump the minimum Python version from 3.7 to 3.8:
https://github.com/web-platform-tests/rfcs/pull/189

Summary: Intermittent Wd RuntimeError: Event loop is closed | single tracking bug → Intermittent Wd RuntimeError: Event loop is closed | single tracking bug - DO NOT USE FOR CLASSIFICATION

As it looks like this failure is always visible for Wd2 jobs which include the /_mozilla/webdriver/bidi/browsing_context/navigate/error.py test where it is failing each time:

https://treeherder.mozilla.org/jobs?repo=mozilla-central&searchStr=wd2+windows

Note that the test is using a custom profile. Maybe there is a problem with the cleanup.

Summary: Intermittent Wd RuntimeError: Event loop is closed | single tracking bug - DO NOT USE FOR CLASSIFICATION → Intermittent Wd | RuntimeError: Event loop is closed | single tracking bug - DO NOT USE FOR CLASSIFICATION
Summary: Intermittent Wd | RuntimeError: Event loop is closed | single tracking bug - DO NOT USE FOR CLASSIFICATION → Intermittent Wd RuntimeError: Event loop is closed | single tracking bug - DO NOT USE FOR CLASSIFICATION
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c10f51249c06
[wdspec] Properly end bidi session when stopping geckodriver in mozilla specific tests r=webdriver-reviewers,Sasha,whimboo
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/46424 for changes under testing/web-platform/tests
Upstream PR was closed without merging
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
Upstream PR was closed without merging
Upstream PR merged by sideshowbarker
Points: --- → 2
Whiteboard: [webdriver:m11]
You need to log in before you can comment on or make changes to this bug.