Skip to content

bpo-26153: Fix a rare crash when issuing warnings during interpreter shutdown #6520

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

Closed
wants to merge 2 commits into from

Conversation

Yhg1s
Copy link
Member

@Yhg1s Yhg1s commented Apr 18, 2018

Fix a rare crash when using the 'warnings' module during interpreter shutdown: if interp->modules is deleted at the wrong time, PyImport_GetModulesDict() will abort.

https://bugs.python.org/issue26153

@Yhg1s
Copy link
Member Author

Yhg1s commented Apr 18, 2018

I've not been able to find a simple reproducer for this with 3.6, but I do have a complicated in-house (reproducible) crasher that is fixed by this. We don't use Python 3.5 or 3.4, though, so I can't test it against that, but I expect the same problem exists there.

@Yhg1s
Copy link
Member Author

Yhg1s commented Apr 19, 2018

I should've looked a little closer. This was fixed by GH-#5337, so we should just backport that one.

@Yhg1s Yhg1s closed this Apr 19, 2018
@Yhg1s Yhg1s deleted the 3.6-warnings-del-crash branch May 31, 2018 10:22
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.

4 participants