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 HiassofT
Recipients HiassofT, asvetlov, benjamin-sch, vstinner, yselivanov
Date 2021-10-07.13:37:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1633613877.96.0.697395351428.issue45262@roundup.psfhosted.org>
In-reply-to
Content
We were hitting the same issue in kodi, which uses embedded sub-interpreters to run python addons, after one of the addons was switched to asyncio.

The immediate cause of the assertion failure is a use-after-free issue from the running loop holder cache:

When the running loop holder is deallocated (which happens eg on interpreter shutdown) cached_running_holder holds a dangling pointer.

A subsequent call to get_running_loop() may then pick that up and boom.

While probably not a full fix for this issue I think it would be good to fix the use-after-free problem - there could be other code paths that lead to this situation. I've created a github pull request for that
History
Date User Action Args
2021-10-07 13:37:57HiassofTsetrecipients: + HiassofT, vstinner, asvetlov, yselivanov, benjamin-sch
2021-10-07 13:37:57HiassofTsetmessageid: <1633613877.96.0.697395351428.issue45262@roundup.psfhosted.org>
2021-10-07 13:37:57HiassofTlinkissue45262 messages
2021-10-07 13:37:57HiassofTcreate