[Scipy-tickets] [SciPy] #1789: test_linsolve.TestSplu.test_spilu_nnz0 segfaults with python-dbg

SciPy Trac scipy-tickets@scipy....
Fri Dec 14 03:18:32 CST 2012


#1789: test_linsolve.TestSplu.test_spilu_nnz0 segfaults with python-dbg
---------------------+------------------------------------------------------
 Reporter:  jtaylor  |       Owner:  somebody   
     Type:  defect   |      Status:  new        
 Priority:  normal   |   Milestone:  Unscheduled
Component:  Other    |     Version:  0.11.0     
 Keywords:           |  
---------------------+------------------------------------------------------
 git head d1ddec7 and v0.11.0 un ubuntu 12.10 with python2.7.3

 python-dbg /tmp/local/lib/python2.7/site-
 packages/scipy/sparse/linalg/dsolve/tests/test_linsolve.py
 Fatal Python error: UNREF invalid object
 Aborted (core dumped)

 it does not occur with regular non-dbg python


 {{{
 Program received signal SIGABRT, Aborted.
 0x00007ffff6f1a425 in __GI_raise (sig=<optimized out>)
     at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
 64      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or
 directory.
 (gdb) bt
 #0  0x00007ffff6f1a425 in __GI_raise (sig=<optimized out>)
     at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
 #1  0x00007ffff6f1db8b in __GI_abort () at abort.c:91
 #2  0x000000000055751b in Py_FatalError (msg=0x5fdd89 "UNREF invalid
 object")
     at ../Python/pythonrun.c:1689
 #3  0x000000000048cef6 in _Py_ForgetReference (op=20411472) at
 ../Objects/object.c:2225
 #4  0x000000000048cf49 in _Py_Dealloc (op=20411472) at
 ../Objects/object.c:2244
 #5  0x000000000047e8c3 in PyDict_DelItem (op=
     {31833472: None, 19766768: None, 27305488: None, 19765008: None,
 29468416: None, 31052800: None, 30672976: None, 31041216: None, 28723680:
 None, 31034512: None, 20772272: None, 14831056: None, 20222496: None,
 31067392: None, 27340656: None, 32226688: None, 31877680: None, 31959728:
 None, 32168016: None}, key=20411472) at ../Objects/dictobject.c:855
 #6  0x00007ffff0c1822c in superlu_python_module_free (ptr=0x1377450)
     at scipy/sparse/linalg/dsolve/_superlu_utils.c:65
 #7  0x00007ffff0c2b667 in Destroy_SuperMatrix_Store (A=0x7fffffff5660)
     at scipy/sparse/linalg/dsolve/SuperLU/SRC/util.c:106
 #8  0x00007ffff0c1757d in Py_gstrf (self=0x0, args=
     (5, <numpy.int32 at remote 0x1a7f280>, <numpy.ndarray at remote
 0x1e25e40>, <numpy.ndarray at remote 0x1e2b240>, <numpy.ndarray at remote
 0x1e25dc0>), keywds=
     {'ilu': True, 'options': {'ILU_DropRule': None, 'ColPerm': None,
 'Relax': None, 'DiagPivotThresh': None, 'PanelSize': None, 'ILU_DropTol':
 None, 'ILU_FillFactor': None}})
     at scipy/sparse/linalg/dsolve/_superlumodule.c:202
 #9  0x0000000000486b34 in PyCFunction_Call (func=<built-in function
 gstrf>, arg=
     (5, <numpy.int32 at remote 0x1a7f280>, <numpy.ndarray at remote
 0x1e25e40>, <numpy.ndarray at remote 0x1e2b240>, <numpy.ndarray at remote
 0x1e25dc0>), kw=
     {'ilu': True, 'options': {'ILU_DropRule': None, 'ColPerm': None,
 'Relax': None, 'DiagPivotThresh': None, 'PanelSize': None, 'ILU_DropTol':
 None, 'ILU_FillFactor': None}})
     at ../Objects/methodobject.c:85
 }}}

 {{{
 (gdb) frame 6
 #6  0x00007ffff0c1822c in superlu_python_module_free (ptr=0x1377450)
     at scipy/sparse/linalg/dsolve/_superlu_utils.c:65
 65            !(PyDict_DelItem(_superlumodule_memory_dict, key))) {
 (gdb) p _superlumodule_memory_dict
 $1 =
     {31833472: None, 19766768: None, 27305488: None, 19765008: None,
 29468416: None, 31052800: None, 30672976: None, 31041216: None, 28723680:
 None, 31034512: None, 20772272: None, 14831056: None, 20222496: None,
 31067392: None, 27340656: None, 32226688: None, 31877680: None, 31959728:
 None, 32168016: None}
 (gdb) p key
 $2 = 20411472
 (gdb) l
 60           of already allocated pointers --- thus after abort, the
 module can free all
 61           the memory that "might" have been allocated to avoid memory
 leaks on abort
 62           calls.
 63         */
 64        if (_superlumodule_memory_dict && \
 65            !(PyDict_DelItem(_superlumodule_memory_dict, key))) {
 66          free(ptr);
 67        }
 68        Py_DECREF(key);
 69        PyErr_Restore(ptype, pvalue, ptraceback);
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1789>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list