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 JelleZijlstra, benjamin.peterson, corona10, remi.lapeyre, serhiy.storchaka, stutzbach, vstinner
Date 2020-06-01.13:00:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> PyOS_InterruptOccurred() now requires to hold the GIL

This change impacted gdb:


gdbpy_check_quit_flag() called PyOS_InterruptOccurred() without holding the GIL. It worked in Python 3.8, but started to crash in Python 3.9 beta1.

gdb had another issue, it started by always releasing the GIL and always called the Python C API with the GIL released (if I understood correctly).

gdb was fixed by calling PyGILState_Ensure()/PyGILState_Release() when calling the Python C API, especially PyOS_InterruptOccurred().

Maybe the minimum would be to *document* that the GIL must be held to call PyOS_InterruptOccurred(), and that it's not a new requirements.
Date User Action Args
2020-06-01 13:00:20vstinnersetrecipients: + vstinner, benjamin.peterson, stutzbach, serhiy.storchaka, JelleZijlstra, corona10, remi.lapeyre
2020-06-01 13:00:20vstinnersetmessageid: <>
2020-06-01 13:00:20vstinnerlinkissue40826 messages
2020-06-01 13:00:20vstinnercreate