<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/351" rel="nofollow">http://projects.scipy.org/scipy/ticket/351</a> on 2007-01-19 by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/wnbell/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/wnbell">@wnbell</a>, assigned to unknown.</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from scipy import *

M = sparse.csr_matrix(rand(6,6))
b = rand(M.shape[0])

lu = linsolve.splu(M) #crash here"><pre class="notranslate"><code class="notranslate">from scipy import *

M = sparse.csr_matrix(rand(6,6))
b = rand(M.shape[0])

lu = linsolve.splu(M) #crash here
</code></pre></div>
<p dir="auto">Produces the output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="nathan@droog:~/Work/hirani_group/projects/pydec/multigrid/scratch$ python splu.py 
Use minimum degree ordering on A'+A.
Segmentation fault (core dumped)
nathan@droog:~/Work/hirani_group/projects/pydec/multigrid/scratch$ gdb python
(gdb) run -i splu.py 
Starting program: /usr/bin/python -i splu2.py
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1209776464 (LWP 17999)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Use minimum degree ordering on A'+A.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1209776464 (LWP 17999)]
0xb696b141 in mmdelm_ (mdnode=0xb697e21c, xadj=0x839c4a8, adjncy=0x841ea60, dhead=0x83d3148, dforw=0x8349a40, dbakw=0x835d4c8, qsize=0x834c6f0, llist=0x83e1e80, marker=0x83907d8, maxint=0xbfe64d94, tag=0xb697e214)
    at Lib/linsolve/SuperLU/SRC/mmd.c:366
366             nabor = adjncy[i];
(gdb) bt
#0  0xb696b141 in mmdelm_ (mdnode=0xb697e21c, xadj=0x839c4a8, adjncy=0x841ea60, dhead=0x83d3148, dforw=0x8349a40, dbakw=0x835d4c8, qsize=0x834c6f0, llist=0x83e1e80, marker=0x83907d8, maxint=0xbfe64d94, tag=0xb697e214)
    at Lib/linsolve/SuperLU/SRC/mmd.c:366
#1  0xb696c3fb in genmmd_ (neqns=0xbfe64da4, xadj=0x839c4a8, adjncy=0x841ea60, invp=0x8349a40, perm=0x835d4c8, delta=0xbfe64d98, dhead=0x83d3148, qsize=0x834c6f0, llist=0x83e1e80, marker=0x83907d8, maxint=0xbfe64d94, 
    nofsub=0xbfe64d90) at Lib/linsolve/SuperLU/SRC/mmd.c:186
#2  0xb6964161 in get_perm_c (ispec=2, A=0xbfe65000, perm_c=0x8349a40) at Lib/linsolve/SuperLU/SRC/get_perm_c.c:423
#3  0xb6951d53 in newSciPyLUObject (A=0xbfe65000, diag_pivot_thresh=1, drop_tol=0, relax=1, panel_size=10, permc_spec=2, intype=12) at Lib/linsolve/_superluobject.c:360
#4  0xb6951203 in Py_dgstrf (self=0x0, args=0xb6dd366c, keywds=0x0) at Lib/linsolve/_dsuperlumodule.c:206
#5  0x080b901a in PyEval_EvalFrame ()
#6  0x080ba4b9 in PyEval_EvalCodeEx ()
#7  0x080b86ea in PyEval_EvalFrame ()
#8  0x080ba4b9 in PyEval_EvalCodeEx ()
#9  0x080ba527 in PyEval_EvalCode ()
#10 0x080ddb1a in PyRun_FileExFlags ()
#11 0x080ddd07 in PyRun_SimpleFileExFlags ()
#12 0x08055cc2 in Py_Main ()
#13 0x08055132 in main ()
(gdb) "><pre class="notranslate"><code class="notranslate">nathan@droog:~/Work/hirani_group/projects/pydec/multigrid/scratch$ python splu.py 
Use minimum degree ordering on A'+A.
Segmentation fault (core dumped)
nathan@droog:~/Work/hirani_group/projects/pydec/multigrid/scratch$ gdb python
(gdb) run -i splu.py 
Starting program: /usr/bin/python -i splu2.py
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1209776464 (LWP 17999)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Use minimum degree ordering on A'+A.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1209776464 (LWP 17999)]
0xb696b141 in mmdelm_ (mdnode=0xb697e21c, xadj=0x839c4a8, adjncy=0x841ea60, dhead=0x83d3148, dforw=0x8349a40, dbakw=0x835d4c8, qsize=0x834c6f0, llist=0x83e1e80, marker=0x83907d8, maxint=0xbfe64d94, tag=0xb697e214)
    at Lib/linsolve/SuperLU/SRC/mmd.c:366
