Skip to content

On shutdown from Python release all slot holders #1712

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
Apr 8, 2022

Conversation

lostmsu
Copy link
Member

@lostmsu lostmsu commented Mar 4, 2022

What does this implement/fix? Explain your changes.

Before this fix slots of reflected types were not released to Python defaults leaving Python referencing managed code after managed runtime has already shut down.

In the original bug, the runtime in question is Mono after mono_jit_cleanup

Does this close any currently open issues?

#1683

@lostmsu lostmsu requested a review from filmor March 4, 2022 18:13
@lostmsu
Copy link
Member Author

lostmsu commented Mar 4, 2022

This is the old slots holder magic created by Amos. I think it is better, that skipping critical finalizers.

This should make pythonnet/clr-loader#26 irrelevant.

@lostmsu
Copy link
Member Author

lostmsu commented Mar 4, 2022

Looks like this does not work. I am going to investigate further.

…anager is terminated and Python is shutting down
@lostmsu
Copy link
Member Author

lostmsu commented Apr 7, 2022

@filmor yeet!

@lostmsu lostmsu added this to the 3.0.0 milestone Apr 7, 2022
@filmor
Copy link
Member

filmor commented Apr 8, 2022

Nice :)

Does it still work if you pull in 39db9f4?

@lostmsu
Copy link
Member Author

lostmsu commented Apr 8, 2022

@filmor looks like it

@filmor filmor merged commit 1cf616d into pythonnet:master Apr 8, 2022
@lostmsu lostmsu deleted the bugs/ShutdownSegFault branch April 8, 2022 16:56
lostmsu added a commit to losttech/pythonnet that referenced this pull request May 2, 2022
…SegFault"

This reverts commit 1cf616d, reversing
changes made to 0e57cdd.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants