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
Try to detect whether the clr module is partially initialised #1623
base: master
Are you sure you want to change the base?
Conversation
This should fix issue #1582. While the respective behaviour (setting the member value `_initializing`) is not documented, it has been that way since at least 3.4. As we control `clr`, it can also not happen, that the value is accidentally set.
|
Do you know how to reproduce the original issue? Can you confirm you tried with and without the fix, and it at least seems not to repro with the fix? |
|
Nope. I just read the Python source code, and it's clear how exactly this can happen. There is however no public interface to check for this situation, so apart from this hacky version, we are out of luck anyhow. |
|
I don't see any code that would set that |
|
These are the relevant parts of CPython: The latter is exactly the part that's |
|
@filmor do you have a good theory why this could happen during shutdown then? The original bug speaks about shutdown scenario. |
|
It must be that the module is gone and some code (the loader?) tries to reinitialise it, races with the initialisation and hits this bump. |
|
@lostmsu What do you think about this PR? |
|
@filmor I am not convinced unless we have a repro. |


This should fix issue #1582. While the respective behaviour (setting the member value
_initializing) is not documented, it has been that way since at least 3.4. As we controlclr, it can also not happen, that the value is accidentally set.What does this implement/fix? Explain your changes.
...
Does this close any currently open issues?
...
Any other comments?
...
Checklist
Check all those that are applicable and complete.
AUTHORSCHANGELOG