[issue4660] multiprocessing.JoinableQueue task_done() issue

Brian report at bugs.python.org
Mon Mar 30 22:25:33 CEST 2009


Brian <brian at merrells.org> added the comment:

Hey Jesse,
It was good meeting you at Pycon.  I don't have anything handy at the moment
although, if memory serves, the most trivial of example seemed to illustrate
the problem.  Basically any situation where a joinable queue would keep
bumping up against being empty (ie retiring items faster than they are being
fed), and does enough work between get() and task_done() to be preempted
would eventually break.  FWIW I was running on a Windows box.

I am afraid I am away from my computer until late tonight but I can try to
cook something up then (I presume you are sprinting today?).  Also I think
the issue becomes clear when you think about what happens if
joinablequeue.task_done() gets preempted between its few lines.

-brian

On Mon, Mar 30, 2009 at 2:55 PM, Jesse Noller <report at bugs.python.org>wrote:

>
> Jesse Noller <jnoller at gmail.com> added the comment:
>
> Hi Brian - do you have a chunk of code that exacerbates this? I'm having
> problems reproducing this, and need a test so I can prove out the fix.
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue4660>
> _______________________________________
>

----------
Added file: http://bugs.python.org/file13485/unnamed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4660>
_______________________________________
-------------- next part --------------
Hey Jesse,<div><br></div><div>It was good meeting you at Pycon.  I don&#39;t have anything handy at the moment although, if memory serves, the most trivial of example seemed to illustrate the problem.  Basically any situation where a joinable queue would keep bumping up against being empty (ie retiring items faster than they are being fed), and does enough work between get() and task_done() to be preempted would eventually break.  FWIW I was running on a Windows box.</div>

<div><br></div><div>I am afraid I am away from my computer until late tonight but I can try to cook something up then (I presume you are sprinting today?).  Also I think the issue becomes clear when you think about what happens if joinablequeue.task_done() gets preempted between its few lines.</div>

<div><br></div><div>-brian</div><div><br></div><div><div class="gmail_quote">On Mon, Mar 30, 2009 at 2:55 PM, Jesse Noller <span dir="ltr">&lt;<a href="mailto:report at bugs.python.org">report at bugs.python.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Jesse Noller &lt;<a href="mailto:jnoller at gmail.com">jnoller at gmail.com</a>&gt; added the comment:<br>
<br>
Hi Brian - do you have a chunk of code that exacerbates this? I&#39;m having<br>
problems reproducing this, and need a test so I can prove out the fix.<br>
<br>
----------<br>
<div><div></div><div class="h5"><br>
_______________________________________<br>
Python tracker &lt;<a href="mailto:report at bugs.python.org">report at bugs.python.org</a>&gt;<br>
&lt;<a href="http://bugs.python.org/issue4660" target="_blank">http://bugs.python.org/issue4660</a>&gt;<br>
_______________________________________<br>
</div></div></blockquote></div><br></div>


More information about the Python-bugs-list mailing list