[SciPy-dev] Another segfault

Robert Cimrman cimrman3 at ntc.zcu.cz
Fri Mar 3 09:58:17 CST 2006


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 ?? ()




More information about the Scipy-dev mailing list