[SciPy-Dev] scipy 0.9.0 scipy.test fails with segmentation fault

Baker D.J. D.J.Baker@soton.ac...
Wed Sep 21 10:34:52 CDT 2011


Hello,

Pauli, thank you again for your advice. I now have scipy 0.9.0 working as expected. I downloaded and built both the BLAS and LAPACK libraries from netlib, remade numpy (and tested) and finally remade scipy (and tested). Also I was very particular to ensure that "gfortran" was used for all the compilations. As I say scipy.test now completes with an acceptable result and there certainly aren't any segmentation faults.

 Best regards -- David.

-----Original Message-----
From: scipy-dev-bounces@scipy.org [mailto:scipy-dev-bounces@scipy.org] On Behalf Of Bruce Southey
Sent: Wednesday, September 21, 2011 3:15 PM
To: scipy-dev@scipy.org
Subject: Re: [SciPy-Dev] scipy 0.9.0 scipy.test fails with segmentation fault

On 09/21/2011 07:32 AM, Samuel John wrote:
> Hi,
>
> I have no solution to offer :-(
>
> But perhaps a related issue on gentoo.
> I have pasted the result of running scipy.test() with gdb output.
> We found superlu or libatlas to be involved but could not figure out more.
> I opend a scipy ticket (see below) but I am not sure if it is scipy's fault after all.
>
>
> On 15.09.2011, at 03:36, Xiaoye S. Li wrote:
>>> It's hard to say whether it's in libsuperlu or libatlas, or in the scipy interface to these libraries.  You may have to print the matrix, and test superlu and atlas in isolation.
>> Sherry Li
>>
>
>> On Mon, Sep 12, 2011 at 6:44 AM, Samuel John<sjohn@techfak.uni-bielefeld.de>  wrote:
>> Hi there,
>>
>> we have got a segmentation fault in scipy, which seems to occur in 
>> libsuperlu.4.so
>> http://projects.scipy.org/scipy/ticket/1513
>>
>> I am unsure, if this is really the fault of scipy or libsuperlu or something else.
>> For scipy 0.11.dev the segfault happens to occur in libatlas.so.0 and not in libsuperlu.
>>
>> Perhaps you do have an idea.
>> (The details are right now in the scipy ticket)
>>
>> Thanks in advance!
>>
>> Samuel
>>   - - - - - - - - - - - -
>>
>>
>>
>>
>> sjohn@macabeo:~ $ gdb --args python -c 'import scipy; scipy.test()'
>> GNU gdb (Gentoo 7.2 p1) 7.2
>> Copyright (C) 2010 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or 
>> later<http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
>> and "show warranty" for details.
>> This GDB was configured as "x86_64-pc-linux-gnu".
>> For bug reporting instructions, please see:
>> <http://bugs.gentoo.org/>...
>> Reading symbols from /usr/bin/python...(no debugging symbols found)...done.
>> (gdb) run
>> Starting program: /usr/bin/python -c import\ scipy\;\ scipy.test\(\) 
>> process 5606 is executing new program: /usr/bin/python2.7 [Thread 
>> debugging using libthread_db enabled] Running unit tests for scipy 
>> NumPy version 1.6.1 NumPy is installed in 
>> /usr/lib64/python2.7/site-packages/numpy
>> SciPy version 0.11.0.dev-1f6595e
>> SciPy is installed in 
>> /homes/sjohn/.local/lib64/python2.7/site-packages/scipy
>> Python version 2.7.2 (default, Sep  7 2011, 17:08:51) [GCC 4.5.3] 
>> nose version 1.0.0
>> ............................................................................................................................................................................................................................K............................................................................................................/homes/sjohn/.local/lib64/python2.7/site-packages/scipy/interpolate/fitpack2.py:674: UserWarning:
>> The coefficients of the spline returned have been computed as the 
>> minimal norm least-squares solution of a (numerically) rank deficient 
>> system (deficiency=7). If deficiency is large, the results may be 
>> inaccurate. Deficiency may strongly depend on the value of eps.
>> warnings.warn(message)
>> ....../homes/sjohn/.local/lib64/python2.7/site-packages/scipy/interpolate/fitpack2.py:605: UserWarning:
>> The required storage space exceeds the available storage space: nxest 
>> or nyest too small, or s too small.
>> The weighted least-squares spline corresponds to the current set of 
>> knots.
>> warnings.warn(message)
>> ........................K..K....../usr/lib64/python2.7/site-packages/
>> numpy/core/numeric.py:1920: RuntimeWarning: invalid value encountered 
>> in absolute return all(less_equal(absolute(x-y), atol + rtol * 
>> absolute(y)))
>> .....................................................................
>> .....................................................................
>> .....................................................................
>> .....................................................................
>> .....................................................................
>> .....................................................................
>> ............../homes/sjohn/.local/lib64/python2.7/site-packages/scipy
>> /io/wavfile.py:31: WavFileWarning: Unfamiliar format bytes 
>> warnings.warn("Unfamiliar format bytes", WavFileWarning)
>> /homes/sjohn/.local/lib64/python2.7/site-packages/scipy/io/wavfile.py
>> :121: WavFileWarning: chunk not understood warnings.warn("chunk not 
>> understood", WavFileWarning) 
>> .....................................................................
>> .....................................................................
>> .....................................................................
>> ................SSSSSS......SSSSSS......SSSS.........................
>> .....................................................................
>> ........................................................FF[New Thread 
>> 0x7fffe1fc9700 (LWP 5622)] [New Thread 0x7fffe17c8700 (LWP 5623)] 
>> [New Thread 0x7fffe0fc7700 (LWP 5625)] [New Thread 0x7fffe07c6700 
>> (LWP 5624)] [Thread 0x7fffe0fc7700 (LWP 5625) exited] [Thread 
>> 0x7fffe07c6700 (LWP 5624) exited] [Thread 0x7fffe17c8700 (LWP 5623) 
>> exited] [Thread 0x7fffe1fc9700 (LWP 5622) exited] [New Thread 
>> 0x7fffe1fc9700 (LWP 5626)] [New Thread 0x7fffe17c8700 (LWP 5627)] 
>> [Thread 0x7fffe17c8700 (LWP 5627) exited] [Thread 0x7fffe1fc9700 (LWP 
>> 5626) exited] [New Thread 0x7fffe1fc9700 (LWP 5628)] [New Thread 
>> 0x7fffe17c8700 (LWP 5629)] [New Thread 0x7fffe07c6700 (LWP 5630)] 
>> [New Thread 0x7fffe0fc7700 (LWP 5631)] [Thread 0x7fffe07c6700 (LWP 
>> 5630) exited] [Thread 0x7fffe0fc7700 (LWP 5631) exited] [Thread 
>> 0x7fffe17c8700 (LWP 5629) exited] [Thread 0x7fffe1fc9700 (LWP 5628) 
>> exited] [New Thread 0x7fffe1fc9700 (LWP 5632)] [New Thread 
>> 0x7fffe17c8700 (LWP 5633)] [Thread 0x7fffe17c8700 (LWP 5633) exited] 
>> [Thread 0x7fffe1fc9700 (LWP 5632) exited] .[New Thread 0x7fffe1fc9700 
>> (LWP 5634)] [New Thread 0x7fffe17c8700 (LWP 5635)] [New Thread 
>> 0x7fffe0fc7700 (LWP 5636)] [Thread 0x7fffe17c8700 (LWP 5635) exited] 
>> [Thread 0x7fffe0fc7700 (LWP 5636) exited] [Thread 0x7fffe1fc9700 (LWP 
>> 5634) exited] [New Thread 0x7fffe1fc9700 (LWP 5637)] [New Thread 
>> 0x7fffe17c8700 (LWP 5638)] [New Thread 0x7fffe0fc7700 (LWP 5639)] 
>> [Thread 0x7fffe17c8700 (LWP 5638) exited] [Thread 0x7fffe0fc7700 (LWP 
>> 5639) exited] [Thread 0x7fffe1fc9700 (LWP 5637) exited] .[New Thread 
>> 0x7fffe1fc9700 (LWP 5640)] [New Thread 0x7fffe17c8700 (LWP 5641)] 
>> [New Thread 0x7fffe0fc7700 (LWP 5642)] [Thread 0x7fffe17c8700 (LWP 
>> 5641) exited] [Thread 0x7fffe0fc7700 (LWP 5642) exited] [Thread 
>> 0x7fffe1fc9700 (LWP 5640) exited] F[New Thread 0x7fffe1fc9700 (LWP 
>> 5643)] [New Thread 0x7fffe17c8700 (LWP 5644)] [New Thread 
>> 0x7fffe07c6700 (LWP 5646)] [New Thread 0x7fffe0fc7700 (LWP 5645)] 
>> [Thread 0x7fffe0fc7700 (LWP 5645) exited] [Thread 0x7fffe07c6700 (LWP 
>> 5646) exited] [Thread 0x7fffe17c8700 (LWP 5644) exited] [Thread 
>> 0x7fffe1fc9700 (LWP 5643) exited] [New Thread 0x7fffe1fc9700 (LWP 
>> 5647)] [New Thread 0x7fffe17c8700 (LWP 5648)] [Thread 0x7fffe17c8700 
>> (LWP 5648) exited] [Thread 0x7fffe1fc9700 (LWP 5647) exited] F[New 
>> Thread 0x7fffe1fc9700 (LWP 5649)] [New Thread 0x7fffe17c8700 (LWP 
>> 5650)] [Thread 0x7fffe17c8700 (LWP 5650) exited] [Thread 
>> 0x7fffe1fc9700 (LWP 5649) exited] [New Thread 0x7fffe1fc9700 (LWP 
>> 5651)] [New Thread 0x7fffe17c8700 (LWP 5652)] [Thread 0x7fffe17c8700 
>> (LWP 5652) exited] [Thread 0x7fffe1fc9700 (LWP 5651) exited] .[New 
>> Thread 0x7fffe1fc9700 (LWP 5653)] [New Thread 0x7fffe17c8700 (LWP 
>> 5654)] [Thread 0x7fffe17c8700 (LWP 5654) exited] [Thread 
>> 0x7fffe1fc9700 (LWP 5653) exited] F..F..FFF..FF.F...[New Thread 
>> 0x7fffe1fc9700 (LWP 5655)] [New Thread 0x7fffe17c8700 (LWP 5656)] 
>> [Thread 0x7fffe17c8700 (LWP 5656) exited] [Thread 0x7fffe1fc9700 (LWP 
>> 5655) exited] [New Thread 0x7fffe1fc9700 (LWP 5657)] [New Thread 
>> 0x7fffe17c8700 (LWP 5658)] [Thread 0x7fffe17c8700 (LWP 5658) exited] 
>> [Thread 0x7fffe1fc9700 (LWP 5657) exited] .[New Thread 0x7fffe1fc9700 
>> (LWP 5659)] [New Thread 0x7fffe17c8700 (LWP 5660)] [New Thread 
>> 0x7fffe07c6700 (LWP 5661)] [Thread 0x7fffe17c8700 (LWP 5660) exited] 
>> [Thread 0x7fffe07c6700 (LWP 5661) exited] [Thread 0x7fffe1fc9700 (LWP 
>> 5659) exited] [New Thread 0x7fffe1fc9700 (LWP 5662)] [New Thread 
>> 0x7fffe17c8700 (LWP 5663)] [New Thread 0x7fffe07c6700 (LWP 5664)] 
>> [Thread 0x7fffe17c8700 (LWP 5663) exited] [Thread 0x7fffe07c6700 (LWP 
>> 5664) exited] [Thread 0x7fffe1fc9700 (LWP 5662) exited] .[New Thread 
>> 0x7fffe1fc9700 (LWP 5665)] [New Thread 0x7fffe17c8700 (LWP 5666)] 
>> [New Thread 0x7fffe0fc7700 (LWP 5668)] [New Thread 0x7fffe07c6700 
>> (LWP 5667)] [Thread 0x7fffe0fc7700 (LWP 5668) exited] [Thread 
>> 0x7fffe07c6700 (LWP 5667) exited] [Thread 0x7fffe17c8700 (LWP 5666) 
>> exited] [Thread 0x7fffe1fc9700 (LWP 5665) exited] [New Thread 
>> 0x7fffe1fc9700 (LWP 5669)] [New Thread 0x7fffe17c8700 (LWP 5670)] 
>> [Thread 0x7fffe17c8700 (LWP 5670) exited] [Thread 0x7fffe1fc9700 (LWP 
>> 5669) exited] [New Thread 0x7fffe1fc9700 (LWP 5671)] [New Thread 
>> 0x7fffe17c8700 (LWP 5672)] [New Thread 0x7fffe0fc7700 (LWP 5673)] 
>> [New Thread 0x7fffe07c6700 (LWP 5674)] [Thread 0x7fffe07c6700 (LWP 
>> 5674) exited] [Thread 0x7fffe0fc7700 (LWP 5673) exited] [Thread 
>> 0x7fffe17c8700 (LWP 5672) exited] [Thread 0x7fffe1fc9700 (LWP 5671) 
>> exited] [New Thread 0x7fffe1fc9700 (LWP 5675)] [New Thread 
>> 0x7fffe17c8700 (LWP 5676)] [Thread 0x7fffe17c8700 (LWP 5676) exited] 
>> [Thread 0x7fffe1fc9700 (LWP 5675) exited] .[New Thread 0x7fffe1fc9700 
>> (LWP 5677)] [New Thread 0x7fffe17c8700 (LWP 5678)] [Thread 
>> 0x7fffe17c8700 (LWP 5678) exited] [Thread 0x7fffe1fc9700 (LWP 5677) 
>> exited] [New Thread 0x7fffe1fc9700 (LWP 5679)] [New Thread 
>> 0x7fffe17c8700 (LWP 5680)] [Thread 0x7fffe17c8700 (LWP 5680) exited] 
>> [Thread 0x7fffe1fc9700 (LWP 5679) exited] 
>> ..........................................................................................................................................................K................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
 .
>   
> ......................................................................
> ......................................................................
> .................................../homes/sjohn/.local/lib64/python2.7
> /site-packages/scipy/sparse/linalg/dsolve/linsolve.py:259: 
> DeprecationWarning: scipy.sparse.linalg.dsolve.umfpack will be 
> removed, install scikits.umfpack instead
>> ' install scikits.umfpack instead', DeprecationWarning )
>> ../homes/sjohn/.local/lib64/python2.7/site-packages/scipy/sparse/lina
>> lg/dsolve/linsolve.py:75: DeprecationWarning: 
>> scipy.sparse.linalg.dsolve.umfpack will be removed, install scikits.umfpack instead ' install scikits.umfpack instead', DeprecationWarning ) ..........................................................................................................................................................F.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x00007ffff591dc60 in ATL_dgerk_L2_restrict () from 
>> /usr/lib64/libatlas.so.0
>> (gdb)
>>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
Building  without using Atlas should confirm if Atlas is involved - probably have to build both numpy and scipy this way:
$ ATLAS=None python setup.py build

As Pauli said, there are only a couple of operations that should cause this so try to find which line of the test is involved.
You should be able to run the individual test from the source directory. 
Then you can modify the test file such as adding an 'exit()' in the test_nonlin.py in the 'TestJacobianDotSolve' class to find the line involved etc.:
$ pwd
{path to scipy}/scipy/scipy/optimize/tests $ python test_nonlin.py .......EEEE.E..............................................


Bruce

_______________________________________________
SciPy-Dev mailing list
SciPy-Dev@scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-dev


More information about the SciPy-Dev mailing list