-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python unit tests using multiprocessing fail/hang on macOS + Python 3.8 #24880
Comments
(I'm trying to repro locally but will first need to get py3.8.) |
I can confirm locally this only happens in Python 3.8. |
More digging suggests the root cause is due to a change in the default multiprocessing start method:
which has some additional requirements: https://docs.python.org/3.8/library/multiprocessing.html#the-spawn-and-forkserver-start-methods The ImportError seems to suggest that the pytest entrypoint doesn't satisfy one of the requirements, and it looks like we're not alone: I've tried the workaround used by scipy, importing multiprocessing (without using it) at various places, but with no luck. I'm going to disable the affected tests for now. |
Oddly, the spawn server was already in use on Windows, so it's surprising this wasn't already failing on Windows. |
…ts, a=testonly Automatic update from web-platform-tests [tools] Disable some multiprocessing tests (#24892) on macOS + Python 3.8 web-platform-tests/wpt#24880 -- wpt-commits: b2579d4e08a237fd1e38942ead6303495f3fbf07 wpt-pr: 24892
…ts, a=testonly Automatic update from web-platform-tests [tools] Disable some multiprocessing tests (#24892) on macOS + Python 3.8 web-platform-tests/wpt#24880 -- wpt-commits: b2579d4e08a237fd1e38942ead6303495f3fbf07 wpt-pr: 24892
…ts, a=testonly Automatic update from web-platform-tests [tools] Disable some multiprocessing tests (#24892) on macOS + Python 3.8 web-platform-tests/wpt#24880 -- wpt-commits: b2579d4e08a237fd1e38942ead6303495f3fbf07 wpt-pr: 24892 UltraBlame original commit: a1514a9fedd104f5b8aeaa9344c66efec8e31917
…ts, a=testonly Automatic update from web-platform-tests [tools] Disable some multiprocessing tests (#24892) on macOS + Python 3.8 web-platform-tests/wpt#24880 -- wpt-commits: b2579d4e08a237fd1e38942ead6303495f3fbf07 wpt-pr: 24892 UltraBlame original commit: 34d3705a00acbc657226af902d8322d20e304e7f
…ts, a=testonly Automatic update from web-platform-tests [tools] Disable some multiprocessing tests (#24892) on macOS + Python 3.8 web-platform-tests/wpt#24880 -- wpt-commits: b2579d4e08a237fd1e38942ead6303495f3fbf07 wpt-pr: 24892 UltraBlame original commit: a1514a9fedd104f5b8aeaa9344c66efec8e31917
…ts, a=testonly Automatic update from web-platform-tests [tools] Disable some multiprocessing tests (#24892) on macOS + Python 3.8 web-platform-tests/wpt#24880 -- wpt-commits: b2579d4e08a237fd1e38942ead6303495f3fbf07 wpt-pr: 24892 UltraBlame original commit: 34d3705a00acbc657226af902d8322d20e304e7f
…ts, a=testonly Automatic update from web-platform-tests [tools] Disable some multiprocessing tests (#24892) on macOS + Python 3.8 web-platform-tests/wpt#24880 -- wpt-commits: b2579d4e08a237fd1e38942ead6303495f3fbf07 wpt-pr: 24892 UltraBlame original commit: a1514a9fedd104f5b8aeaa9344c66efec8e31917
…ts, a=testonly Automatic update from web-platform-tests [tools] Disable some multiprocessing tests (#24892) on macOS + Python 3.8 web-platform-tests/wpt#24880 -- wpt-commits: b2579d4e08a237fd1e38942ead6303495f3fbf07 wpt-pr: 24892 UltraBlame original commit: 34d3705a00acbc657226af902d8322d20e304e7f
…ts, a=testonly Automatic update from web-platform-tests [tools] Disable some multiprocessing tests (#24892) on macOS + Python 3.8 web-platform-tests/wpt#24880 -- wpt-commits: b2579d4e08a237fd1e38942ead6303495f3fbf07 wpt-pr: 24892
…ts, a=testonly Automatic update from web-platform-tests [tools] Disable some multiprocessing tests (#24892) on macOS + Python 3.8 web-platform-tests/wpt#24880 -- wpt-commits: b2579d4e08a237fd1e38942ead6303495f3fbf07 wpt-pr: 24892
Looks like this has been mitigated...should we downgrade from roadmap to backlog, or are we expecting to fix any time soon? |
I think we should keep it at roadmap given that we're moving to py3-only and we should start fixing & unskipping tests in PY3. |
I have some findings and would appreciate your thoughts -
"console_main()" was introduced to pytest here, about six months ago. Source code in tools/third_party/pytest/ is older and doesn't have In a local run with
replace
Tests that hang due "ImportError: cannot import name 'console_main' from 'pytest' (/Users/runner/work/1/s/tools/third_party/pytest/src/pytest.py)" now seem running fine in MacOS with python 3.8 There are a couple of questions here: Thanks! |
I took a deeper look and this is a bit convoluted. First of all, it's important to note that the Regarding the solution, I think upgrading Line 16 in 01922bd
But I'm sure that has its own set of issues (maybe @jgraham would know). |
This is kinda why I'd like us to end up with us importing |
Apparently I got confused by another issue and thought there was no pytest version that supported both py2 & 3. There is: https://docs.pytest.org/en/stable/py27-py34-deprecation.html So a workaround is to pin to 4.6 both in |
I'm seeing these (new?) failures in both tools/ and tools/wpt tests on Azure:
https://dev.azure.com/web-platform-tests/wpt/_build/results?buildId=52012&view=logs&jobId=1d360f5f-cec3-58ac-12a7-7f135bf134d9&j=1d360f5f-cec3-58ac-12a7-7f135bf134d9&t=a042d866-5c9d-573a-d81c-85b65eaf66e4
https://dev.azure.com/web-platform-tests/wpt/_build/results?buildId=52012&view=logs&jobId=1d360f5f-cec3-58ac-12a7-7f135bf134d9&j=8018c8f5-0b0f-5870-6bc1-b62b0370009f&t=ee261702-2b78-51d0-d8fc-5ff4bfe2de49
The errors are a bit cryptic, but similar. Among them, this looks the most suspicious:
The text was updated successfully, but these errors were encountered: