Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to start a thread leaves "zombie" thread in "initial" state #51730

Closed
schof mannequin opened this issue Dec 11, 2009 · 5 comments
Closed

Failing to start a thread leaves "zombie" thread in "initial" state #51730

schof mannequin opened this issue Dec 11, 2009 · 5 comments
Assignees
Labels
type-bug An unexpected behavior, bug, or error

Comments

@schof
Copy link
Mannequin

schof mannequin commented Dec 11, 2009

BPO 7481
Nosy @gpshead, @pitrou
Files
  • repro_case.py: Reproduction case for this issue.
  • issue_7481_py27.diff: Patch for Python 2.7
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/gpshead'
    closed_at = <Date 2010-02-28.19:22:03.733>
    created_at = <Date 2009-12-11.19:15:39.310>
    labels = ['type-bug']
    title = 'Failing to start a thread leaves "zombie" thread in "initial" state'
    updated_at = <Date 2010-02-28.19:22:03.732>
    user = 'https://bugs.python.org/schof'

    bugs.python.org fields:

    activity = <Date 2010-02-28.19:22:03.732>
    actor = 'gregory.p.smith'
    assignee = 'gregory.p.smith'
    closed = True
    closed_date = <Date 2010-02-28.19:22:03.733>
    closer = 'gregory.p.smith'
    components = []
    creation = <Date 2009-12-11.19:15:39.310>
    creator = 'schof'
    dependencies = []
    files = ['15527', '16399']
    hgrepos = []
    issue_num = 7481
    keywords = ['patch']
    message_count = 5.0
    messages = ['96271', '96305', '100213', '100215', '100217']
    nosy_count = 6.0
    nosy_names = ['gregory.p.smith', 'pitrou', 'jyasskin', 'gps', 'nirai', 'schof']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = 'needs patch'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue7481'
    versions = ['Python 2.6', 'Python 3.1', 'Python 2.7', 'Python 3.2']

    @schof
    Copy link
    Mannequin Author

    schof mannequin commented Dec 11, 2009

    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

    @schof schof mannequin added the type-bug An unexpected behavior, bug, or error label Dec 11, 2009
    @pitrou
    Copy link
    Member

    pitrou commented Dec 12, 2009

    I can reproduce it under Linux using "ulimit -Su 2600".
    (deselecting 2.5 as it doesn't receive bug fixes anymore)

    @nirai
    Copy link
    Mannequin

    nirai mannequin commented Feb 28, 2010

    Here is a patch

    @gpshead gpshead self-assigned this Feb 28, 2010
    @gpshead
    Copy link
    Member

    gpshead commented Feb 28, 2010

    fixed in trunk r78517 and release26-maint r78518.

    still needs merging into py3k and release31-maint

    @gpshead
    Copy link
    Member

    gpshead commented Feb 28, 2010

    r78519 r78520 for py3k and 3.1.

    @gpshead gpshead closed this as completed Feb 28, 2010
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants