[SciPy-dev] Another segfault

Nils Wagner nwagner at mecha.uni-stuttgart.de
Fri Mar 3 13:47:26 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 64 bit machine scipy.test(1,10) results in a segfault
The bt message differs from the bt on a 32 bit machine.
For what reason ?

Test whether the lu_solve command segfaults, as reported 
by NilsUse minimum degree ordering on A'+A.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 5170)]
0x00002aaaae34d787 in zpivotL (jcol=0, u=1, 
usepr=0x7fffffc62264, perm_r=0xc9c7d0, iperm_r=0xbd8c60,
     iperm_c=0xdb55c0, pivrow=0x7fffffc62270, Glu=0x0, 
stat=0xffffffffab80bb68) at zpivotL.c:121
121             perm_r[*pivrow] = jcol;
(gdb) bt
#0  0x00002aaaae34d787 in zpivotL (jcol=0, u=1, 
usepr=0x7fffffc62264, perm_r=0xc9c7d0, iperm_r=0xbd8c60,
     iperm_c=0xdb55c0, pivrow=0x7fffffc62270, Glu=0x0, 
stat=0xffffffffab80bb68) at zpivotL.c:121
#1  0x00002aaaae33f2f4 in zgstrf (options=<value optimized 
out>, A=0x7fffffc62390,
     drop_tol=<value optimized out>, relax=<value 
optimized out>, panel_size=10, etree=<value optimized 
out>,
     work=<value optimized out>, lwork=13223888, 
perm_c=0xdfd420, perm_r=0xc9c7d0, L=0x2aaab56b21b8,
     U=0x2aaab56b21d8, stat=0x7fffffc62370, 
info=0x7fffffc623bc) at zgstrf.c:310
#2  0x00002aaaae33bbf5 in newSciPyLUObject 
(A=0x7fffffc62450, diag_pivot_thresh=1, drop_tol=0, 
relax=1,
     panel_size=10, permc_spec=2, intype=<value optimized 
out>) at _superluobject.c:382
#3  0x00002aaaae33a91a in Py_zgstrf (self=<value optimized 
out>, args=<value optimized out>,
     keywds=<value optimized out>) at 
_zsuperlumodule.c:149
#4  0x00002aaaaac5496a in PyEval_EvalFrame (f=0xe4dbc0) at 
ceval.c:3547
#5  0x00002aaaaac55404 in PyEval_EvalCodeEx 
(co=0x2aaaae09b2d0, globals=<value optimized out>,
     locals=<value optimized out>, args=0x5, argcount=1, 
kws=0x9d1b78, kwcount=0, defs=0x2aaaae095668,
     defcount=5, closure=0x0) at ceval.c:2730
#6  0x00002aaaaac53aba in PyEval_EvalFrame (f=0x9d19a0) at 
ceval.c:3640
#7  0x00002aaaaac53b97 in PyEval_EvalFrame (f=0x9bbe60) at 
ceval.c:3629
#8  0x00002aaaaac55404 in PyEval_EvalCodeEx 
(co=0x2aaaabbedce0, globals=<value optimized out>,
     locals=<value optimized out>, args=0x2aaab5a449f8, 
argcount=2, kws=0xa267c0, kwcount=0,
     defs=0x2aaaabc05068, defcount=1, closure=0x0) at 
ceval.c:2730
#9  0x00002aaaaac0e9af in function_call 
(func=0x2aaaabc047d0, arg=0x2aaab5a449e0, kw=<value 
optimized out>)
     at funcobject.c:548
#10 0x00002aaaaabfa760 in PyObject_Call (func=<value 
optimized out>, arg=<value optimized out>,
     kw=<value optimized out>) at abstract.c:1751
#11 0x00002aaaaac532e2 in PyEval_EvalFrame (f=0xb83530) at 
ceval.c:3824
#12 0x00002aaaaac55404 in PyEval_EvalCodeEx 
(co=0x2aaaabbedd50, globals=<value optimized out>,
     locals=<value optimized out>, args=0x2aaab5a76e78, 
argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0,
     closure=0x0) at ceval.c:2730
