Emulate pypy SIGSEGV

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Emulate pypy SIGSEGV

Pavlo Lavrenenko
Hello, guys.

Running PyPy 5.6.0 with GCC 4.8.5 20150623 (Red Hat 4.8.5-4) here.
Occasionally PyPy terminates with signal 11 and a long stack consisting mostly
of: #31 0x00007f0d4c26ce7d in ?? () from /lib64/libpypy-c.so

If I had a proper code sample to reproduce the issue I would have submitted it
but since I am literally chasing ghosts I am more interested in how to make PyPy
throw SIGSEGV on purpose (the software hangs after one of its child processes
dies with signal 11, I want to at least reproduce and workaround this).

kill -11 doesn't give the result I want. Any way to make PyPy crash somewhere in
/lib64/libpypy-c.so?

--
Best regards,
Pavlo Lavrenenko,
PortaOne, Inc., Junior Software Developer
Tel: +1-866-SIP VOIP (+1 866 747 8647) ext. 7624

PortaOne - VoIP Solutions Company
Visit our Website: http://www.portaone.com
_______________________________________________
pypy-dev mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/pypy-dev
Reply | Threaded
Open this post in threaded view
|

Re: Emulate pypy SIGSEGV

Armin Rigo-2
Hi Pavlo,

On 3 July 2017 at 16:25, Pavlo Lavrenenko <[hidden email]> wrote:
> Running PyPy 5.6.0 with GCC 4.8.5 20150623 (Red Hat 4.8.5-4) here.
> Occasionally PyPy terminates with signal 11 and a long stack consisting
> mostly of: #31 0x00007f0d4c26ce7d in ?? () from /lib64/libpypy-c.so

I would try first upgrading to PyPy 5.8.0.

> kill -11 doesn't give the result I want. Any way to make PyPy crash
> somewhere in /lib64/libpypy-c.so?

``os.kill(os.getpid(), signal.SIGSEGV)``?  If that's what you tried
and it doesn't give the results you want, please explain in more
details why not.


A bientôt,

Armin.
_______________________________________________
pypy-dev mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/pypy-dev
Reply | Threaded
Open this post in threaded view
|

Re: Emulate pypy SIGSEGV

Santa
On 07/03/2017 06:04 PM, Armin Rigo wrote:
> Hi Pavlo,
>
> On 3 July 2017 at 16:25, Pavlo Lavrenenko <[hidden email]> wrote:
>> Running PyPy 5.6.0 with GCC 4.8.5 20150623 (Red Hat 4.8.5-4) here.
>> Occasionally PyPy terminates with signal 11 and a long stack consisting
>> mostly of: #31 0x00007f0d4c26ce7d in ?? () from /lib64/libpypy-c.so
>
> I would try first upgrading to PyPy 5.8.0.
>

Hello Armin,
any prominent changes between 5.6.0 and 5.8.0? Can I find the change logs somewhere?

>> kill -11 doesn't give the result I want. Any way to make PyPy crash
>> somewhere in /lib64/libpypy-c.so?
>
> ``os.kill(os.getpid(), signal.SIGSEGV)``?  If that's what you tried
> and it doesn't give the results you want, please explain in more
> details why not.
>

I don't understand why myself. The software works as:

# there is master process and N children
# master periodically checks if children are alive
(multiprocessing.Process.is_alive())
# if not, master process calls join() and creates a new multiprocessing.Process
instance

This whole machinery works fine if I send 11 signal to the child but stucks
either after join() or further on the process creation. There is not enough
logging in the software to trace the issue and the issue quite rare. Moreover
when it comes to production and the issue is reproduced engineers just restart
everything manually.

> A bientôt,
>
> Armin.
>

_______________________________________________
pypy-dev mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/pypy-dev
Reply | Threaded
Open this post in threaded view
|

Re: Emulate pypy SIGSEGV

Pavlo Lavrenenko
In reply to this post by Armin Rigo-2
On 07/03/2017 06:04 PM, Armin Rigo wrote:
> Hi Pavlo,
>
> On 3 July 2017 at 16:25, Pavlo Lavrenenko <[hidden email]> wrote:
>> Running PyPy 5.6.0 with GCC 4.8.5 20150623 (Red Hat 4.8.5-4) here.
>> Occasionally PyPy terminates with signal 11 and a long stack consisting
>> mostly of: #31 0x00007f0d4c26ce7d in ?? () from /lib64/libpypy-c.so
>
> I would try first upgrading to PyPy 5.8.0.
>

Hello Armin,
any prominent changes between 5.6.0 and 5.8.0? Can I find the change logs somewhere?

>> kill -11 doesn't give the result I want. Any way to make PyPy crash
>> somewhere in /lib64/libpypy-c.so?
>
> ``os.kill(os.getpid(), signal.SIGSEGV)``?  If that's what you tried
> and it doesn't give the results you want, please explain in more
> details why not.
>

I don't understand why myself. The software works as:

# there is master process and N children
# master periodically checks if children are alive
(multiprocessing.Process.is_alive())
# if not, master process calls join() and creates a new multiprocessing.Process
instance

This whole machinery works fine if I send 11 signal to the child but stucks
either after join() or further on the process creation. There is not enough
logging in the software to trace the issue and the issue quite rare. Moreover
when it comes to production and the issue is reproduced engineers just restart
everything manually.

> A bientôt,
>
> Armin.
>


--
Best regards,
Pavlo Lavrenenko,
PortaOne, Inc., Junior Software Developer
Tel: +1-866-SIP VOIP (+1 866 747 8647) ext. 7624

PortaOne - VoIP Solutions Company
Visit our Website: http://www.portaone.com
_______________________________________________
pypy-dev mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/pypy-dev
Reply | Threaded
Open this post in threaded view
|

Re: Emulate pypy SIGSEGV

Armin Rigo-2
Hi,

On 4 July 2017 at 12:47, Pavlo Lavrenenko <[hidden email]> wrote:
> any prominent changes between 5.6.0 and 5.8.0? Can I find the change logs
> somewhere?

There were fixes for very rare crashes, notably in the JIT.  It's not
possible to say "avoid doing this or that and it will avoid the bug".
The JIT doesn't work at a high enough level for that.  There is no
better answer than: 5.8.0 contains (most probably) less of these very
rare crashes.


A bientôt,

Armin.
_______________________________________________
pypy-dev mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/pypy-dev
Reply | Threaded
Open this post in threaded view
|

Re: Emulate pypy SIGSEGV

Pavlo Lavrenenko
In reply to this post by Santa
On 07/04/2017 01:45 PM, Santa wrote:
> On 07/03/2017 06:04 PM, Armin Rigo wrote:
>
> I don't understand why myself. The software works as:
>

Anyway I wrote a CFFI module with a function that dereferences NULL and called
the function in the application. Did the trick I wanted.

--
Best regards,
Pavlo Lavrenenko,
PortaOne, Inc., Junior Software Developer
Tel: +1-866-SIP VOIP (+1 866 747 8647) ext. 7624

PortaOne - VoIP Solutions Company
Visit our Website: http://www.portaone.com
_______________________________________________
pypy-dev mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/pypy-dev