[SciPy-dev] Another segfault

Nils Wagner nwagner at mecha.uni-stuttgart.de
Fri Mar 3 13:21:11 CST 2006


On Fri, 03 Mar 2006 16:58:17 +0100
  Robert Cimrman <cimrman3 at ntc.zcu.cz> wrote:
> Ed Schofield wrote:
>> Robert Cimrman wrote:
>>>The sparse_test.py works ok for me, but if one runs 
>>>sparse.py module as 
>>>a script, a segfault occurs in solve() when using LU. 
>>>(UMFPACK works ok, 
>>>if present, that is.) Can you reproduce this, Ed?
>>>  
>> 
>> No, I can't.  (I only have a 32-bit machine.)  I've 
>>added a unit test
>> that runs Nils' code.  If others start reporting 
>>segfaults we're in
>> business ;)
> 
> I have a 32-bit machine too. Nils' code runs ok for me, 
>but running
> 'python <scipy_install_dir>/Lib/sparse/sparse.py' causes 
>a segfault, 
> strange, see below. BTW. I have modified the getdtype() 
>function so that 
> the dtype is always one of 'fdFD', as it is required by 
>the superLU code 
> (_transtabl...). I hope it will not break anything :-)
> 
> r.
> 
> gdb --exec=/usr/bin/python
> (gdb) r 
> /home/share/software/usr/lib/python2.4/site-packages/scipy/sparse/sparse.py
> <snip>
> ...
> </snip>
> Solve: single precision:
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 16384 (LWP 20727)]
> 0xb7e8ce75 in PyDict_DelItem (op=0x0, key=0x80b04b4) at 
>dictobject.c:579
> 579     dictobject.c: není souborem ani adresářem.
>         in dictobject.c
> (gdb) bt
> #0  0xb7e8ce75 in PyDict_DelItem (op=0x0, key=0x80b04b4) 
>at dictobject.c:579
> #1  0xb6c2a925 in superlu_python_module_free ()
>    from 
> /home/share/software/usr/lib/python2.4/site-packages/scipy/sparse/_dsuperlu.so
> #2  0xb6c40e62 in Destroy_SuperMatrix_Store ()
>    from 
> /home/share/software/usr/lib/python2.4/site-packages/scipy/sparse/_dsuperlu.so
> #3  0xb6c2a4d1 in Py_dgssv ()
>    from 
> /home/share/software/usr/lib/python2.4/site-packages/scipy/sparse/_dsuperlu.so
> #4  0xb7e90220 in PyCFunction_Call (func=0xb7adf10c, 
>arg=0xb79eb17c, kw=0x0)
>     at methodobject.c:77
> #5  0xb7ed2857 in call_function (pp_stack=0xbfb8b0d8, 
>oparg=8) at 
> ceval.c:3558
> #6  0xb7ecf9a6 in PyEval_EvalFrame (f=0x80856ac) at 
>ceval.c:2163
> #7  0xb7ed0e3e in PyEval_EvalCodeEx (co=0xb7893560, 
>globals=0xb7bc1824,
>     locals=0x0, args=0x807d6dc, argcount=2, 
>kws=0x807d6e4, kwcount=0,
>     defs=0xb79e3a58, defcount=1, closure=0x0) at 
>ceval.c:2736
> #8  0xb7ed2b88 in fast_function (func=0xb79eb09c, 
>pp_stack=0xbfb8b318, n=2,
>     na=2, nk=0) at ceval.c:3651
> #9  0xb7ed292e in call_function (pp_stack=0xbfb8b318, 
>oparg=2) at 
> ceval.c:3579
> #10 0xb7ecf9a6 in PyEval_EvalFrame (f=0x807d58c) at 
>ceval.c:2163
> #11 0xb7ed0e3e in PyEval_EvalCodeEx (co=0xb7893720, 
>globals=0xb7bc1824,
>     locals=0xb7bc1824, args=0x0, argcount=0, kws=0x0, 
>kwcount=0, defs=0x0,
> ---Type <return> to continue, or q <return> to quit---
>     defcount=0, closure=0x0) at ceval.c:2736
> #12 0xb7ecc2ae in PyEval_EvalCode (co=0xb7893720, 
>globals=0xb7bc1824,
>     locals=0xb7bc1824) at ceval.c:484
> #13 0xb7ef77c1 in run_node (n=0xb7ba92d8,
>     filename=0xbfb8cf55 
> "/home/share/software/usr/lib/python2.4/site-packages/scipy/sparse/sparse.py", 
> globals=0xb7bc1824, locals=0xb7bc1824, flags=0xbfb8b560)
>     at pythonrun.c:1265
> #14 0xb7ef7758 in run_err_node (n=0xb7ba92d8,
>     filename=0xbfb8cf55 
> "/home/share/software/usr/lib/python2.4/site-packages/scipy/sparse/sparse.py", 
> globals=0xb7bc1824, locals=0xb7bc1824, flags=0xbfb8b560)
>     at pythonrun.c:1252
> #15 0xb7ef7716 in PyRun_FileExFlags (fp=0x804ad88,
>     filename=0xbfb8cf55 
> "/home/share/software/usr/lib/python2.4/site-packages/scipy/sparse/sparse.py", 
> start=257, globals=0xb7bc1824, locals=0xb7bc1824,
>     closeit=1, flags=0xbfb8b560) at pythonrun.c:1243
> #16 0xb7ef6647 in PyRun_SimpleFileExFlags (fp=0x804ad88,
>     filename=0xbfb8cf55 
> "/home/share/software/usr/lib/python2.4/site-packages/scipy/sparse/sparse.py", 
> closeit=1, flags=0xbfb8b560) at pythonrun.c:860
> #17 0xb7ef5ee1 in PyRun_AnyFileExFlags (fp=0x804ad88,
>     filename=0xbfb8cf55 
> "/home/share/software/usr/lib/python2.4/site-packages/scipy/sparse/sparse.py", 
> closeit=1, flags=0xbfb8b560) at pythonrun.c:664
> #18 0xb7efe703 in Py_Main (argc=2, argv=0xbfb8b614) at 
>main.c:484
> #19 0x080486b2 in ?? ()
> 
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-dev

  
  
