[Numpy-discussion] Re: numpy (?) bug.

Martin Wiechert martin.wiechert at gmx.de
Mon May 22 05:17:04 EDT 2006


Robert,

Thanks for your reply. I have managed to get a gdb backtrace, see below. Does 
this help? Can I extract more useful information from gdb (never used it 
before)?

Btw. I have no problem showing my code (besides embarrassment), but I'm pretty 
certain you don't want to read it ;-) I'll try to narrow it down, but it's 
difficult, e.g. it doesn't seem to happen the first time the guilty code is 
executed but rather when it is called the third or fourth time or even later.

Thanks,
Martin.


On Monday 22 May 2006 13:21, Robert Kern wrote:
> Martin Wiechert wrote:
> > Hi list,
> >
> > I've a rather huge and involved application which now that I've updateded
> > a couple of its dependencies (numpy/PyQwt/ScientificPython ...) keeps
> > crashing on me after "certain patterns of interaction". I've pasted a
> > typical backtrace below, the top part looks always very similar, in
> > particular multiarray.so is always there. Also it's always an illegal
> > call to free ().
> >
> > So you gurus out there, does this mean that numpy is the culprit?
>
> Possibly. Without access to your code, it's impossible for us to tell and
> even more impossible for us to fix it. If you can narrow it down to the
> function in numpy.core.multiarray that's being called and the arguments you
> are passing to it, we might be able to do something.


(gdb) backtrace
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7c6b7d0 in raise () from /lib/libc.so.6
#2  0xb7c6cea3 in abort () from /lib/libc.so.6
#3  0xb7ca0f8b in __libc_message () from /lib/libc.so.6
#4  0xb7ca6911 in malloc_printerr () from /lib/libc.so.6
#5  0xb7ca7f84 in free () from /lib/libc.so.6
#6  0xb7ee2f31 in PyObject_Free (p=0x2) at Objects/obmalloc.c:798
#7  0xb7af9d97 in arraydescr_dealloc (self=0xb7b47ac0) at 
numpy/core/src/arrayobject.c:8956
#8  0xb7b12dca in array_dealloc (self=0x8714a18) at 
numpy/core/src/arrayobject.c:1477
#9  0xb7addd9f in PyUFunc_GenericReduction (self=0x80a49a0, args=0xb299152c, 
kwds=<value optimized out>, operation=2)
    at numpy/core/src/ufuncobject.c:2521
#10 0xb7edf64d in PyCFunction_Call (func=0xb2d2c82c, arg=0xb299152c, kw=0x6) 
at Objects/methodobject.c:77
#11 0xb7f1b42e in PyEval_EvalFrame (f=0x8299d24) at Python/ceval.c:3563
#12 0xb7f1c5c9 in PyEval_EvalCodeEx (co=0xb2f623a0, globals=0xb41e59bc, 
locals=0x0, args=0x812dd1c, argcount=1, kws=0x812dd20,
    kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2736
#13 0xb7f1a62b in PyEval_EvalFrame (f=0x812db8c) at Python/ceval.c:3656
#14 0xb7f1c5c9 in PyEval_EvalCodeEx (co=0xb2f414a0, globals=0xb2f3a0b4, 
locals=0x0, args=0xb2d45c78, argcount=1, kws=0x869bdf8,
    kwcount=2, defs=0xb2d148f8, defcount=8, closure=0x0) at 
Python/ceval.c:2736
#15 0xb7ecbfce in function_call (func=0xb2d148b4, arg=0xb2d45c6c, 
kw=0xb28052d4) at Objects/funcobject.c:548
#16 0xb7eb0217 in PyObject_Call (func=0x5e02, arg=0xb2d45c6c, kw=0xb28052d4) 
at Objects/abstract.c:1795
#17 0xb7eb7b05 in instancemethod_call (func=0xb427e324, arg=0xb2d45c6c, 
kw=0xb28052d4) at Objects/classobject.c:2447
#18 0xb7eb0217 in PyObject_Call (func=0x5e02, arg=0xb7c0102c, kw=0xb28052d4) 
at Objects/abstract.c:1795
#19 0xb7ef792e in slot_tp_init (self=0xb27fdbac, args=0xb7c0102c, 
kwds=0xb28052d4) at Objects/typeobject.c:4759
#20 0xb7ef0ea5 in type_call (type=<value optimized out>, args=0xb7c0102c, 
kwds=0xb28052d4) at Objects/typeobject.c:435
#21 0xb7eb0217 in PyObject_Call (func=0x5e02, arg=0xb7c0102c, kw=0xb28052d4) 
at Objects/abstract.c:1795
#22 0xb7f18b9d in PyEval_EvalFrame (f=0x849ef24) at Python/ceval.c:3771
#23 0xb7f1c5c9 in PyEval_EvalCodeEx (co=0xb2d1b0a0, globals=0xb2d12f0c, 
locals=0x0, args=0x80ab9ec, argcount=2, kws=0x80ab9f4,
    kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2736
