-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
GH-116008: Aquire TState and StopTheWorld in faulthandler_user #141267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
GH-116008: Aquire TState and StopTheWorld in faulthandler_user #141267
Conversation
|
@vstinner Could you please take a look? |
|
@AA-Turner sorry, misclick. |
ZeroIntensity
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't acquire the GIL or make a stop-the-world pause inside signal handlers, because they're not signal safe. For example, Python could receive the signal while in the middle of a stop-the-world pause, which would deadlock inside the signal handler.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase And if you don't make the requested changes, you will be poked with soft cushions! |
|
@ZeroIntensity If I get you right (feel free to correct me):
Therefore, if we want to safely handle non-fatal signals, then using the |
Nope, because I think it would be best to just document that faulthandler sometimes crashes if you mess with it. |
Trying to be a bit safer for non-fatal signals