Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'subject:error': 0.03; 'url:pypi': 0.03; 'insert': 0.05; 'pypi': 0.07; 'here?': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:using': 0.09; 'though...': 0.09; 'runs': 0.10; 'python': 0.11; 'fork': 0.16; 'messy': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:distribution': 0.16; 'wrote:': 0.18; 'module': 0.19; 'thoughts': 0.19; 'header:User- Agent:1': 0.23; 'subject:python.org': 0.24; 'fine': 0.24; 'header:X-Complaints-To:1': 0.27; 'chris': 0.29; 'url:bugs': 0.29; 'especially': 0.30; 'code': 0.31; '25,': 0.31; 'run': 0.32; 'another': 0.32; 'url:python': 0.33; 'entirely': 0.33; 'fri,': 0.33; "i'd": 0.34; "can't": 0.35; 'something': 0.35; 'test': 0.35; 'there': 0.35; 'version': 0.36; 'charset:us-ascii': 0.36; 'possible': 0.36; 'url:org': 0.36; 'should': 0.36; 'error.': 0.37; 'problems': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'anything': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'improved': 0.60; 'first': 0.61; 'received:204': 0.75; 'article': 0.77; 'received:204.14': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ned Deily Subject: Re: MacOS 10.9.2: threading error using python.org 2.7.6 distribution Date: Fri, 25 Apr 2014 11:58:56 -0700 References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 204.14.154.233 User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1398452352 news.xs4all.nl 2836 [2001:888:2000:d::a6]:45147 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:70615 In article , Chris Angelico wrote: > On Fri, Apr 25, 2014 at 11:43 PM, Matthew Pounsett > wrote: > > If I insert that object into the test code and run it instead of > > MyThread(), I get the error. I can't see anything in there that should > > cause problems for the threading module though... especially since this > > runs fine on another system with the same version of python. > > > > Any thoughts on what's going on here? > > First culprit I'd look at is the mixing of subprocess and threading. > It's entirely possible that something goes messy when you fork from a > thread. FWIW, the Python 2 version of subprocess is known to be thread-unsafe. There is a Py2 backport available on PyPI of the improved Python 3 subprocess module: http://bugs.python.org/issue20318 https://pypi.python.org/pypi/subprocess32/ -- Ned Deily, nad@acm.org