[Numpy-discussion] crash at prompt exit after running test

Pauli Virtanen pav+sp at iki.fi
Wed Mar 10 09:11:40 EST 2010


Wed, 10 Mar 2010 10:28:07 +0100, Johann Cohen-Tanugi wrote:

> On 03/10/2010 01:55 AM, Pauli Virtanen wrote:
>>> more fun :
>>> [cohen at jarrett tests]$ pwd
>>> /home/cohen/sources/python/numpy/numpy/core/tests [cohen at jarrett
>>> tests]$ python -c 'import test_ufunc' python: Modules/gcmodule.c:277:
>>> visit_decref: Assertion `gc->gc.gc_refs != 0' failed.
>>> Aborted (core dumped)
>>>      
>> What happens if you only import the umath_tests module (or something,
>> it's a .so under numpy.core)?
>>    
> [cohen at jarrett core]$ export
> PYTHONPATH=/home/cohen/.local/lib/python2.6/site-packages/numpy/core:
$PYTHONPATH
> [cohen at jarrett core]$ python
> Python 2.6.2 (r262:71600, Jan 25 2010, 18:46:45) [GCC 4.4.2 20091222
> (Red Hat 4.4.2-20)] on linux2 Type "help", "copyright", "credits" or
> "license" for more information.
>  >>> import umath_tests
>  >>>
> python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs
> != 0' failed.
> Aborted (core dumped)
> 
> so this import also trigger the crash at exit...

Then it is clear that the umath_tests module does something that is not 
permitted. It's possible that there is a some sort of a refcount error 
somewhere in the generalized ufuncs mechanisms -- that part of Numpy is 
not heavily used.

Bug spotting challenge: Start from umath_tests.c.src:initumath_tests, 
follow the execution, and spot the bug (if any).

	Pauli

PS. it might be a good idea to file a bug ticket now




More information about the NumPy-Discussion mailing list