Author gdb
Recipients gdb, jnoller
Date 2010-07-10.16:14:38
SpamBayes Score 0.00209274
Marked as misclassified No
Message-id <1278778483.78.0.438373563328.issue9205@psf.upfronthosting.co.za>
In-reply-to
Content
Cool, thanks.  I'll note that with this patch applied, using the test program from 9207 I consistently get the following exception:
"""
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
  File "/usr/lib/python2.6/threading.py", line 484, in run
  File "/home/gdb/repositories/multiprocessing/pool.py", line 312, in _handle_workers
  File "/home/gdb/repositories/multiprocessing/pool.py", line 190, in _maintain_pool
  File "/home/gdb/repositories/multiprocessing/pool.py", line 158, in _join_exited_workers
<type 'exceptions.TypeError'>: 'NoneType' object is not callable
"""

This is line 148 in the unpatched source, namely the 'reversed(range(len(self._pool)))' line of _join_exited_workers.  Looks like the same issue, where instead reversed/range/len have been set to None.

So I think by changing how much time the worker_handler spends in various functions, I've made it possible (or just more likely?) that if we lose the race with interpreter shutdown the worker_handler will be in the middle of _join_exited_workers.  This may mean that someone should keep around a local reference to reversed/range/len... not sure if there's a better solution.
History
Date User Action Args
2010-07-10 16:14:43gdbsetrecipients: + gdb, jnoller
2010-07-10 16:14:43gdbsetmessageid: <1278778483.78.0.438373563328.issue9205@psf.upfronthosting.co.za>
2010-07-10 16:14:39gdblinkissue9205 messages
2010-07-10 16:14:38gdbcreate