From: Tom Tromey <tom@tromey.com>
To: Phil Muldoon <pmuldoon@redhat.com>
Cc: gdb-patches@sourceware.org, Tom Tromey <tom@tromey.com>
Subject: Re: [RFC] Release the GIL while running a gdb command or expression
Date: Tue, 09 Oct 2018 19:42:00 -0000 [thread overview]
Message-ID: <874ldugb5e.fsf@tromey.com> (raw)
In-Reply-To: <807f284a-e227-37ed-c197-170a7f2abe40@redhat.com> (Phil Muldoon's message of "Tue, 9 Oct 2018 10:51:11 +0100")
>>>>> "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
next prev parent reply other threads:[~2018-10-09 19:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-15 4:07 Tom Tromey
2018-10-09 9:51 ` Phil Muldoon
2018-10-09 19:42 ` Tom Tromey [this message]
2018-10-10 8:33 ` Phil Muldoon
2018-10-10 14:07 ` Tom Tromey
2018-10-10 14:38 ` Phil Muldoon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874ldugb5e.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=pmuldoon@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox