[ python-Bugs-1755179 ] Deadlocks with fork() and multithreading

SourceForge.net noreply at sourceforge.net
Tue Jul 17 01:34:28 CEST 2007


Bugs item #1755179, was opened at 2007-07-16 16:34
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1755179&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: Vanco Buca (vanco-buca)
Assigned to: Nobody/Anonymous (nobody)
Summary: Deadlocks with fork() and multithreading

Initial Comment:
Encountered a deadlock while executing a subprocess.call("<something>") in a multithreaded environment. After some debugging, found the child process stuck on a lock immediately after the fork, inside the module os's _execvpe() function. 

A Google search found a detailed discussion on this topic in the Python-Dev thread (see http://mail.python.org/pipermail/python-dev/2006-May/064983.html). 

My symptoms are exactly the same as the ones found by Rotem Yaari, and exactly the same fix worked as well (moving the "from errno import ENOENT, ENOTDIR" line to the beginning of the os.py file). 

Some details follow: 
- my code has several threads running, and some of them executes shell commands with subprocess.call(). 
- I'm running on Python 2.4.4, with a Linux 2.6.20 kernel, on a dual core system (uname -a shows: Linux rack1 2.6.18-gentoo-r3 #1 SMP PREEMPT Tue Dec 5 16:40:19 PST 2006 x86_64 AMD Opteron(tm) Processor 246 AuthenticAMD GNU/Linux)


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

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


More information about the Python-bugs-list mailing list