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 bennieswart
Recipients asvetlov, bennieswart, yselivanov
Date 2021-05-20.11:51:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1621511496.17.0.839085647104.issue44188@roundup.psfhosted.org>
In-reply-to
Content
The concurrent.futures.ThreadPoolExecutor class, which is the default asyncio executor, introduced the _idle_semaphore field in version 3.8 in order to track idle threads so they can be reused before increasing the pool size unnecessarily.
This semaphore counter becomes unbalanced when the thread pool is over-saturated, as can be seen in the file provided. This is due to workers always incrementing the count after finishing a job, whereas the executor only decrements the count if it is already greater than 0.
This seems to be a logic bug unrelated to the running environment and introduced since python 3.8.
History
Date User Action Args
2021-05-20 11:51:36bennieswartsetrecipients: + bennieswart, asvetlov, yselivanov
2021-05-20 11:51:36bennieswartsetmessageid: <1621511496.17.0.839085647104.issue44188@roundup.psfhosted.org>
2021-05-20 11:51:36bennieswartlinkissue44188 messages
2021-05-20 11:51:36bennieswartcreate