Python has a bug in the threading module which produces exceptions in some cases. For information, see these links: http://bugs.python.org/issue14308 http://stackoverflow.com/questions/13193278/understand-python-threading-bug I have patched Python in a local overlay with the following patch in ${FILESDIR}: diff --git a/dev-lang/python/files/python-2.7.3-r2-threading-fix.patch b/dev-lang/python/files/python-2.7.3-r2-threading-fix.patch new file mode 100644 index 0000000..7d6fdb5 --- /dev/null +++ b/dev-lang/python/files/python-2.7.3-r2-threading-fix.patch @@ -0,0 +1,14 @@ +diff -Naur Python-2.7.3/Lib/threading.py Python-2.7.3-patched/Lib/threading.py +--- Python-2.7.3/Lib/threading.py 2012-04-09 16:07:32.000000000 -0700 ++++ Python-2.7.3-patched/Lib/threading.py 2013-01-27 12:05:55.388399814 -0800 +@@ -605,6 +605,10 @@ + pass + + def __stop(self): ++ # DummyThreads delete self.__block, but they have no waiters to ++ # notify anyway (join() is forbidden on them). ++ if not hasattr(self, '_Thread__block'): ++ return + self.__block.acquire() + self.__stopped = True + self.__block.notify_all() Could this patch be added to the Portage tree for this ebuild? Reproducible: Always Steps to Reproduce: 1. emerge =dev-python/python-2.7.3-r2 2. Follow repro steps in Python issue (http://bugs.python.org/issue14308)
Note: diff --git a/dev-lang/python/files/
This is present in current versions.