You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python multiprocessing regression on Windows after updating to Python 3.9.2 #13785
Just to mark this down for future Google searches..
After we updated Emscripten SDK to Python 3.9.2, its multiprocessing library has gained a new regression, failing deterministically on one of the my two Windows systems on error message
Exception in thread Thread-1:
Traceback (most recent call last):
File "threading.py", line 954, in _bootstrap_inner
File "threading.py", line 892, in run
File "multiprocessing\pool.py", line 519, in _handle_workers
File "multiprocessing\pool.py", line 499, in _wait_for_updates
File "multiprocessing\connection.py", line 884, in wait
File "multiprocessing\connection.py", line 816, in _exhaustive_wait
ValueError: need at most 63 handles, got a sequence of length 66
On the other Windows system, this issue does not seem to ever occur. The affected system is a 64-thread Threadripper 2990WX, and the numbers are quite close to 64, so I wonder if that has a meaning here. The unaffected system is a 16-thread system.
Can be reproduced with embuilder build ALL command.
It looks like the upcoming PR #13493 fixes the issue.
Activity
juj commentedon Apr 8, 2021
Closed by PR #13493.
Update windows version of python to 3.10.7
sbc100 commentedon Sep 19, 2022
Are you still able to reproduce this issue @juj? Can you see if #1109 address the issue?
sbc100 commentedon Sep 19, 2022
It looks like the upstream bug has been fixed: https://bugs.python.org/issue26903
But the workaround is to limit the number of cores to 60 on windows: psf/black#838
Limiting to 60 on our ends seems like a good workaround since that is basically what the upstream fix was: python/cpython@8ea0fd8
sbc100 commentedon Sep 19, 2022
(looks like that change make it into v3.8.0
Fix for pythons multiprocessing issue on win32
Fix for pythons multiprocessing issue on win32
Fix for python multiprocessing issue on win32
Fix for python multiprocessing issue on win32
Fix EM_PYTHON_MULTIPROCESSING under windows
Fix for python multiprocessing issue on win32
Fix EM_PYTHON_MULTIPROCESSING under windows
Fix for python multiprocessing issue on win32
Fix EM_PYTHON_MULTIPROCESSING under windows
Fix EM_PYTHON_MULTIPROCESSING under windows (#17892)
Fix for python multiprocessing issue on win32