Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue7292] Multiprocessing Joinable race condition?

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Nov 8, 2009, 10:31 PM

Post #1 of 1 (152 views)
Permalink
[issue7292] Multiprocessing Joinable race condition?

New submission from Jonathan <jonathan [at] kc8onw>:

In multiprocessing.JoinableQueue when task_done is called
self._unfinished_tasks.acquire(False) is called non-blocking. My
program reliably crashes with the "task_done() called too many times"
message. If I change the .acquire() call to True (blocking) then my
program no longer crashes and I have not noticed any adverse effects. I
don't know if this would be considered a race condition or something
else but it does lead to crashes even in correct use scenarios.

(Code snippet follows for context, line 292 is the critical one for me)

def task_done(self):
self._cond.acquire()
try:
if not self._unfinished_tasks.acquire(False):
raise ValueError('task_done() called too many times')
if self._unfinished_tasks._semlock._is_zero():

----------
components: None
messages: 95059
nosy: jonathan [at] kc8onw
severity: normal
status: open
title: Multiprocessing Joinable race condition?
type: behavior
versions: Python 3.1

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7292>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.