[Bug 747794] New: Python multiprocessing.pool: Thread tries to join itself

https://bugzilla.novell.com/show_bug.cgi?id=747794 https://bugzilla.novell.com/show_bug.cgi?id=747794#c0 Summary: Python multiprocessing.pool: Thread tries to join itself Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: All OS/Version: openSUSE 12.1 Status: NEW Severity: Normal Priority: P5 - None Component: Development AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: Yarny@public-files.de QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 When pool objects (from the multiprocessing module) are close()'d, sometimes one of the threads that handle the processes tries to join itself. The threading module wisely prohibits this and instead raises an exception. The result is an ugly error message for the user. Reproducible: Always Steps to Reproduce: from multiprocessing import Pool for d in range(2): p=Pool(2) p.close() Actual Results: Exception RuntimeError: RuntimeError('cannot join current thread',) in <Finalize object, dead> ignored This is a regression: It didn't happen in openSUSE 11.4 / Python 2.7. This bug also affects the multiprocessing.dummy module. It seems that this bug is only triggered when a close() is issued while another close() is still pending: Adding "p.join()" to the for-loop above inhibits the exception. The cause of this bug is line 460 in /usr/lib/python/multiprocessing/pool.py:
worker_handler.join()
It was added by this commit: <URL:http://hg.python.org/cpython/rev/dfc61dc14f59> My solution/workaround is to change this line to
if worker_handler!=threading.current_thread(): worker_handler.join()
but I don't understand the meaning of this join()ing anyway, so I can't judge whether this might break something. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=747794 https://bugzilla.novell.com/show_bug.cgi?id=747794#c1 --- Comment #1 from kk zhang <kkzhang@novell.com> 2012-03-11 08:37:43 UTC --- *** Bug 748356 has been marked as a duplicate of this bug. *** http://bugzilla.novell.com/show_bug.cgi?id=748356 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=747794 https://bugzilla.novell.com/show_bug.cgi?id=747794#c kk zhang <kkzhang@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kkzhang@novell.com AssignedTo|bnc-team-screening@forge.pr |jmatejek@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=747794 https://bugzilla.novell.com/show_bug.cgi?id=747794#c2 Yarny Yarny <Yarny@public-files.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Development |Development Version|Final |RC 2 AssignedTo|jmatejek@suse.com |bnc-team-screening@forge.pr | |ovo.novell.com Product|openSUSE 12.1 |openSUSE 12.2 OS/Version|openSUSE 12.1 |openSUSE 12.2 --- Comment #2 from Yarny Yarny <Yarny@public-files.de> 2012-08-26 11:48:49 UTC --- This bug is also present in current openSUSE 12.2 (DVD build 0091). I'm updating Product/OS. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=747794 https://bugzilla.novell.com/show_bug.cgi?id=747794#c kk zhang <kkzhang@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |jmatejek@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=747794 https://bugzilla.novell.com/show_bug.cgi?id=747794#c3 Jan Matejek <jmatejek@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #3 from Jan Matejek <jmatejek@suse.com> 2013-05-09 12:42:35 UTC --- this has been fixed in Factory and 12.3 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com