[pypy-issue] [issue1668] sporadic seg fault with cffi

sn6uv tracker at bugs.pypy.org
Tue Jan 7 00:38:32 CET 2014


New submission from sn6uv <16sn6uv at gmail.com>:

Steps to reproduce
==================
git clone git at github.com:sn6uv/gmpy_cffi.git
cd gmpy_cffi

Then run
py.test-pypy
repeatedly.

Details
=======
About 90% of the time the tests run and pass, but about 10% of the time I get 
some form of error. So far I've seen a few different errors
- Most commonly zsh: segmentation fault (core dumped)  /opt/pypy/bin/py.test 
double free e.g.. *** Error in `/usr/bin/pypy': double free or corruption (out): 
0x00002b101d3c55d0 ***
- corrupted double-linked list e.g * Error in `/usr/bin/pypy': corrupted double-
linked list: 0x00000000041fcdf0 ***
- corrupted double-linked malloc variant list e.g. *** Error in `/usr/bin/pypy': 
malloc(): smallbin double linked list corrupted: 0x00000000057bcfa0 ***
- free()/realloc() invalid pointer e.g. *** Error in `/usr/bin/pypy': realloc(): 
invalid pointer: 0x0000000005c388b0 ***
- free() invalid size e.g. .*** Error in `/usr/bin/pypy': free(): invalid size: 
0x00000000077e6820 ***
- Kernel panic requiring hard restart of my system. This one is exceedingly rare 
(<< 1%).

The errors occur at different points throughout the tests, but it's always in 
the same test file.
Upon removing that file from the test suite the errors just occur in the next 
file.

Occasionally I get a backtrace [1] accompanying the error but most of the time 
not.

I've confirmed this on my desktop and my laptop (both run archlinux with PyPy 
2.2.1-final, cffi version 0.8). Also on the travis CI tests [2] (which seem to 
error more regularly than my local 
systems). Alex Gaynor was able to reproduce this of OS X also.

This may be a bug in cffi I'm not sure (I posted to the cffi mailing list also). 

[1] http://pastebin.com/td376i2M
[2] https://travis-ci.org/sn6uv/gmpy_cffi/jobs/16210613

----------
messages: 6456
nosy: pypy-issue, sn6uv
priority: bug
release: ???
status: unread
title: sporadic seg fault with cffi

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1668>
________________________________________


More information about the pypy-issue mailing list