On a 32-bit machine

Solve: single precision complex:
Solve: double precision complex:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1076175008 (LWP 22590)]
0x08081cdb in ?? ()
(gdb) bt
#0  0x08081cdb in ?? ()
#1  0x4265913c in ?? () from 
/usr/local/lib/python2.4/site-packages/scipy/sparse/_csuperlu.so
#2  0x081b7118 in ?? ()
#3  0xbfffe5b8 in ?? ()
#4  0x420c2f39 in superlu_python_module_free 
(ptr=0x4038c34c) at _superlu_utils.c:61
#5  0x420c2f39 in superlu_python_module_free 
(ptr=0x81b7118) at _superlu_utils.c:61
#6  0x420d72df in Destroy_SuperMatrix_Store (A=0x4038c34c) 
at util.c:56
#7  0x420c2d4a in Py_cgssv (self=0x0, args=0x4029de2c, 
kwdict=0x0) at _csuperlumodule.c:94
#8  0x0811eb56 in ?? ()
#9  0x00000000 in ?? ()
#10 0x4029de2c in ?? ()
#11 0x00000000 in ?? ()
#12 0x00000003 in ?? ()
#13 0xffffffff in ?? ()
#14 0x405b8240 in ?? ()
#15 0x420c2a30 in Py_cgstrf () at _csuperlumodule.c:154
#16 0x080c74ed in ?? ()
#17 0x4037f3ac in ?? ()
#18 0x4029de2c in ?? ()
#19 0x00000000 in ?? ()
#20 0x0814d940 in ?? ()
#21 0x0000000b in ?? ()
#22 0x2a080909 in ?? ()
#23 0x4035735c in ?? ()
#24 0x4038c40c in ?? ()
#25 0x4064bd60 in _PyCLongDouble_ArrFuncs ()
    from 
/usr/local/lib/python2.4/site-packages/numpy/core/multiarray.so
#26 0x403898ac in ?? ()
#27 0xbfffe7b8 in ?? ()
#28 0x0805f312 in ?? ()
#29 0x403898ac in ?? ()
#30 0x405af0e0 in ?? ()
#31 0x4064bd60 in _PyCLongDouble_ArrFuncs ()
    from 
/usr/local/lib/python2.4/site-packages/numpy/core/multiarray.so

Nils




More information about the Scipy-dev mailing list