-
-
Notifications
You must be signed in to change notification settings - Fork 11k
Deadlock happening when using numpy/scipy with python subinterpreters (Trac #2213) #665
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
Comments
Attachment added by trac user raphael.de.feraudy on 2012-09-12: deadlock.tar.gz |
@rgommers wrote on 2012-09-15 Don't think that has been discussed recently. It isn't adressed by the upcoming 1.7.0 release. You should probably bring this up on the mailing list, perhaps someone there can suggest a workaround. |
trac user raphael.de.feraudy wrote on 2012-09-24 Replying to [comment:1 rgommers]:
Thanks Ralf for your answer and advice. |
I would like to confirm this problem. We've encountered it with 'multiple interpreters mode' in uWSGI (which uses subinterpreters) with two applications reusing the same processes. We've noticed hanging of uWSGI processes in which the numpy was imported in a subinterpreter, after the other application (also using numpy) was initialised first. It resulted in a timeout on uWSGI and the following backtrace:
|
Numpy does not support working with multiple Python sub-interpreters in the same process at the moment: |
Closing. This sounds like a major rewrite and there may be other solutions for computational problems of this sort. I suspect we would need support at the interpreter level. |
Original ticket http://projects.scipy.org/numpy/ticket/2213 on 2012-09-12 by trac user raphael.de.feraudy, assigned to unknown.
Hello,
I've encountered a deadlock while trying to import a scipy subpackage using Python C API in my application.
I've managed to build a minimal example showing this, which I join to this ticket.
According to what I've found on the internet, I guess this is caused by the (documented) unsupported use of both PyGilState_* functions in numpy code and Subinterpreters in my code (As you will see in my example, the simple use of a new subinterpreter instead of the main default one is enough to produce the deadlock).
I use an ubuntu 12.04 Precise Pangolin 64bits distribution with standard python-numpy (1.6.1) and python-scipy (0.9.0) package , but the deadlock still happens with last revisions of git repositories.
I tried to fix this by myself, only using PyEval_* functions in a working copy, but didn't succeed.
My questions are :
The text was updated successfully, but these errors were encountered: