We have an extension module which works fine with CPython but deadlocks every 
time in PyPy. 

The problem is induced when the C++ code in the module (having been invoked 
from a Python thread) prepares to call back into Python again by calling 
PyGILState_Ensure. It seems at this point we try to acquire the GIL mutex while 
already (presumably) holding it - any other threads at this point are also 
waiting on the mutex so it isn't held elsewhere. 

This seems to occur from a call to rffi.aroundstate.after() - I assume that the 
invariant here is that the before() has already executed but that seems not to 
be the case here. What is supposed to trigger that?

Thanks for any assistance in advance. 

Nick

_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to