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 <1591016420.82.0.0802777162338.issue40826@roundup.psfhosted.org>
In-reply-to
Content
> PyOS_InterruptOccurred() now requires to hold the GIL

This change impacted gdb:

* https://sourceware.org/pipermail/gdb-patches/2020-May/169110.html
* https://bugzilla.redhat.com/show_bug.cgi?id=1829702

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.
History
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: <1591016420.82.0.0802777162338.issue40826@roundup.psfhosted.org>
2020-06-01 13:00:20vstinnerlinkissue40826 messages
2020-06-01 13:00:20vstinnercreate