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

QueueListener not calling task_done upon termination #80994

Closed
bharel mannequin opened this issue May 6, 2019 · 5 comments
Closed

QueueListener not calling task_done upon termination #80994

bharel mannequin opened this issue May 6, 2019 · 5 comments
Labels
3.7 (EOL) end of life 3.8 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@bharel
Copy link
Mannequin

bharel mannequin commented May 6, 2019

BPO 36813
Nosy @rhettinger, @vsajip, @bharel, @miss-islington
PRs
  • bpo-36813: Fix QueueListener to call task_done() upon termination. #13113
  • [3.7] bpo-36813: Fix QueueListener to call task_done() upon termination. (GH-13113) #13722
  • 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 = <Date 2019-06-01.09:36:25.014>
    created_at = <Date 2019-05-06.15:03:59.772>
    labels = ['3.7', '3.8', 'type-bug', 'library']
    title = 'QueueListener not calling task_done upon termination'
    updated_at = <Date 2019-06-01.09:36:32.433>
    user = 'https://github.com/bharel'

    bugs.python.org fields:

    activity = <Date 2019-06-01.09:36:32.433>
    actor = 'miss-islington'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-06-01.09:36:25.014>
    closer = 'asvetlov'
    components = ['Library (Lib)']
    creation = <Date 2019-05-06.15:03:59.772>
    creator = 'bar.harel'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36813
    keywords = ['patch']
    message_count = 5.0
    messages = ['341519', '341549', '341805', '344160', '344161']
    nosy_count = 4.0
    nosy_names = ['rhettinger', 'vinay.sajip', 'bar.harel', 'miss-islington']
    pr_nums = ['13113', '13722']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue36813'
    versions = ['Python 3.7', 'Python 3.8']

    @bharel
    Copy link
    Mannequin Author

    bharel mannequin commented May 6, 2019

    QueueListener does not call task_done upon termination, causing an unsuspecting thread to deadlock.

    Steps to reproduce:

    >>> import queue
    >>> q = queue.Queue()
    >>> from logging.handlers import QueueListener
    >>> h = QueueListener(q)
    >>> h.start()
    >>> h.stop()
    # Goodbye cruel world!
    >>> q.join()

    Fixing and uploading a patch as we speak.

    @bharel bharel mannequin added 3.9 only security fixes 3.7 (EOL) end of life 3.8 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels May 6, 2019
    @SilentGhost SilentGhost mannequin removed the 3.9 only security fixes label May 6, 2019
    @bharel
    Copy link
    Mannequin Author

    bharel mannequin commented May 6, 2019

    Alright, patch submitted.
    Shall I add regression tests?

    @bharel
    Copy link
    Mannequin Author

    bharel mannequin commented May 7, 2019

    Alright. Regression tests added, all tests pass. Patch ready for upload!

    @miss-islington
    Copy link
    Contributor

    New changeset 6b282e1 by Miss Islington (bot) (Bar Harel) in branch 'master':
    bpo-36813: Fix QueueListener to call task_done() upon termination. (GH-13113)
    6b282e1

    @asvetlov asvetlov closed this as completed Jun 1, 2019
    @miss-islington
    Copy link
    Contributor

    New changeset f286e03 by Miss Islington (bot) in branch '3.7':
    bpo-36813: Fix QueueListener to call task_done() upon termination. (GH-13113)
    f286e03

    @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
    3.7 (EOL) end of life 3.8 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants