New submission from STINNER Victor <[email protected]>:
On Windows, the multiprocessing DupHandle.detach() method has race condition on
DuplicateHandle(DUPLICATE_CLOSE_SOURCE).
Error on duplicate():
Traceback (most recent call last):
File "<string>", line 1, in <module>
File
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\spawn.py",
line 107, in spawn_main
new_handle = reduction.duplicate(pipe_handle,
File
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\reduction.py",
line 79, in duplicate
return _winapi.DuplicateHandle(
PermissionError: [WinError 5] Access is denied
Example: bpo-34714
Error on detach():
Traceback (most recent call last):
File "<string>", line 1, in <module>
File
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\spawn.py",
line 117, in spawn_main
exitcode = _main(fd)
File
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\spawn.py",
line 127, in _main
self = reduction.pickle.load(from_parent)
File
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\connection.py",
line 951, in rebuild_pipe_connection
handle = dh.detach()
File
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\reduction.py",
line 133, in detach
self._access, False, _winapi.DUPLICATE_CLOSE_SOURCE)
PermissionError: [WinError 5] Access is denied
Example: bpo-34513
----------
components: Library (Lib)
messages: 353064
nosy: pablogsal, pitrou, vstinner
priority: normal
severity: normal
status: open
title: [Windows] multiprocessing: DupHandle.detach() race condition on
DuplicateHandle(DUPLICATE_CLOSE_SOURCE)
versions: Python 3.7, Python 3.8, Python 3.9
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue38263>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com