[pypy-dev] Segmentation fault at rpyvmprof_f_pypy_rrr ()

Yicong Huang hengha.mao at gmail.com
Tue Sep 8 11:44:33 CEST 2015


Great thanks Armin!
I found out we did call python code from different theads.
Here are my understanding, please correct me if I am wrong:

In main thread:
rpython_startup_code();
pypy_init_threads();
res = pypy_setup_home(..);

And in other worker thread, after main thread do the initilization:
pypy_thread_attach();

Will there any problems if main thread exit before other worker thread do
the initilization "pypy_thread_attach()"?





On Tue, Sep 8, 2015 at 4:12 PM, Armin Rigo <arigo at tunes.org> wrote:

> Hi,
>
> On Tue, Sep 8, 2015 at 9:20 AM, Yicong Huang <hengha.mao at gmail.com> wrote:
> > Here are the output of gdb "info threads". We didn't call
> > "pypy_init_threads()" or "pypy_thread_attach()" in the code.
>
> Well, then.  Read again the documentation for these two functions: you
> need to call them if your program is going to call Python code in more
> than just one thread.
>
>
> Armin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20150908/b67f557a/attachment.html>


More information about the pypy-dev mailing list