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.

Author rpurdie
Recipients rpurdie
Date 2020-09-04.11:43:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1599219824.59.0.591749825989.issue41714@roundup.psfhosted.org>
In-reply-to
Content
Even my hack to call _writer.close() doesn't seem to be enough, it makes the problem rarer but there is still an issue. 
Basically, if you call cancel_join_thread() in one process, the queue is potentially totally broken in all other processes that may be using it. If for example another has called join_thread() as it was exiting and has queued data at the same time as another process exits using cancel_join_thread() and exits holding the write lock, you'll deadlock on the processes now stuck in join_thread() waiting for a lock they'll never get.
I suspect the answer is "don't use cancel_join_thread()" but perhaps the docs need a note to point out that if anything is already potentially exiting, it can deadlock? I'm not sure you can actually use the API safely unless you stop all users from exiting and synchronise that by other means?
History
Date User Action Args
2020-09-04 11:43:44rpurdiesetrecipients: + rpurdie
2020-09-04 11:43:44rpurdiesetmessageid: <1599219824.59.0.591749825989.issue41714@roundup.psfhosted.org>
2020-09-04 11:43:44rpurdielinkissue41714 messages
2020-09-04 11:43:44rpurdiecreate