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 vstinner
Recipients Arfrever, neologix, pitrou, python-dev, serhiy.storchaka, vajrasky, vstinner
Date 2020-03-08.11:29:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Content script to reproduce bpo-20526 (copied from there), but ported to Python 3.9 (replace asyncio.async with asyncio.ensure_future).

Sadly, Python with PR 18848 does crash when running if I press CTRL+c twice:

* A thread does crash in _PyObject_GC_TRACK_impl() called indirectly by select_epoll_poll_impl(), in a Python thread
* while main thread is exiting Python: Py_FinalizeEx() is calling _PyImport_Cleanup() which blocks on take_gil()

It seems like the main thread does *not* hold the hold, the thread which crashed does.

It should not happen: _PyRuntimeState_SetFinalizing(runtime, tstate) has been called and so no other thread should be able to take the GIL anymore, but exit immediately.
Date User Action Args
2020-03-08 11:29:19vstinnersetrecipients: + vstinner, pitrou, Arfrever, neologix, python-dev, serhiy.storchaka, vajrasky
2020-03-08 11:29:18vstinnersetmessageid: <>
2020-03-08 11:29:18vstinnerlinkissue19466 messages
2020-03-08 11:29:18vstinnercreate