classification
Title: QueueListener not calling task_done upon termination
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: bar.harel, miss-islington, rhettinger, vinay.sajip
Priority: normal Keywords: patch

Created on 2019-05-06 15:03 by bar.harel, last changed 2019-06-01 09:36 by miss-islington. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 13113 merged bar.harel, 2019-05-06 15:44
PR 13722 merged miss-islington, 2019-06-01 09:19
Messages (5)
msg341519 - (view) Author: Bar Harel (bar.harel) * Date: 2019-05-06 15:03
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.
msg341549 - (view) Author: Bar Harel (bar.harel) * Date: 2019-05-06 15:51
Alright, patch submitted.
Shall I add regression tests?
msg341805 - (view) Author: Bar Harel (bar.harel) * Date: 2019-05-07 19:28
Alright. Regression tests added, all tests pass. Patch ready for upload!
msg344160 - (view) Author: miss-islington (miss-islington) Date: 2019-06-01 09:19
New changeset 6b282e18877ec84e927b381b4ce187eaf4ba3dd7 by Miss Islington (bot) (Bar Harel) in branch 'master':
bpo-36813: Fix QueueListener to call task_done() upon termination. (GH-13113)
https://github.com/python/cpython/commit/6b282e18877ec84e927b381b4ce187eaf4ba3dd7
msg344161 - (view) Author: miss-islington (miss-islington) Date: 2019-06-01 09:36
New changeset f286e0373feda0955c910a9fe4ef99cd2c40969e by Miss Islington (bot) in branch '3.7':
bpo-36813: Fix QueueListener to call task_done() upon termination. (GH-13113)
https://github.com/python/cpython/commit/f286e0373feda0955c910a9fe4ef99cd2c40969e
History
Date User Action Args
2019-06-01 09:36:32miss-islingtonsetmessages: + msg344161
2019-06-01 09:36:25asvetlovsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-06-01 09:19:21miss-islingtonsetpull_requests: + pull_request13608
2019-06-01 09:19:15miss-islingtonsetnosy: + miss-islington
messages: + msg344160
2019-05-07 19:28:10bar.harelsetnosy: + vinay.sajip
messages: + msg341805
2019-05-06 15:51:19bar.harelsetmessages: + msg341549
2019-05-06 15:44:04bar.harelsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request13027
2019-05-06 15:06:27SilentGhostsetnosy: + rhettinger
stage: needs patch

versions: - Python 3.6, Python 3.9
2019-05-06 15:03:59bar.harelcreate