[Python-Dev] Child process freezes during fork pipe exec

Nick Coghlan ncoghlan at gmail.com
Mon Jan 19 13:21:50 CET 2009


Gangadharan S.A. wrote:
> Hi,
> 
> Summary:
>     * In my organization, we have a *multi threaded* (threading library)
> python (python 2.4.1) daemon on Linux, which starts up various processes
> using the fork pipe exec model.

The fork+threading combination had some fairly major issues that weren't
resolved until the multiprocessing module was added for 2.6/3.0 [1]

If you're able to upgrade to 2.5.4 things should be much better since
many of the fork+threading fixes were backported to the 2.5 maintenance
branch.

For 2.4 I think you're pretty much out of luck though - it was already
into security fix only mode by the time the child process deadlock
problems in the fork/threading interaction were worked out.

I don't personally know if your implementation could be modified in any
way to make the deadlock less likely with Python 2.4, but the only way
to eliminate the problem entirely (modulo any platform specific
fork+threading problems) is to upgrade to the latest version of Python 2.5.

Regards,
Nick.

[1] The bug you're probably encountering:
http://bugs.python.org/issue874900

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------


More information about the Python-Dev mailing list