Re: [pypy-dev] Deadlock in cpyext callback

2014-05-25 Thread Nick Williams
Armin, > The documentation of PyGILState_Ensure() says, indeed, that it's ok to > call this function even if the current thread already owns the GIL. > If PyPy's version deadlocks in this case, then it's a bug of PyPy. > Please file it as a bug (https://bitbucket.org/pypy/pypy/issues; also > look

Re: [pypy-dev] Deadlock in cpyext callback

2014-05-25 Thread Armin Rigo
Hi Nick, On 22 May 2014 11:23, Nick Williams wrote: > 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. The documentation of PyGILState_Ensure() says, indeed, that it's ok

[pypy-dev] Deadlock in cpyext callback

2014-05-22 Thread Nick Williams
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 a