#13 0x00002aaaaac0e9af in function_call 
(func=0x2aaaabc04848, arg=0x2aaab5a76e60, kw=<value 
optimized out>)
     at funcobject.c:548
#14 0x00002aaaaabfa760 in PyObject_Call (func=<value 
optimized out>, arg=<value optimized out>,
     kw=<value optimized out>) at abstract.c:1751
#15 0x00002aaaaac02131 in instancemethod_call (func=<value 
optimized out>, arg=0x2aaab5a76e60, kw=0x0)
     at classobject.c:2431
#16 0x00002aaaaabfa760 in PyObject_Call (func=<value 
optimized out>, arg=<value optimized out>,
---Type <return> to continue, or q <return> to quit---
     kw=<value optimized out>) at abstract.c:1751
#17 0x00002aaaaac5380d in PyEval_EvalFrame (f=0xb5b810) at 
ceval.c:3755
#18 0x00002aaaaac55404 in PyEval_EvalCodeEx 
(co=0x2aaaabbe25e0, globals=<value optimized out>,
     locals=<value optimized out>, args=0x2aaab5a81338, 
argcount=2, kws=0x0, kwcount=0, defs=0x2aaaabc05ae8,
     defcount=1, closure=0x0) at ceval.c:2730
#19 0x00002aaaaac0e9af in function_call 
(func=0x2aaaabc08d70, arg=0x2aaab5a81320, kw=<value 
optimized out>)
     at funcobject.c:548
#20 0x00002aaaaabfa760 in PyObject_Call (func=<value 
optimized out>, arg=<value optimized out>,
     kw=<value optimized out>) at abstract.c:1751
#21 0x00002aaaaac02131 in instancemethod_call (func=<value 
optimized out>, arg=0x2aaab5a81320, kw=0x0)
     at classobject.c:2431
#22 0x00002aaaaabfa760 in PyObject_Call (func=<value 
optimized out>, arg=<value optimized out>,
     kw=<value optimized out>) at abstract.c:1751
#23 0x00002aaaaac33b0a in slot_tp_call (self=<value 
optimized out>, args=0x2aaab56b0590, kwds=0x0)
     at typeobject.c:4526
#24 0x00002aaaaabfa760 in PyObject_Call (func=<value 
optimized out>, arg=<value optimized out>,
     kw=<value optimized out>) at abstract.c:1751
#25 0x00002aaaaac5380d in PyEval_EvalFrame (f=0x674100) at 
ceval.c:3755
#26 0x00002aaaaac55404 in PyEval_EvalCodeEx 
(co=0x2aaaabbf47a0, globals=<value optimized out>,
     locals=<value optimized out>, args=0x2aaab5a71ad0, 
argcount=2, kws=0xd46290, kwcount=0, defs=0x0,
     defcount=0, closure=0x0) at ceval.c:2730
#27 0x00002aaaaac0e9af in function_call 
(func=0x2aaaabc060c8, arg=0x2aaab5a71ab8, kw=<value 
optimized out>)
     at funcobject.c:548
#28 0x00002aaaaabfa760 in PyObject_Call (func=<value 
optimized out>, arg=<value optimized out>,
     kw=<value optimized out>) at abstract.c:1751
#29 0x00002aaaaac532e2 in PyEval_EvalFrame (f=0x626c00) at 
ceval.c:3824
#30 0x00002aaaaac55404 in PyEval_EvalCodeEx 
(co=0x2aaaabbf4810, globals=<value optimized out>,
     locals=<value optimized out>, args=0x2aaab5a6ca40, 
argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0,
     closure=0x0) at ceval.c:2730
#31 0x00002aaaaac0e9af in function_call 
(func=0x2aaaabc06140, arg=0x2aaab5a6ca28, kw=<value 
optimized out>)
     at funcobject.c:548
