Skip to content

gh-99377: Revert audit events for thread state creation and free, because the GIL is not properly held at these times #99543

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

Merged
merged 3 commits into from
Nov 17, 2022

Conversation

zooba
Copy link
Member

@zooba zooba commented Nov 16, 2022

This can occur during initialization. Without the check, later calls to get the interpreter state will cause a fatal error.

… actually been set.

This can occur during initialization. Without the check, later calls to get the interpreter state will cause a fatal error.
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @zooba for commit c732ecc 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 16, 2022
Copy link
Member

@ericsnowcurrently ericsnowcurrently left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I'm surprised _PyThreadState_SetCurrent() can leave it NULL though. Something seems fishy there.

@zooba
Copy link
Member Author

zooba commented Nov 16, 2022

This hasn't done it. Going to revert most of the change (I'll leave the _thread event in there, just not the ThreadState ones)

@ericsnowcurrently
Copy link
Member

FYI, I'm double-checking that that PR was the culprit: gh-99545.

@ericsnowcurrently
Copy link
Member

Looks like a full revert passes all buildbots (actually, 7 still running), so it seems like we're right that the original PR is the source of the failures.

Copy link
Member

@ericsnowcurrently ericsnowcurrently left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sobolevn
Copy link
Member

This also closes #99544

@zooba zooba changed the title gh-99377: Prevent raising audit event when thread state has not actually been set. gh-99377: Revert audit events for thread state creation and free, because the GIL is not properly held at these times Nov 16, 2022
@AlexWaygood AlexWaygood linked an issue Nov 16, 2022 that may be closed by this pull request
@zooba zooba merged commit 5fdd49d into python:main Nov 17, 2022
@zooba zooba deleted the gh-99377 branch November 17, 2022 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Buildbots are crashing after #99378
4 participants