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
Pool._repopulate_pool() creates processes with args=(self._inqueue, ...)
Pool._inqueue is a multiprocessing.queues.SimpleQueue
Process.__init__() of multiprocessing.popen_spawn_win32 calls reduction.dump(process_obj, to_child) which indirectly contains the SimpleQueue
A SimpleQueue object contains: self._reader, self._writer = connection.Pipe(duplex=False)
dump() indirectly calls reduce_connection() (ex: for SimpleQueue._reader) of multiprocessing.connection
reduce_connection() duplicates the pipe handle
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()?
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.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: