New submission from Kevin Quick:

The sentinel creates a named pipe, but the parent's end of the pipe is 
inherited by subsequently created children.  

import multiprocessing,signal,sys
def sproc(x): signal.pause()
for each in range(int(sys.argv[1])):
  multiprocessing.Process(target=sproc, args=(each,)).start()
signal.pause()

Running the above on Linux with varying numbers of child processes (expressed 
as the argument to the above) and using techniques like "$ sudo ls 
/proc/NNNN/fd" it is possible to see an ever growing number of pipe connections 
for subsequent children.

----------
components: Library (Lib)
messages: 263153
nosy: quick-b
priority: normal
severity: normal
status: open
title: multiprocessing sentinel resource leak
type: resource usage
versions: Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to