[issue33081] multiprocessing Queue leaks a file descriptor associated with the pipe writer

Antoine Pitrou report at bugs.python.org
Fri Mar 23 12:57:13 EDT 2018


Antoine Pitrou <pitrou at free.fr> added the comment:

Thanks for reporting this.  I agree this is a real issue, but it doesn't exist on Python 3 anymore:

>>> q = multiprocessing.Queue()
>>> q.put(1)
>>> q.get()
1
>>> threading.enumerate()
[<_MainThread(MainThread, started 139978753529600)>, <Thread(QueueFeederThread, started daemon 139978667779840)>]
>>> q.close()
>>> threading.enumerate()
[<_MainThread(MainThread, started 139978753529600)>]
>>> os.getpid()
17318

And in another terminal:

$ ls -la /proc/17318/fd
total 0
dr-x------ 2 antoine antoine  0 mars  23 17:51 .
dr-xr-xr-x 9 antoine antoine  0 mars  23 17:51 ..
lrwx------ 1 antoine antoine 64 mars  23 17:52 0 -> /dev/pts/8
lrwx------ 1 antoine antoine 64 mars  23 17:52 1 -> /dev/pts/8
lrwx------ 1 antoine antoine 64 mars  23 17:51 2 -> /dev/pts/8


I'm uninterested in fixing this on Python 2, so I'm closing.

----------
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33081>
_______________________________________


More information about the Python-bugs-list mailing list