thouis / numpy-trac-migration

numpy Trac to github issues migration
2 stars 3 forks source link

Deadlock happening when using numpy/scipy with python subinterpreters (Trac #2213) #6002

Open numpy-gitbot opened 11 years ago

numpy-gitbot commented 11 years ago

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 :

numpy-gitbot commented 11 years ago

Attachment added by trac user raphael.de.feraudy on 2012-09-12: deadlock.tar.gz

numpy-gitbot commented 11 years ago

atmention: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.

numpy-gitbot commented 11 years ago

trac user raphael.de.feraudy wrote on 2012-09-24

Replying to [comment:1 rgommers]:

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.

Thanks Ralf for your answer and advice. I actually found a discussion related to my problem (as far as i understand), but no workaround was definitely validated there : http://comments.gmane.org/gmane.comp.python.numeric.general/46220. I shall post a comment.