[Numpy-discussion] Strange crash in numpy.linalg.lstsq.

Jonathan Taylor jonathan.taylor@utoronto...
Mon Aug 17 12:42:32 CDT 2009


Hi,

I am getting a strange crash in numpy.linalg.lstsq.  I have put the code
that causes the crash along with two data files on my website at:

http://www.cs.toronto.edu/~jtaylor/crash/

I would be interested to know if this bug can be duplicated and/or if anyone
has any suggestions as to why:

import numpy as np
A = np.load('A.npy')
b = np.load('b.npy')
rc = np.linalg.lstsq(A,b)

produces:

*** glibc detected *** /usr/bin/python: free(): invalid next size (normal):
0x091793c0 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7dc7a85]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7dcb4f0]
/u/jtaylor/lib/python2.5/site-packages/numpy/core/multiarray.so[0xb795403e]
/usr/bin/python[0x811247a]
/usr/bin/python(PyEval_EvalCodeEx+0x323)[0x80cae33]
/usr/bin/python(PyEval_EvalFrameEx+0x565e)[0x80c93fe]
/usr/bin/python(PyEval_EvalCodeEx+0x6e7)[0x80cb1f7]
/usr/bin/python(PyEval_EvalCode+0x57)[0x80cb347]
/usr/bin/python(PyRun_FileExFlags+0xf8)[0x80ea818]
/usr/bin/python[0x80c1f5a]
/usr/bin/python(PyObject_Call+0x27)[0x805cb97]
/usr/bin/python(PyEval_EvalFrameEx+0x4064)[0x80c7e04]
/usr/bin/python(PyEval_EvalCodeEx+0x6e7)[0x80cb1f7]
/usr/bin/python[0x8113696]
/usr/bin/python(PyObject_Call+0x27)[0x805cb97]
/usr/bin/python(PyEval_EvalFrameEx+0x4064)[0x80c7e04]
/usr/bin/python(PyEval_EvalCodeEx+0x6e7)[0x80cb1f7]
/usr/bin/python(PyEval_EvalFrameEx+0x565e)[0x80c93fe]
/usr/bin/python(PyEval_EvalCodeEx+0x6e7)[0x80cb1f7]
/usr/bin/python[0x8113696]
/usr/bin/python(PyObject_Call+0x27)[0x805cb97]
/usr/bin/python[0x8062bfb]
/usr/bin/python(PyObject_Call+0x27)[0x805cb97]
/usr/bin/python(PyEval_EvalFrameEx+0x3d07)[0x80c7aa7]
/usr/bin/python(PyEval_EvalCodeEx+0x6e7)[0x80cb1f7]
/usr/bin/python(PyEval_EvalFrameEx+0x565e)[0x80c93fe]
/usr/bin/python(PyEval_EvalFrameEx+0x5945)[0x80c96e5]
/usr/bin/python(PyEval_EvalCodeEx+0x6e7)[0x80cb1f7]
/usr/bin/python(PyEval_EvalFrameEx+0x6d09)[0x80caaa9]
/usr/bin/python(PyEval_EvalCodeEx+0x6e7)[0x80cb1f7]
/usr/bin/python(PyEval_EvalFrameEx+0x565e)[0x80c93fe]
/usr/bin/python(PyEval_EvalCodeEx+0x6e7)[0x80cb1f7]
/usr/bin/python(PyEval_EvalFrameEx+0x565e)[0x80c93fe]
/usr/bin/python(PyEval_EvalFrameEx+0x5945)[0x80c96e5]
/usr/bin/python(PyEval_EvalCodeEx+0x6e7)[0x80cb1f7]
/usr/bin/python(PyEval_EvalFrameEx+0x565e)[0x80c93fe]
/usr/bin/python(PyEval_EvalCodeEx+0x6e7)[0x80cb1f7]
/usr/bin/python(PyEval_EvalFrameEx+0x565e)[0x80c93fe]
/usr/bin/python(PyEval_EvalCodeEx+0x6e7)[0x80cb1f7]
/usr/bin/python(PyEval_EvalFrameEx+0x565e)[0x80c93fe]
/usr/bin/python(PyEval_EvalCodeEx+0x6e7)[0x80cb1f7]
/usr/bin/python(PyEval_EvalCode+0x57)[0x80cb347]
/usr/bin/python(PyRun_FileExFlags+0xf8)[0x80ea818]
/usr/bin/python(PyRun_SimpleFileExFlags+0x199)[0x80eaab9]
/usr/bin/python(Py_Main+0xa35)[0x8059335]
/usr/bin/python(main+0x22)[0x80587f2]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0xb7d72450]
/usr/bin/python[0x8058761]
======= Memory map: ========
08048000-08140000 r-xp 00000000 08:06 83501      /usr/bin/python2.5
08140000-08165000 rw-p 000f7000 08:06 83501      /usr/bin/python2.5
08165000-0919a000 rw-p 08165000 00:00 0          [heap]
b5200000-b5221000 rw-p b5200000 00:00 0
b5221000-b5300000 ---p b5221000 00:00 0
b53fc000-b5499000 r-xp 00000000 00:1a 552170
/h/44/jtaylor/lib/python2.5/site-packages/Cython/Compiler/Parsing.so
b5499000-b54a2000 rw-p 0009d000 00:1a 552170
/h/44/jtaylor/lib/python2.5/site-packages/Cython/Compiler/Parsing.so
b54a2000-b5624000 rw-p b54a2000 00:00 0
b5624000-b568f000 r-xp 00000000 00:1a 553542
/h/44/jtaylor/build/matplotlib/lib/matplotlib/backends/_backend_agg.so
b568f000-b5691000 rw-p 0006a000 00:1a 553542
/h/44/jtaylor/build/matplotlib/lib/matplotlib/backends/_backend_agg.so
b5691000-b56f6000 r-xp 00000000 08:06 90831
/usr/lib/python2.5/lib-dynload/unicodedata.so
b56f6000-b5705000 rw-p 00065000 08:06 90831
/usr/lib/python2.5/lib-dynload/unicodedata.so
b5705000-b5725000 r-xp 00000000 00:1a 553545
/h/44/jtaylor/build/matplotlib/lib/matplotlib/backends/_tkagg.so
b5725000-b5726000 rw-p 00020000 00:1a 553545
/h/44/jtaylor/build/matplotlib/lib/matplotlib/backends/_tkagg.so
b5726000-b5727000 ---p b5726000 00:00 0
b5727000-b5f27000 rwxp b5727000 00:00 0
b5f27000-b5f3e000 r-xp 00000000 08:06 85532      /usr/lib/libxcb.so.1.0.0
b5f3e000-b5f3f000 rw-p 00016000 08:06 85532      /usr/lib/libxcb.so.1.0.0
b5f3f000-b5f53000 r-xp 00000000 08:06 1187870    /lib/tls/i686/cmov/
libnsl-2.7.so
b5f53000-b5f55000 rw-p 00013000 08:06 1187870    /lib/tls/i686/cmov/
libnsl-2.7.so
b5f55000-b5f57000 rw-p b5f55000 00:00 0
b5f57000-b603b000 r-xp 00000000 08:06 85536      /usr/lib/libX11.so.6.2.0
b603b000-b603e000 rw-p 000e4000 08:06 85536      /usr/lib/libX11.so.6.2.0
b603e000-b60e7000 r-xp 00000000 08:06 85098      /usr/lib/libtcl8.4.so.0
b60e7000-b60f1000 rw-p 000a8000 08:06 85098      /usr/lib/libtcl8.4.so.0
b60f1000-b60f2000 rw-p b60f1000 00:00 0
b60f2000-b61c4000 r-xp 00000000 08:06 85102      /usr/lib/libtk8.4.so.0
b61c4000-b61cf000 rw-p 000d2000 08:06 85102      /usr/lib/libtk8.4.so.0
b61cf000-b61d0000 rw-p b61cf000 00:00 0
b61d0000-b62a8000 r-xp 00000000 08:06 85103      /usr/lib/libBLT.2.4.so.8.4
b62a8000-b62b9000 rw-p 000d8000 08:06 85103      /usr/lib/libBLT.2.4.so.8.4
b62b9000-b62ba000 rw-p b62b9000 00:00 0
b62ba000-b62dc000 r-xp 00000000 08:06 180469     /usr/lib/libpng12.so.0.15.0
b62dc000-b62dd000 rw-p 00022000 08:06 180469     /usr/lib/libpng12.so.0.15.0
b62f5000-b62f6000 rw-p b62f5000 00:00 0
b62f6000-b631d000 r-xp 00000000 00:1a 553544
/h/44/jtaylor/build/matplotlib/lib/matplotlib/_png.so
b631d000-b631e000 rw-p 00027000 00:1a 553544
/h/44/jtaylor/build/matplotlib/lib/matplotlib/_png.so
b631e000-b6367000 r-xp 00000000 00:1a 553543
/h/44/jtaylor/build/matplotlib/lib/matplotlib/_image.so
b6367000-b6369000 rw-p 00049000 00:1a 553543
/h/44/jtaylor/build/matplotlib/lib/matplotlib/_image.so
b6369000-b63d3000 r-xp 00000000 08:06 83795
/usr/lib/libfreetype.so.6.3.16
b63d3000-b63d6000 rw-p 0006a000 08:06 83795
/usr/lib/libfreetype.so.6.3.16
b63d6000-b6424000 r-xp 00000000 00:1a 553535
/h/44/jtaylor/build/matplotlib/lib/matplotlib/ft2font.so
b6424000-b6427000 rw-p 0004e000 00:1a 553535
/h/44/jtaylor/build/matplotlib/lib/matplotlib/ft2font.so
b6427000-b650f000 r-xp 00000000 08:06 88506      /usr/lib/libstdc++.so.6.0.9
b650f000-b6512000 r--p 000e8000 08:06 88506      /usr/lib/libstdc++.so.6.0.9
b6512000-b6514000 rw-p 000eb000 08:06 88506      /usr/lib/libstdc++.so.6.0.9
b6514000-b651a000 rw-p b6514000 00:00 0
b651e000-b6528000 r-xp 00000000 08:06 313979
/usr/lib/python2.5/lib-dynload/_tkinter.so
b6528000-b6529000 rw-p 0000a000 08:06 313979
/usr/lib/python2.5/lib-dynload/_tkinter.so
b6529000-b652d000 r-xp 00000000 08:06 90832
/usr/lib/python2.5/lib-dynload/zlib.so
b652d000-b652e000 rw-p 00004000 08:06 90832
/usr/lib/python2.5/lib-dynload/zlib.so
b652e000-b6532000 r-xp 00000000 00:1a 553538
/h/44/jtaylor/build/matplotlib/lib/matplotlib/_cntr.so
b6532000-b6533000 rw-p 00004000 00:1a 553538
/h/44/jtaylor/build/matplotlib/lib/matplotlib/_cntr.so
b6533000-b6577000 r-xp 00000000 00:1a 553541
/h/44/jtaylor/build/matplotlib/lib/matplotlib/_path.so
b6577000-b6578000 rw-p 00044000 00:1a 553541
/h/44/jtaylor/build/matplotlib/lib/matplotlib/_path.so
b6578000-b6587000 r-xp 00000000 08:06 92419
/usr/lib/python2.5/lib-dynload/datetime.so
b6587000-b658a000 rw-p 0000e000 08:06 92419
/usr/lib/python2.5/lib-dynload/datetime.so
b658a000-b65b9000 r-xp 00000000 00:1a 532925
/h/44/jtaylor/lib/python2.5/site-packages/numpy/random/mtrand.so
b65b9000-b65cb000 rw-p 0002e000 00:1a 532925
/h/44/jtaylor/lib/python2.5/site-packages/numpy/random/mtrand.so
b65cb000-b6923000 r-xp 00000000 08:06 517267
/usr/lib/atlas/libblas.so.3.0
b6923000-b6927000 rw-p 00358000 08:06 517267
/usr/lib/atlas/libblas.so.3.0
b6927000-b6e6f000 r-xp 00000000 08:06 517268
/usr/lib/atlas/liblapack.so.3.0
b6e6f000-b6e72000 rw-p 00548000 08:06 517268
/usr/lib/atlas/liblapack.so.3.0
b6e72000-b6f76000 rw-p b6e72000 00:00 0
b6f76000-b6f7a000 r-xp 00000000 08:06 85530      /usr/lib/libXdmcp.so.6.0.0
b6f7a000-b6f7b000 rw-p 00003000 08:06 85530      /usr/lib/libXdmcp.so.6.0.0
b6f7b000-b6f7f000 r-xp 00000000 08:06 92437
/usr/lib/python2.5/lib-dynload/_csv.so
b6f7f000-b6f81000 rw-p 00004000 08:06 92437
/usr/lib/python2.5/lib-dynload/_csv.so
b6f81000-b6f84000 r-xp 00000000 08:06 92427
/usr/lib/python2.5/lib-dynload/_locale.so
b6f84000-b6f85000 rw-p 00003000 08:06 92427
/usr/lib/python2.5/lib-dynload/_locale.so
b6f85000-b6f8e000 r-xp 00000000 00:1a 533113
/h/44/jtaylor/lib/python2.5/site-packages/numpy/fft/fftpack_lite.so
b6f8e000-b6f8f000 rw-p 00008000 00:1a 533113
/h/44/jtaylor/lib/python2.5/site-packages/numpy/fft/fftpack_lite.so
b6f8f000-b6fad000 r-xp 00000000 00:1a 533028
/h/44/jtaylor/lib/python2.5/site-packages/numpy/core/scalarmath.so
b6fad000-b6fae000 rw-p 0001e000 00:1a 533028
/h/44/jtaylor/lib/python2.Aborted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090817/437542ff/attachment.html 


More information about the NumPy-Discussion mailing list