[ python-Bugs-1754642 ] subprocess.Popen.wait fails sporadically with threads

SourceForge.net noreply at sourceforge.net
Mon Jul 16 11:32:26 CEST 2007


Bugs item #1754642, was opened at 2007-07-16 11:26
Message generated for change (Comment added) made by gjb1002
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1754642&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Geoffrey Bache (gjb1002)
Assigned to: Nobody/Anonymous (nobody)
Summary: subprocess.Popen.wait fails sporadically with threads

Initial Comment:
When several threads are using the subprocess module I occasionally get stack traces that look like 

    out, err = process.communicate()
  File "/usr/lib/python2.4/subprocess.py", line 1083, in communicate
    self.wait()
  File "/usr/lib/python2.4/subprocess.py", line 1007, in wait
    pid, sts = os.waitpid(self.pid, 0)
OSError: [Errno 10] No child processes

See the fixed bug at 

https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1183780&group_id=5470

The problem I am observing seems to match the one described there in the "related modules" part. After discovering that bug, I downloaded the test program attached to it and discovered that I got the errors described from time to time. I am using Python 2.4.3 on Red Hat EL4 and Python 2.4.4 on Red Hat EL3, and both have this error.

I reattach my tweaked version of that test program. The only basic difference is that testing subprocess is the default option and the default number of threads increased to 50 as this seemed to mean it occurred more often. I have reproduced the original popen2 problem once on Python 2.4.4 but it's much more infrequent, and not a problem in practice for me. 

See the comment at the top of that script for details of expected behaviour etc.


----------------------------------------------------------------------

>Comment By: Geoffrey Bache (gjb1002)
Date: 2007-07-16 11:32

Message:
Logged In: YES 
user_id=769182
Originator: YES

Hmm, seems someone else reported this during the weekend. Looks rather
similar to bug 1753891...

I let someone else mark as duplicate if they want. Can't harm to have two
different test programs for an indeterministic problem :)


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1754642&group_id=5470


More information about the Python-bugs-list mailing list