[SciPy-dev] A stray pointer somwehere...

Travis Oliphant oliphant at ee.byu.edu
Thu Nov 3 16:36:24 CST 2005


Fernando Perez wrote:

>Christopher Hanley wrote:
>
>  
>
>>Sorry, missed the part about segfault on exit only.  Still I'm surprised 
>>I could get it to segfault by just looping the scipy.test(10,10) 
>>command.   I have only tested this in the ipython shell.
>>    
>>
>
>Actually it was _my_ bad: I hadn't run the tests enough times.  I now scripted 
>it, and it reproducibly happens here:
>
>----------------------------------------------------------------------
>Ran 140 tests in 0.273s
>
>OK
>***************************************************************************
>****************************** TEST PASS # 18 ******************************
>   Found 2 tests for scipy.base.umath
>   Found 24 tests for scipy.base.function_base
>   Found 4 tests for scipy.base.getlimits
>   Found 9 tests for scipy.base.twodim_base
>   Found 3 tests for scipy.base.matrix
>   Found 44 tests for scipy.base.shape_base
>   Found 42 tests for scipy.base.type_check
>   Found 3 tests for scipy.basic.helper
>   Found 3 tests for scipy.distutils.misc_util
>   Found 4 tests for scipy.base.index_tricks
>   Found 0 tests for __main__
>Segmentation fault
>
>
>If I increase the verbosity:
>
>----------------------------------------------------------------------
>Ran 140 tests in 0.284s
>
>OK
>***************************************************************************
>****************************** TEST PASS # 18 ******************************
>/home/phillips/student/fperez/usr/local/lib/python2.3/site-packages/scipy/base/tests/test_scimath.py
>
>[...]
>
>check_default_1 (scipy.base.type_check.test_type_check.test_mintypecode) ... ok
>check_default_2 (scipy.base.type_check.test_type_check.test_mintypecode) ... ok
>check_default_3 (scipy.base.type_check.test_type_check.test_mintypecode) ... ok
>check_complex_bad (scipy.base.type_check.test_type_check.test_nan_to_num) ... ok
>check_complex_bad2 (scipy.base.type_check.test_type_check.test_nan_to_num) ... 
>Segmentation fault
>
>
>Same point you see it at.  So yes, the problem is reproducible and it always 
>happens at the same pass.
>
>Here's the crash script for testing:
>  
>

Thanks very much for this.

I've tracked it to the reference count on the array scalars going down 
by one on each test loop.

So, the array scalars object is not being INCREF'd somewhere where it 
should be.  I should now be able to find it.

-Travis




More information about the Scipy-dev mailing list