[issue30975] Multiprocessing: Event.set() blocks indefinitely if a process waiting on it has died.
New submission from Mick Phillips: If a process was waiting on an Event but dies for some reason, nothing else can set the Event. I think the Event._cond lock can not be acquired. See attached for a demonstration. I see the same behaviour in Python 2.7.5 and Python 3.5.2. Is this expected behaviour? -- components: Windows files: WaitersSleepers.py messages: 298713 nosy: Mick Phillips, davin, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Multiprocessing: Event.set() blocks indefinitely if a process waiting on it has died. type: behavior versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file47025/WaitersSleepers.py ___ Python tracker <http://bugs.python.org/issue30975> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30975] Multiprocessing: Event.set() blocks indefinitely if a process waiting on it has died.
Mick Phillips added the comment: Thanks for confirming. If anyone finds this and is looking for a workaround, here's what I'm using: while not event.is_set() try: time.sleep(timeout) except (KeyboardInterrupt, IOError): pass -- ___ Python tracker <http://bugs.python.org/issue30975> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30976] multiprocessing.Process.is_alive can show True for dead processes
New submission from Mick Phillips: multiprocessing.Process.is_alive() returns True for processes that have been killed. See attached for example. Workaround: also test against psutils.pid_exists. -- components: Windows files: alive.py messages: 298724 nosy: davin, mickp, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: multiprocessing.Process.is_alive can show True for dead processes versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file47028/alive.py ___ Python tracker <http://bugs.python.org/issue30976> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30976] multiprocessing.Process.is_alive can show True for dead processes
Mick Phillips added the comment: Yep - apologies, my mistake. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue30976> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com