[issue14881] multiprocessing.dummy craches when self._parent._children does not exist
Andres Riancho added the comment: Is this a duplicate for http://bugs.python.org/issue10015 #10015 ? -- nosy: +Andres.Riancho ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14881 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14881] multiprocessing.dummy craches when self._parent._children does not exist
Terry J. Reedy added the comment: Since this is already fixed and closed, the question is more relevant to #10015 and whether it should be closed. The answer seems to be yes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14881 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14881] multiprocessing.dummy craches when self._parent._children does not exist
Terry J. Reedy added the comment: By the way, thanks for noticing, so it *can* be closed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14881 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14881] multiprocessing.dummy craches when self._parent._children does not exist
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 1f5d2642929a by Richard Oudkerk in branch '2.7': Issue #14881: Allow normal non-main thread to spawn a dummy process http://hg.python.org/cpython/rev/1f5d2642929a New changeset 0528ec18e230 by Richard Oudkerk in branch '3.2': Issue #14881: Allow normal non-main thread to spawn a dummy process http://hg.python.org/cpython/rev/0528ec18e230 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14881 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14881] multiprocessing.dummy craches when self._parent._children does not exist
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14881 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14881] multiprocessing.dummy craches when self._parent._children does not exist
Terry J. Reedy tjre...@udel.edu added the comment: 3.3 commit is http://hg.python.org/cpython/rev/9373ca8c6c55 Richard, it did not record here because you just said 'Merge' rather than #14881 merge ;-). Great to see a crasher fixed. Ready to close? -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14881 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14881] multiprocessing.dummy craches when self._parent._children does not exist
Richard Oudkerk shibt...@gmail.com added the comment: I'll, remember that in future;-) Closing. -- resolution: - fixed stage: - committed/rejected status: open - closed type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14881 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14881] multiprocessing.dummy craches when self._parent._children does not exist
New submission from Itay Brandes akari...@gmail.com: multiprocessing.dummy crashes when attempting to create a ThreadPool from a Thread. The following code will crush on 2.7.3: import multiprocessing.dummy import threading class Worker(threading.Thread): def __init__(self): threading.Thread.__init__(self) def run(self): poll = multiprocessing.dummy.Pool(5) print str(poll) w = Worker() w.start() will crush with the following traceback: poll = multiprocessing.dummy.Pool(5) File C:\Python27\lib\multiprocessing\dummy\__init__.py, line 150, in Pool return ThreadPool(processes, initializer, initargs) File C:\Python27\lib\multiprocessing\pool.py, line 685, in __init__ Pool.__init__(self, processes, initializer, initargs) File C:\Python27\lib\multiprocessing\pool.py, line 136, in __init__ self._repopulate_pool() File C:\Python27\lib\multiprocessing\pool.py, line 199, in _repopulate_pool w.start() File C:\Python27\lib\multiprocessing\dummy\__init__.py, line 73, in start self._parent._children[self] = None AttributeError: 'Worker' object has no attribute '_children' If you have access to the thread itself, you can set the _children attribute youself (w._children = weakref.WeakKeyDictionary()), but it is not possible with threads different from threading.thread (Such as PyQt4's QThread thread, which is essential for GUI programming). The fix that I found is to edit the Python27\Lib\multiprocessing\dummy\__init__.py file. The crashing code is line number 73. This line should be nested in an if block: if hasattr(self._parent, '_children'): self._parent._children[self] = None That way the code is fixed. Thanks! -- components: None messages: 161339 nosy: Itay.Brandes priority: normal severity: normal status: open title: multiprocessing.dummy craches when self._parent._children does not exist type: crash versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14881 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14881] multiprocessing.dummy craches when self._parent._children does not exist
Changes by Itay Brandes akari...@gmail.com: -- components: +Library (Lib) -None ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14881 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14881] multiprocessing.dummy craches when self._parent._children does not exist
Changes by Richard Oudkerk shibt...@gmail.com: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14881 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com