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

Fernando Perez Fernando.Perez at colorado.edu
Thu Nov 3 15:03:42 CST 2005


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:

phillips[~]> cat crash_scipy.py
#!/usr/bin/env python
import scipy

level = 10
verb  = 10

for i in range(1,100):
     print '*'*75
     print '*'*30,'TEST PASS #',i,'*'*30
     scipy.test(level,verb)


####

Cheers,

f




More information about the Scipy-dev mailing list