multiprocessing Pool hangs in terminate()

Open
#78,178 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
backend

Research direction

Start with the attached multiprocessing_hangs.py and test_multiprocessing.py files, then inspect the relevant multiprocessing Pool implementation and PR 8009. Reproduce the hang described by the attached debugging files and compare the existing test coverage. Done means the termination hang is addressed and the multiprocessing test demonstrates the corrected behavior.

Written by the indexing model from the issue text.

Description

3.7 (EOL) 3.8 (EOL) 3.9 (EOL) stdlib topic-multiprocessing type-bug
BPO 33997
Nosy @pfmoore, @pitrou, @tjguk, @zware, @zooba, @applio, @remilapeyre, @3mb3dw0rk5, @alexmojaki
PRs
  • python/cpython#8009
  • Files
  • debug.trace
  • multiprocessing_hangs.py
  • test_multiprocessing.py
  • pool_terminate_snoop.txt
  • 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 = None
    closed_at = None
    created_at = <Date 2018-06-29.12:37:53.185>
    labels = ['3.7', '3.8', 'type-bug', 'library', '3.9']
    title = 'multiprocessing Pool hangs in terminate()'
    updated_at = <Date 2020-09-01.09:45:02.063>
    user = 'https://github.com/3mb3dw0rk5'
    

    bugs.python.org fields:

    activity = <Date 2020-09-01.09:45:02.063>
    actor = 'vstinner'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2018-06-29.12:37:53.185>
    creator = '3mb3dw0rk5'
    dependencies = []
    files = ['47659', '48531', '48532', '48867']
    hgrepos = []
    issue_num = 33997
    keywords = ['patch']
    message_count = 6.0
    messages = ['320713', '320726', '349051', '349052', '360761', '360762']
    nosy_count = 10.0
    nosy_names = ['paul.moore', 'pitrou', 'tim.golden', 'zach.ware', 'steve.dower', 'davin', 'remi.lapeyre', '3mb3dw0rk5', 'alexmojaki', 'paul.madden']
    pr_nums = ['8009']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue33997'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']
    

    Dominant language
    Python
    Stars
    77.2k
    Forks
    36k
    Avg merge
    1d 9h
    Merged PRs (30d)
    558

    Contributor guide

    Open the contributing guide

    First steps

    1. Read the whole issue, then the project's contributing guide.
    2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
    3. Fork the repository and make your change on a branch.
    4. Open a pull request that references the issue number.

    More from python/cpython

    All issues in python/cpython

    Similar issues

    More Python issues

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.