[pypy-dev] pypy blocked at RPyGilAcquire ()

Yicong Huang hengha.mao at gmail.com
Thu Jun 25 12:34:57 CEST 2015


Hi,

We embedded Pypy in C++ code, and found out if Pypy was initialized twice
it would block at function RpyGilAcquire().
Here is the  case:

rpython_startup_code();
res = pypy_setup_home("...")
res = pypy_execute_source_ptr(...)
//Some code here
rpython_startup_code();
res = pypy_setup_home("...")
res = pypy_execute_source_ptr(...)

We found pypy blocked at second pypy_execute_source_pty(...), the detail
call stack are
#0  0x0000003fea40b1c0 in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1  0x00007f8543087a1d in RPyGilAcquire () from
/usr/ali/odps-pypy/libpypy-c.so
#2  0x00007f85425a5f8d in pypy_g_pypy_execute_source_ptr () from
/usr/ali/odps-pypy/libpypy-c.so
#3  0x00007f85423a6743 in pypy_execute_source_ptr () from
/usr/ali/odps-pypy/libpypy-c.so

The reason that we initialized pypy twice is that we would like to get a
clean environment to execute without any global variables' pollution from
the first run.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20150625/b03b0a69/attachment.html>


More information about the pypy-dev mailing list