#24 0xb7f1a62b in PyEval_EvalFrame (f=0x80ab88c) at Python/ceval.c:3656
#25 0xb7f1c5c9 in PyEval_EvalCodeEx (co=0xb7bd63e0, globals=0xb7bcd24c, 
locals=0x0, args=0xb297eee8, argcount=4, kws=0x0,
    kwcount=0, defs=0xb2d27d18, defcount=2, closure=0x0) at 
Python/ceval.c:2736
#26 0xb7ecbefa in function_call (func=0xb2d31b8c, arg=0xb297eedc, kw=0x0) at 
Objects/funcobject.c:548
#27 0xb7eb0217 in PyObject_Call (func=0x5e02, arg=0xb297eedc, kw=0x0) at 
Objects/abstract.c:1795
#28 0xb7eb7b05 in instancemethod_call (func=0xb427e2fc, arg=0xb297eedc, 
kw=0x0) at Objects/classobject.c:2447
#29 0xb7eb0217 in PyObject_Call (func=0x5e02, arg=0xb29a8d9c, kw=0x0) at 
Objects/abstract.c:1795
#30 0xb7f1591c in PyEval_CallObjectWithKeywords (func=0xb427e2fc, 
arg=0xb29a8d9c, kw=0x0) at Python/ceval.c:3430
#31 0xb3b48817 in initsip () 
from /usr/local/lib/python2.4/site-packages/sip.so
#32 0xb3c21b80 in initqt () from /usr/local/lib/python2.4/site-packages/qt.so
#33 0xb36beb5d in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#34 0xb3a0a686 in QListView::doubleClicked () from /usr/lib/libqt-mt.so.3
#35 0xb37a2908 in QListView::contentsMouseDoubleClickEvent () 
from /usr/lib/libqt-mt.so.3
#36 0xb3e10e7c in initqt () from /usr/local/lib/python2.4/site-packages/qt.so
#37 0xb37d4345 in QScrollView::viewportMouseDoubleClickEvent () 
from /usr/lib/libqt-mt.so.3
#38 0xb3e107bc in initqt () from /usr/local/lib/python2.4/site-packages/qt.so
#39 0xb37d1821 in QScrollView::eventFilter () from /usr/lib/libqt-mt.so.3
#40 0xb379fc96 in QListView::eventFilter () from /usr/lib/libqt-mt.so.3
#41 0xb3e0caab in initqt () from /usr/local/lib/python2.4/site-packages/qt.so
#42 0xb36be45c in QObject::activate_filters () from /usr/lib/libqt-mt.so.3
#43 0xb36be4cb in QObject::event () from /usr/lib/libqt-mt.so.3
#44 0xb36f74fc in QWidget::event () from /usr/lib/libqt-mt.so.3
#45 0xb365fc47 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#46 0xb3660b6b in QApplication::notify () from /usr/lib/libqt-mt.so.3
#47 0xb3fe1f05 in initqt () from /usr/local/lib/python2.4/site-packages/qt.so
#48 0xb35ffc42 in QETWidget::translateMouseEvent () 
from /usr/lib/libqt-mt.so.3
#49 0xb35fee16 in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#50 0xb360f45a in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#51 0xb3676a78 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#52 0xb367690e in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#53 0xb365f7ff in QApplication::exec () from /usr/lib/libqt-mt.so.3
#54 0xb3fdfd6e in initqt () from /usr/local/lib/python2.4/site-packages/qt.so
#55 0xb7edf67d in PyCFunction_Call (func=0xb2f42c8c, arg=0xb7c0102c, kw=0x0) 
at Objects/methodobject.c:108
#56 0xb7f1b42e in PyEval_EvalFrame (f=0x80577d4) at Python/ceval.c:3563
#57 0xb7f1c5c9 in PyEval_EvalCodeEx (co=0xb7be1360, globals=0xb7c19824, 
locals=0xb7c19824, args=0x0, argcount=0, kws=0x0,
    kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2736
#58 0xb7f1c643 in PyEval_EvalCode (co=0xb7be1360, globals=0xb7c19824, 
locals=0xb7c19824) at Python/ceval.c:484
#59 0xb7f415c7 in PyRun_FileExFlags (fp=0x804a008, filename=0xbfb61faf 
"onset_view.py", start=257, globals=0xb7c19824,
    locals=0xb7c19824, closeit=1, flags=0xbfb60814) at Python/pythonrun.c:1265
#60 0xb7f417c8 in PyRun_SimpleFileExFlags (fp=0x804a008, filename=0xbfb61faf 
"onset_view.py", closeit=1, flags=0xbfb60814)
    at Python/pythonrun.c:860
#61 0xb7f41aba in PyRun_AnyFileExFlags (fp=0x804a008, filename=0xbfb61faf 
"onset_view.py", closeit=1, flags=0xbfb60814)
    at Python/pythonrun.c:664
#62 0xb7f47f3d in Py_Main (argc=1, argv=0xbfb608e4) at Modules/main.c:493
#63 0x080485e2 in main (argc=Cannot access memory at address 0x5e02
) at Modules/python.c:23




More information about the NumPy-Discussion mailing list