[Bug 1100343] Re: Error on some forked thread termination in python threading module
Matthias Klose
doko at ubuntu.com
Thu Jan 24 14:31:43 UTC 2013
fixed in quantal and raring
** Also affects: python2.7 (Ubuntu Precise)
Importance: Undecided
Status: New
** Changed in: python2.7 (Ubuntu Precise)
Status: New => In Progress
** Changed in: python2.7 (Ubuntu Precise)
Milestone: None => precise-updates
** Changed in: python2.7 (Ubuntu)
Status: New => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python2.7 in Ubuntu.
https://bugs.launchpad.net/bugs/1100343
Title:
Error on some forked thread termination in python threading module
Status in “python2.7” package in Ubuntu:
Fix Released
Status in “python2.7” source package in Precise:
In Progress
Bug description:
I'd like for the fix to python issue 14308 to be ported to python2.7 in Ubuntu Precise.
http://bugs.python.org/issue14308
As near as I can tell, it affects python 2.7 threading.Thread threads
which have were are created, call currentThread(), are then forked,
and then terminate.
For my purposes, it is affecting some code I wrote which does spawns
processes to run simple shell scripts in the background. It also
seems to have affected various Django projects as well as Duplicity as
per https://bugs.launchpad.net/duplicity/+bug/946993. As I read that
ticket, it was fixed via a workaround in Duplicity/Debbugs? It seems
to me that this is really a Python2.7 bug.
I was able to easily reproduce this bug with this small test case as per the python bug ticket on Ubuntu Precise Server:
<code>
#!/usr/bin/python
import os
import thread
import threading
import time
def t():
threading.currentThread() # Populate threading._active with a DummyThread
time.sleep(3)
thread.start_new_thread(t, ())
time.sleep(1)
pid = os.fork()
if pid == 0:
os._exit(0)
os.waitpid(pid, 0)
</code>
The fix is a simple two-line patch to threading.py implemented by the
fix for python bug 14308. I have also attached that, again from
http://bugs.python.org/issue14308.
As far as I can tell, this has not made its way from upstream to
Precise. My sincerest apologies if this is reported elsewhere or my
report is somehow inappropriate.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1100343/+subscriptions
More information about the foundations-bugs
mailing list