Message320528
> * dump() indirectly calls reduce_connection() (ex: for SimpleQueue._reader) of multiprocessing.connection
> * reduce_connection() duplicates the pipe handle
Sorry, it's reduce_pipe_connection(), not reduce_connection().
> It's unclear to me who is supposed to close the duplicated pipe handles? reduce_connection() creates a "ds = resource_sharer.DupSocket(s)" object, but this object doesn't seem to call CloseHandle()?
reduce_pipe_connection() creates a DupHandle object which duplicates the handle, and it's detach() method closes the handle.
The race condition is that sometimes the pool terminates a worker (worker() function of multiprocessing.pool) before the worker has time to close the duplicated handle.
The handle is closed by:
* rebuild_pipe_connection()
* dh.detach(), extract:
return _winapi.DuplicateHandle(
proc, self._handle, _winapi.GetCurrentProcess(),
self._access, False, _winapi.DUPLICATE_CLOSE_SOURCE) |
|
Date |
User |
Action |
Args |
2018-06-27 00:21:58 | vstinner | set | recipients:
+ vstinner, paul.moore, pitrou, tim.golden, zach.ware, steve.dower, davin |
2018-06-27 00:21:58 | vstinner | set | messageid: <1530058918.53.0.56676864532.issue33966@psf.upfronthosting.co.za> |
2018-06-27 00:21:58 | vstinner | link | issue33966 messages |
2018-06-27 00:21:57 | vstinner | create | |
|