Skip to content
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

Deadlock calling pythonnet.set_runtime twice #64

Open
sschukat opened this issue Aug 30, 2023 · 1 comment
Open

Deadlock calling pythonnet.set_runtime twice #64

sschukat opened this issue Aug 30, 2023 · 1 comment

Comments

@sschukat
Copy link

With the update to delay the load of the runtime from 0.25 to 0.26 a deadlock occurs with following code

import pythonnet
pythonnet.set_runtime("coreclr")
pythonnet.set_runtime("coreclr")

This is explicit a problem of the core clr. We did not see that with .NET FF.

We tracked it down to

res = dll.hostfxr_initialize_for_runtime_config(

this function deadlocks the second time called if

res = dll.hostfxr_get_runtime_delegate(

was not called before.

@filmor
Copy link
Member

filmor commented Aug 30, 2023

Thank you for the report, I'll look into it. It's probably enough to force finishing up the initialization in set_runtime instead of keeping it in limbo until load is called.

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

No branches or pull requests

2 participants