Python deadlock using subprocess.popen and communicate

Atherun atherun at gmail.com
Thu Sep 22 00:52:42 EDT 2011


On Sep 21, 8:58 pm, Roy Smith <r... at panix.com> wrote:
> In article <mailman.1343.1316663531.27778.python-l... at python.org>,
>  Chris Rebert <c... at rebertia.com> wrote:
>
> > Popen.poll():
> >     Check if child process has terminated. Set **and return**
> > returncode attribute.
> > [Direct quote from the docs; emphasis added]
>
> Doh.  I read right past that and didn't see it.  Thanks for the
> correction.

I removed the loop and changed it to a single communicate now, still
get a deadlock.  All threads just stop, even threads that have nothing
to do with the ongoing subprocesses.  I specifically created a thread
that dumps the stack trace of all threads so I can try and view the
deadlocks, but that stops responding at the same time as the
deadlock.  This wasn't happening before so not sure why it changed
suddenly.



More information about the Python-list mailing list