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

nslink.NetNS is possibly not safe to use in multithreaded applications #1213

Open
philipp-karcher opened this issue Oct 1, 2024 · 2 comments

Comments

@philipp-karcher
Copy link

We have been dealing with very mysterious deadlocks in a multithreaded application, and I believe that nslink.NetNS is the culprit. It calls os.fork in its constructor, which is unsafe when mixed with threads (and for this reason deprecated in Python 3.12):

https://docs.python.org/3/library/os.html#os.fork
https://discuss.python.org/t/concerns-regarding-deprecation-of-fork-with-alive-threads/33555

@m4123
Copy link

m4123 commented Dec 11, 2024

Any update when this issue will be fixed?

@svinota
Copy link
Owner

svinota commented Dec 20, 2024

It might be fixed now in the master branch after merging the async core, the whole NetNS functionality was rewritten.

The documentation update is on its way.

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

3 participants