366             nabor = adjncy[i];
(gdb) bt
#0  0xb696b141 in mmdelm_ (mdnode=0xb697e21c, xadj=0x839c4a8, adjncy=0x841ea60, dhead=0x83d3148, dforw=0x8349a40, dbakw=0x835d4c8, qsize=0x834c6f0, llist=0x83e1e80, marker=0x83907d8, maxint=0xbfe64d94, tag=0xb697e214)
    at Lib/linsolve/SuperLU/SRC/mmd.c:366
#1  0xb696c3fb in genmmd_ (neqns=0xbfe64da4, xadj=0x839c4a8, adjncy=0x841ea60, invp=0x8349a40, perm=0x835d4c8, delta=0xbfe64d98, dhead=0x83d3148, qsize=0x834c6f0, llist=0x83e1e80, marker=0x83907d8, maxint=0xbfe64d94, 
    nofsub=0xbfe64d90) at Lib/linsolve/SuperLU/SRC/mmd.c:186
#2  0xb6964161 in get_perm_c (ispec=2, A=0xbfe65000, perm_c=0x8349a40) at Lib/linsolve/SuperLU/SRC/get_perm_c.c:423
#3  0xb6951d53 in newSciPyLUObject (A=0xbfe65000, diag_pivot_thresh=1, drop_tol=0, relax=1, panel_size=10, permc_spec=2, intype=12) at Lib/linsolve/_superluobject.c:360
#4  0xb6951203 in Py_dgstrf (self=0x0, args=0xb6dd366c, keywds=0x0) at Lib/linsolve/_dsuperlumodule.c:206
#5  0x080b901a in PyEval_EvalFrame ()
#6  0x080ba4b9 in PyEval_EvalCodeEx ()
#7  0x080b86ea in PyEval_EvalFrame ()
#8  0x080ba4b9 in PyEval_EvalCodeEx ()
#9  0x080ba527 in PyEval_EvalCode ()
#10 0x080ddb1a in PyRun_FileExFlags ()
#11 0x080ddd07 in PyRun_SimpleFileExFlags ()
#12 0x08055cc2 in Py_Main ()
#13 0x08055132 in main ()
(gdb) 
</code></pre></div>
<p dir="auto">The crash does not occur every time the program is run via python (although almost always).  Within gdb the error occurs very very rarely, and is hard to reproduce.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Python 2.4.4c1
gcc (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)"><pre class="notranslate"><code class="notranslate">Python 2.4.4c1
gcc (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)
</code></pre></div>
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/1472" rel="nofollow">http://projects.scipy.org/scipy/ticket/1472</a> on 2011-07-03 by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rgommers/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rgommers">@rgommers</a>, assigned to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pv/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pv">@pv</a>.</em></p>
<p dir="auto">On Python 2.6 (32-bit) under OS X, with numpy 1.6.1rc2.</p>
<p dir="auto">Complete gdb output attached, relevant bit is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test_arpack.test_hermitian_modes(True, &lt;std-hermitian&gt;, 'F', 2, 'LM', None, 0.5, &lt;function aslinearoperator at 0x2a55a30&gt;) ... 
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x07723a70
0x9357bc00 in ATL_zaxpy_xp0yp0aXbX ()
(gdb) bt
#0  0x9357bc00 in ATL_zaxpy_xp0yp0aXbX ()
#1  0x9357ba60 in ATL_zaxpy ()"><pre class="notranslate"><code class="notranslate">test_arpack.test_hermitian_modes(True, &lt;std-hermitian&gt;, 'F', 2, 'LM', None, 0.5, &lt;function aslinearoperator at 0x2a55a30&gt;) ... 
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x07723a70
0x9357bc00 in ATL_zaxpy_xp0yp0aXbX ()
(gdb) bt
#0  0x9357bc00 in ATL_zaxpy_xp0yp0aXbX ()
#1  0x9357ba60 in ATL_zaxpy ()
</code></pre></div>