This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Release the GIL while running a gdb command or expression
- From: Tom Tromey <tom at tromey dot com>
- To: Phil Muldoon <pmuldoon at redhat dot com>
- Cc: gdb-patches at sourceware dot org, Tom Tromey <tom at tromey dot com>
- Date: Tue, 09 Oct 2018 13:42:05 -0600
- Subject: Re: [RFC] Release the GIL while running a gdb command or expression
- References: <20180915040732.6718-1-tom@tromey.com> <807f284a-e227-37ed-c197-170a7f2abe40@redhat.com>
>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
Phil> We've had a similar patch in the Fedora RPM for a while. It's been on
Phil> my list to upstream for a bit. Initially I was a bit reluctant
Phil> because I hadn't audited all the Python reentry points in GDB to make
Phil> sure we reacquired the GIL before interacting with Python. I realize
Phil> now this was not a real concern (reviews would catch this and if one
Phil> did slip by it would be fixed as a bug.)
Yes, I think it would result in a crash.
Phil> The only real difference in the patch approach was to make the GIL
Phil> release an option over a default.
I don't think this is necessary, mostly because I can't think of when it
would be desirable not to release the GIL; but also because when writing
Python one doesn't normally have to worry about the GIL -- it's not
really a Python-visible feature, nor should it be, since implementations
like PyPY don't have it.
Phil> As for a test, we also have a test included. It does not appear to be
Phil> racy for our purposes. I also include it for consideration. This
Phil> snippet is just for initial consideration and will make any changes
Phil> needed to include it in the patch.
I can try it. If it works, whose name should I put on the ChangeLog?
Tom