This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Failing to start a thread leaves "zombie" thread in "initial" state
Type: behavior Stage: needs patch
Components: Versions: Python 3.1, Python 3.2, Python 2.7, Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: gps, gregory.p.smith, jyasskin, nirai, pitrou, schof
Priority: normal Keywords: patch

Created on 2009-12-11 19:15 by schof, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
repro_case.py schof, 2009-12-11 19:15 Reproduction case for this issue.
issue_7481_py27.diff nirai, 2010-02-28 18:16 Patch for Python 2.7
Messages (5)
msg96271 - (view) Author: John Mark Schofield (schof) Date: 2009-12-11 19:15
SUMMARY: When you attempt to start a thread, and you're unable to (you
get thread.error) it leaves a thread stuck in an "initial" state that
never exits. (threading.enumerate() shows the threads and lists their
status as "initial.")

REPRODUCTION STEPS: See attached file.

EXPECTED RESULT: Failing to start a thread should not leave the thread
in an un-executable state. I would expect the thread start to either
succeed or result in the thread being closed and GC'd.

VERIFIED ON:
Python 2.5.2 on OS X 10.5.8
Python 2.5.2 on Ubuntu 8.04
Python 2.5.4 on Windows XP Professional (Version 2002) SP3
Python 2.6.1 on OS X 10.6.2
msg96305 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-12-12 19:48
I can reproduce it under Linux using "ulimit -Su 2600".
(deselecting 2.5 as it doesn't receive bug fixes anymore)
msg100213 - (view) Author: Nir Aides (nirai) (Python triager) Date: 2010-02-28 18:16
Here is a patch
msg100215 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2010-02-28 18:41
fixed in trunk r78517 and release26-maint r78518.

still needs merging into py3k and release31-maint
msg100217 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2010-02-28 19:22
r78519 r78520 for py3k and 3.1.
History
Date User Action Args
2022-04-11 14:56:55adminsetgithub: 51730
2010-02-28 19:22:03gregory.p.smithsetstatus: open -> closed

messages: + msg100217
2010-02-28 18:41:24gregory.p.smithsetresolution: accepted
messages: + msg100215
2010-02-28 18:25:17gregory.p.smithsetassignee: gregory.p.smith

nosy: + gregory.p.smith
2010-02-28 18:16:03niraisetfiles: + issue_7481_py27.diff
keywords: + patch
messages: + msg100213
2009-12-25 08:00:46niraisetnosy: + nirai
2009-12-12 19:48:11pitrousetpriority: normal
versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.5
nosy: + jyasskin, gps, pitrou

messages: + msg96305

stage: needs patch
2009-12-11 19:15:39schofcreate