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 indygreg
Recipients asvetlov, indygreg, yselivanov
Date 2020-04-28.02:27:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588040845.09.0.680555822876.issue40415@roundup.psfhosted.org>
In-reply-to
Content
Most of CPython's extensions can be initialized and freed multiple times in the same process. However, _asyncio crashes on at least CPython 3.8.2 when this is done.

STR:

1. Create a new Python interpreter
2. Have it import _asyncio
3. Finalize that interpreter.
4. Create a new Python interpreter
5. Have it import _asyncio

There are probably STR in pure Python by forcing _imp.create_dynamic() to run multiple times after the module is unloaded.

The crash occurs due to unchecked NULL access in `Py_INCREF(all_tasks);` in `PyInit__asyncio()`.

I think the underlying problem is module_init() is short-circuiting because `module_initialized` is set. And `module_initialized` is set on subsequent module loads because `module_free()` isn't clearing it.
History
Date User Action Args
2020-04-28 02:27:25indygregsetrecipients: + indygreg, asvetlov, yselivanov
2020-04-28 02:27:25indygregsetmessageid: <1588040845.09.0.680555822876.issue40415@roundup.psfhosted.org>
2020-04-28 02:27:25indygreglinkissue40415 messages
2020-04-28 02:27:24indygregcreate