#32 0x00002aaaaabfa760 in PyObject_Call (func=<value 
optimized out>, arg=<value optimized out>,
     kw=<value optimized out>) at abstract.c:1751
#33 0x00002aaaaac02131 in instancemethod_call (func=<value 
optimized out>, arg=0x2aaab5a6ca28, kw=0x0)
---Type <return> to continue, or q <return> to quit---
     at classobject.c:2431
#34 0x00002aaaaabfa760 in PyObject_Call (func=<value 
optimized out>, arg=<value optimized out>,
     kw=<value optimized out>) at abstract.c:1751
#35 0x00002aaaaac33b0a in slot_tp_call (self=<value 
optimized out>, args=0x2aaaaab28c50, kwds=0x0)
     at typeobject.c:4526
#36 0x00002aaaaabfa760 in PyObject_Call (func=<value 
optimized out>, arg=<value optimized out>,
     kw=<value optimized out>) at abstract.c:1751
#37 0x00002aaaaac5380d in PyEval_EvalFrame (f=0x5cfc30) at 
ceval.c:3755
#38 0x00002aaaaac53b97 in PyEval_EvalFrame (f=0x76cbb0) at 
ceval.c:3629
#39 0x00002aaaaac55404 in PyEval_EvalCodeEx 
(co=0x2aaaabbe2d50, globals=<value optimized out>,
     locals=<value optimized out>, args=0x5b8998, 
argcount=3, kws=0x5b89b0, kwcount=0, defs=0x2aaaabc07b60,
     defcount=2, closure=0x0) at ceval.c:2730
#40 0x00002aaaaac53aba in PyEval_EvalFrame (f=0x5b87f0) at 
ceval.c:3640
#41 0x00002aaaaac55404 in PyEval_EvalCodeEx 
(co=0x2aaaaab22c00, globals=<value optimized out>,
     locals=<value optimized out>, args=0x5cae20, 
argcount=2, kws=0x5cae30, kwcount=0, defs=0x2aaaadd64188,
     defcount=2, closure=0x0) at ceval.c:2730
#42 0x00002aaaaac53aba in PyEval_EvalFrame (f=0x5cac90) at 
ceval.c:3640
#43 0x00002aaaaac55404 in PyEval_EvalCodeEx 
(co=0x2aaaadd3ee30, globals=<value optimized out>,
     locals=<value optimized out>, args=0x0, argcount=0, 
kws=0x0, kwcount=0, defs=0x0, defcount=0,
     closure=0x0) at ceval.c:2730
#44 0x00002aaaaac556d2 in PyEval_EvalCode (co=<value 
optimized out>, globals=<value optimized out>,
     locals=<value optimized out>) at ceval.c:484
#45 0x00002aaaaac70719 in run_node (n=<value optimized 
out>, filename=<value optimized out>,
     globals=0x503b50, locals=0x503b50, flags=<value 
optimized out>) at pythonrun.c:1265
#46 0x00002aaaaac71bc7 in PyRun_InteractiveOneFlags 
(fp=<value optimized out>,
     filename=0x2aaaaac95e73 "<stdin>", 
flags=0x7fffffc64cf0) at pythonrun.c:762
#47 0x00002aaaaac71cbe in PyRun_InteractiveLoopFlags 
(fp=0x2aaaab809e00, filename=0x2aaaaac95e73 "<stdin>",
     flags=0x7fffffc64cf0) at pythonrun.c:695
#48 0x00002aaaaac7221c in PyRun_AnyFileExFlags 
(fp=0x2aaaab809e00, filename=0x2aaaaac95e73 "<stdin>",
     closeit=0, flags=0x7fffffc64cf0) at pythonrun.c:658
#49 0x00002aaaaac77b25 in Py_Main (argc=<value optimized 
out>, argv=0x7fffffc66b12) at main.c:484
#50 0x00002aaaab603ced in __libc_start_main () from 
/lib64/libc.so.6
#51 0x00000000004006ea in _start () at start.S:113
#52 0x00007fffffc64d88 in ?? ()




More information about the Scipy-dev mailing list