Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault ufunc_object.c:1750 #2843

Closed
hankhank opened this issue Dec 16, 2012 · 9 comments
Closed

Segfault ufunc_object.c:1750 #2843

hankhank opened this issue Dec 16, 2012 · 9 comments

Comments

@hankhank
Copy link

Hi repeatedly getting a segfault in umath. Its an internal test tool that performs some analysis on PCM voice streams using scipy. I don't really know how to debug the issue but here is the information I collected from the last segfault. I can provide more info if necessary, just need to be pointed to some instructions.

Cheers,
Hank

OS: Linux localhost.localhost 2.6.18-308.16.1.el5 #1 SMP Tue Oct 2 22:01:37 EDT 2012 i686 i686 i386 GNU/Linux - CentOS release 5.8 (Final)

Python: Python2.7

Numpy:
NAME
numpy.version - # THIS FILE IS GENERATED FROM NUMPY SETUP.PY

FILE
/usr/local/lib/python2.7/site-packages/numpy/version.py

DATA
full_version = '1.6.2'
git_revision = 'ca07bce202ae26b6f0a73870eb2ef0b88e0210c5'
release = True
short_version = '1.6.2'
version = '1.6.2'

SciPy:
Help on module scipy.version in scipy:

NAME
scipy.version - # THIS FILE IS GENERATED FROM SCIPY SETUP.PY

FILE
/usr/local/lib/python2.7/site-packages/scipy/version.py

DATA
full_version = '0.11.0'
git_revision = '827679b6f0149abb2c0e121749887012946b99c3'
release = True
short_version = '0.11.0'
version = '0.11.0'

Matplotlib
version = '1.2.0'
version__numpy = '1.4'

(gdb) bt
#0  0x0047c4e3 in trivial_three_operand_loop (op=0xbfffb7b8, innerloop=0x479090 <DOUBLE_multiply>, innerloopdata=0x0)
    at numpy/core/src/umath/ufunc_object.c:1750
#1  0x004965ef in execute_ufunc_loop (self=0x83389f0, args=0x8fb9856c, kwds=0x0, op=0xbfffb7b8)
    at numpy/core/src/umath/ufunc_object.c:2071
#2  PyUFunc_GenericFunction (self=0x83389f0, args=0x8fb9856c, kwds=0x0, op=0xbfffb7b8)
    at numpy/core/src/umath/ufunc_object.c:2725
#3  0x004967e0 in ufunc_generic_call (self=0x83389f0, args=0x8fb9856c, kwds=0x0)
    at numpy/core/src/umath/ufunc_object.c:4180
#4  0x0805d015 in PyObject_Call (func=0x83389f0, arg=0x8fb9856c, kw=0x0) at Objects/abstract.c:2529
#5  0x0806029b in call_function_tail (callable=0x83389f0, format=0xb15fbe "OO") at Objects/abstract.c:2561
#6  _PyObject_CallFunction_SizeT (callable=0x83389f0, format=0xb15fbe "OO") at Objects/abstract.c:2605
#7  0x00aaebbc in PyArray_GenericBinaryFunction (m1=0x261af990, m2=0x81bdbf0)
    at numpy/core/src/multiarray/number.c:212
#8  array_multiply (m1=0x261af990, m2=0x81bdbf0) at numpy/core/src/multiarray/number.c:261
#9  0x0805d313 in binary_op1 (v=0x261af990, w=0x261af990, op_slot=8) at Objects/abstract.c:945
#10 0x08061d33 in PyNumber_Multiply (v=0x261af990, w=0x81bdbf0) at Objects/abstract.c:1216
#11 0x080d5c1e in PyEval_EvalFrameEx (f=0x9cf7ff4, throwflag=0) at Python/ceval.c:1264
#12 0x080db8e1 in PyEval_EvalCodeEx (co=0x909a458, globals=0x90f6e84, locals=0x0, args=0x9cf770c, argcount=4,
    kws=0x9cf771c, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#13 0x080d98fb in call_function (f=0x9cf754c, throwflag=0) at Python/ceval.c:4117
#14 PyEval_EvalFrameEx (f=0x9cf754c, throwflag=0) at Python/ceval.c:2666
#15 0x080db8e1 in PyEval_EvalCodeEx (co=0x90b5e78, globals=0x90f6e84, locals=0x0, args=0x9cf751c, argcount=2,
    kws=0x9cf7524, kwcount=0, defs=0x90fbd58, defcount=1, closure=0x0) at Python/ceval.c:3253
#16 0x080d98fb in call_function (f=0x9cf73bc, throwflag=0) at Python/ceval.c:4117
#17 PyEval_EvalFrameEx (f=0x9cf73bc, throwflag=0) at Python/ceval.c:2666
#18 0x080db8e1 in PyEval_EvalCodeEx (co=0x909aa88, globals=0x90f6e84, locals=0x0, args=0x8fb94058, argcount=2,
    kws=0xb7fb2038, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#19 0x08136fca in function_call (func=0x910010c, arg=0x8fb9404c, kw=0x8313a714) at Objects/funcobject.c:526
#20 0x0805d015 in PyObject_Call (func=0x910010c, arg=0x8fb9404c, kw=0x8313a714) at Objects/abstract.c:2529
#21 0x080d6d7c in ext_do_call (f=0x867cb6b4, throwflag=0) at Python/ceval.c:4334
#22 PyEval_EvalFrameEx (f=0x867cb6b4, throwflag=0) at Python/ceval.c:2705
#23 0x080db8e1 in PyEval_EvalCodeEx (co=0x8cbec38, globals=0x8cc079c, locals=0x0, args=0x9bca630, argcount=2,
    kws=0x9bca638, kwcount=0, defs=0x0, defcount=0, closure=0x90fa7fc) at Python/ceval.c:3253
#24 0x080d98fb in call_function (f=0x9bca48c, throwflag=0) at Python/ceval.c:4117
#25 PyEval_EvalFrameEx (f=0x9bca48c, throwflag=0) at Python/ceval.c:2666
#26 0x080db8e1 in PyEval_EvalCodeEx (co=0x8fb4848, globals=0x8fa5acc, locals=0x0, args=0x8fb8fbd8, argcount=2,
    kws=0xb7fb2038, kwcount=0, defs=0x916b0f8, defcount=2, closure=0x0) at Python/ceval.c:3253
#27 0x08136fca in function_call (func=0x916c614, arg=0x8fb8fbcc, kw=0x8fb928ac) at Objects/funcobject.c:526
#28 0x0805d015 in PyObject_Call (func=0x916c614, arg=0x8fb8fbcc, kw=0x8fb928ac) at Objects/abstract.c:2529
#29 0x080d6d7c in ext_do_call (f=0xa4db1a0c, throwflag=0) at Python/ceval.c:4334
#30 PyEval_EvalFrameEx (f=0xa4db1a0c, throwflag=0) at Python/ceval.c:2705
#31 0x080db8e1 in PyEval_EvalCodeEx (co=0x8cbec38, globals=0x8cc079c, locals=0x0, args=0x8fb8fd58, argcount=2,
    kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x9165b44) at Python/ceval.c:3253
#32 0x08136ef7 in function_call (func=0x916c6bc, arg=0x8fb8fd4c, kw=0x0) at Objects/funcobject.c:526
#33 0x0805d015 in PyObject_Call (func=0x916c6bc, arg=0x8fb8fd4c, kw=0x0) at Objects/abstract.c:2529
#34 0x080d6d7c in ext_do_call (f=0x9bafbc4, throwflag=0) at Python/ceval.c:4334
#35 PyEval_EvalFrameEx (f=0x9bafbc4, throwflag=0) at Python/ceval.c:2705
#36 0x080db8e1 in PyEval_EvalCodeEx (co=0x9182410, globals=0x9175714, locals=0x0, args=0x8fb8fd38, argcount=2,
    kws=0xb7fb2038, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#37 0x08136fca in function_call (func=0x91994c4, arg=0x8fb8fd2c, kw=0x8fb92714) at Objects/funcobject.c:526
#38 0x0805d015 in PyObject_Call (func=0x91994c4, arg=0x8fb8fd2c, kw=0x8fb92714) at Objects/abstract.c:2529
#39 0x080d6d7c in ext_do_call (f=0xa4d0dd64, throwflag=0) at Python/ceval.c:4334
#40 PyEval_EvalFrameEx (f=0xa4d0dd64, throwflag=0) at Python/ceval.c:2705
#41 0x080db8e1 in PyEval_EvalCodeEx (co=0x8cbec38, globals=0x8cc079c, locals=0x0, args=0x9b18858, argcount=2,
    kws=0x9b18860, kwcount=0, defs=0x0, defcount=0, closure=0x912bf7c) at Python/ceval.c:3253
#42 0x080d98fb in call_function (f=0x9b1871c, throwflag=0) at Python/ceval.c:4117
#43 PyEval_EvalFrameEx (f=0x9b1871c, throwflag=0) at Python/ceval.c:2666
#44 0x080db8e1 in PyEval_EvalCodeEx (co=0x923ea40, globals=0x922e934, locals=0x0, args=0x8fb8f798, argcount=1,
    kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#45 0x08136ef7 in function_call (func=0x92433e4, arg=0x8fb8f78c, kw=0x0) at Objects/funcobject.c:526
#46 0x0805d015 in PyObject_Call (func=0x92433e4, arg=0x8fb8f78c, kw=0x0) at Objects/abstract.c:2529
#47 0x08063e17 in instancemethod_call (func=0xac8a4b4, arg=0x8fb8f78c, kw=0x0) at Objects/classobject.c:2578
#48 0x0805d015 in PyObject_Call (func=0xac8a4b4, arg=0x8fb8f78c, kw=0x0) at Objects/abstract.c:2529
#49 0x080d4cd4 in call_function (f=0x9b17564, throwflag=0) at Python/ceval.c:4239
#50 PyEval_EvalFrameEx (f=0x9b17564, throwflag=0) at Python/ceval.c:2666
#51 0x080db8e1 in PyEval_EvalCodeEx (co=0x923ec38, globals=0x922e934, locals=0x0, args=0x8fb8aa98, argcount=2,
    kws=0x9293b38, kwcount=5, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#52 0x08136fca in function_call (func=0x9243534, arg=0x8fb8aa8c, kw=0x8fb9235c) at Objects/funcobject.c:526
#53 0x0805d015 in PyObject_Call (func=0x9243534, arg=0x8fb8aa8c, kw=0x8fb9235c) at Objects/abstract.c:2529
#54 0x080d6d7c in ext_do_call (f=0x99fc9ac, throwflag=0) at Python/ceval.c:4334
#55 PyEval_EvalFrameEx (f=0x99fc9ac, throwflag=0) at Python/ceval.c:2705
#56 0x080db8e1 in PyEval_EvalCodeEx (co=0x8eba260, globals=0x8e9f46c, locals=0x0, args=0x8fb8ab98, argcount=2,
    kws=0x1f47af08, kwcount=3, defs=0x8f9e608, defcount=5, closure=0x0) at Python/ceval.c:3253
#57 0x08136fca in function_call (func=0x8fa4454, arg=0x8fb8ab8c, kw=0x8fb910b4) at Objects/funcobject.c:526
#58 0x0805d015 in PyObject_Call (func=0x8fa4454, arg=0x8fb8ab8c, kw=0x8fb910b4) at Objects/abstract.c:2529
#59 0x080d6d7c in ext_do_call (f=0x99c3d84, throwflag=0) at Python/ceval.c:4334
#60 PyEval_EvalFrameEx (f=0x99c3d84, throwflag=0) at Python/ceval.c:2705
#61 0x080db8e1 in PyEval_EvalCodeEx (co=0x9182920, globals=0x9175714, locals=0x0, args=0x8fb810d8, argcount=2,
    kws=0xb7fb2038, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#62 0x08136fca in function_call (func=0x919980c, arg=0x8fb810cc, kw=0x51d841c4) at Objects/funcobject.c:526
#63 0x0805d015 in PyObject_Call (func=0x919980c, arg=0x8fb810cc, kw=0x51d841c4) at Objects/abstract.c:2529
#64 0x080d6d7c in ext_do_call (f=0x9ac8744, throwflag=0) at Python/ceval.c:4334
#65 PyEval_EvalFrameEx (f=0x9ac8744, throwflag=0) at Python/ceval.c:2705
#66 0x080db8e1 in PyEval_EvalCodeEx (co=0x92120b0, globals=0x922e35c, locals=0x0, args=0x99971a4, argcount=1,
    kws=0x99971a8, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#67 0x080d98fb in call_function (f=0x999703c, throwflag=0) at Python/ceval.c:4117
#68 PyEval_EvalFrameEx (f=0x999703c, throwflag=0) at Python/ceval.c:2666
#69 0x080db8e1 in PyEval_EvalCodeEx (co=0x82e04a0, globals=0x85f224c, locals=0x0, args=0xb65014e8, argcount=2,
    kws=0xb65014f0, kwcount=0, defs=0x864d4f8, defcount=1, closure=0x0) at Python/ceval.c:3253
#70 0x080d98fb in call_function (f=0xb650138c, throwflag=0) at Python/ceval.c:4117
#71 PyEval_EvalFrameEx (f=0xb650138c, throwflag=0) at Python/ceval.c:2666
#72 0x080db073 in call_function (f=0xb650121c, throwflag=0) at Python/ceval.c:4107
#73 PyEval_EvalFrameEx (f=0xb650121c, throwflag=0) at Python/ceval.c:2666
#74 0x080db8e1 in PyEval_EvalCodeEx (co=0xb7f5e3c8, globals=0xb7fe235c, locals=0x0, args=0x15d35c4c, argcount=3,
    kws=0x15d35c58, kwcount=0, defs=0x92ad4f8, defcount=1, closure=0x0) at Python/ceval.c:3253
#75 0x080d98fb in call_function (f=0x15d35b0c, throwflag=0) at Python/ceval.c:4117
#76 PyEval_EvalFrameEx (f=0x15d35b0c, throwflag=0) at Python/ceval.c:2666
#77 0x080db073 in call_function (f=0x96002b4, throwflag=0) at Python/ceval.c:4107
#78 PyEval_EvalFrameEx (f=0x96002b4, throwflag=0) at Python/ceval.c:2666
#79 0x080db073 in call_function (f=0x9308c0c, throwflag=0) at Python/ceval.c:4107
#80 PyEval_EvalFrameEx (f=0x9308c0c, throwflag=0) at Python/ceval.c:2666
#81 0x080db073 in call_function (f=0x9308ab4, throwflag=0) at Python/ceval.c:4107
#82 PyEval_EvalFrameEx (f=0x9308ab4, throwflag=0) at Python/ceval.c:2666
#83 0x080db073 in call_function (f=0x8279f2c, throwflag=0) at Python/ceval.c:4107
#84 PyEval_EvalFrameEx (f=0x8279f2c, throwflag=0) at Python/ceval.c:2666
#85 0x080db8e1 in PyEval_EvalCodeEx (co=0xb7f5ed58, globals=0xb7fe235c, locals=0xb7fe235c, args=0x0, argcount=0,
    kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#86 0x080db987 in PyEval_EvalCode (co=0xb7f5ed58, globals=0xb7fe235c, locals=0xb7fe235c) at Python/ceval.c:667
#87 0x080fb3dc in run_mod (fp=0x81ccb38, filename=0xbfffeb7d "voicetest.py", start=257, globals=0xb7fe235c,
    locals=0xb7fe235c, closeit=1, flags=0xbfffe978) at Python/pythonrun.c:1353
#88 PyRun_FileExFlags (fp=0x81ccb38, filename=0xbfffeb7d "voicetest.py", start=257, globals=0xb7fe235c,
    locals=0xb7fe235c, closeit=1, flags=0xbfffe978) at Python/pythonrun.c:1339
#89 0x080fb6c9 in PyRun_SimpleFileExFlags (fp=0x81ccb38, filename=0xbfffeb7d "voicetest.py", closeit=1,
    flags=0xbfffe978) at Python/pythonrun.c:943
#90 0x080592c0 in Py_Main (argc=2, argv=0xbfffea44) at Modules/main.c:639
#91 0x08058412 in main (argc=164270992, argv=0x0) at ./Modules/python.c:23
(gdb)
@njsmith
Copy link
Member

njsmith commented Dec 16, 2012

Hard to say much from the back trace... Can you provide a minimal failing
example that we could run?
On 16 Dec 2012 22:37, "hankhank" notifications@github.com wrote:

Hi repeatedly getting a segfault in umath. Its an internal test tool that
performs some analysis on PCM voice streams using scipy. I don't really
know how to debug the issue but here is the information I collected from
the last segfault. I can provide more info if necessary, just need to be
pointed to some instructions.

Cheers,
Hank

OS: Linux localhost.localhost 2.6.18-308.16.1.el5 #1https://github.com/numpy/numpy/issues/1SMP Tue Oct 2 22:01:37 EDT 2012 i686 i686 i386 GNU/Linux - CentOS release
5.8 (Final)

Python: Python2.7

Numpy:
NAME
numpy.version - # THIS FILE IS GENERATED FROM NUMPY SETUP.PY

FILE
/usr/local/lib/python2.7/site-packages/numpy/version.py

DATA
full_version = '1.6.2'
git_revision = 'ca07bce202ae26b6f0a73870eb2ef0b88e0210c5'
release = True
short_version = '1.6.2'
version = '1.6.2'

SciPy:
Help on module scipy.version in scipy:

NAME
scipy.version - # THIS FILE IS GENERATED FROM SCIPY SETUP.PY

FILE
/usr/local/lib/python2.7/site-packages/scipy/version.py

DATA
full_version = '0.11.0'
git_revision = '827679b6f0149abb2c0e121749887012946b99c3'
release = True
short_version = '0.11.0'
version = '0.11.0'

Matplotlib
version = '1.2.0'
version_numpy_ = '1.4'

(gdb) bt
#0 0x0047c4e3 in trivial_three_operand_loop (op=0xbfffb7b8, innerloop=0x479090 <DOUBLE_multiply>, innerloopdata=0x0)
at numpy/core/src/umath/ufunc_object.c:1750
#1 0x004965ef in execute_ufunc_loop (self=0x83389f0, args=0x8fb9856c, kwds=0x0, op=0xbfffb7b8)
at numpy/core/src/umath/ufunc_object.c:2071
#2 PyUFunc_GenericFunction (self=0x83389f0, args=0x8fb9856c, kwds=0x0, op=0xbfffb7b8)
at numpy/core/src/umath/ufunc_object.c:2725
#3 0x004967e0 in ufunc_generic_call (self=0x83389f0, args=0x8fb9856c, kwds=0x0)
at numpy/core/src/umath/ufunc_object.c:4180
#4 0x0805d015 in PyObject_Call (func=0x83389f0, arg=0x8fb9856c, kw=0x0) at Objects/abstract.c:2529
#5 0x0806029b in call_function_tail (callable=0x83389f0, format=0xb15fbe "OO") at Objects/abstract.c:2561
#6 _PyObject_CallFunction_SizeT (callable=0x83389f0, format=0xb15fbe "OO") at Objects/abstract.c:2605
#7 0x00aaebbc in PyArray_GenericBinaryFunction (m1=0x261af990, m2=0x81bdbf0)
at numpy/core/src/multiarray/number.c:212
#8 array_multiply (m1=0x261af990, m2=0x81bdbf0) at numpy/core/src/multiarray/number.c:261
#9 0x0805d313 in binary_op1 (v=0x261af990, w=0x261af990, op_slot=8) at Objects/abstract.c:945
#10 0x08061d33 in PyNumber_Multiply (v=0x261af990, w=0x81bdbf0) at Objects/abstract.c:1216
#11 0x080d5c1e in PyEval_EvalFrameEx (f=0x9cf7ff4, throwflag=0) at Python/ceval.c:1264
#12 0x080db8e1 in PyEval_EvalCodeEx (co=0x909a458, globals=0x90f6e84, locals=0x0, args=0x9cf770c, argcount=4,
kws=0x9cf771c, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#13 0x080d98fb in call_function (f=0x9cf754c, throwflag=0) at Python/ceval.c:4117
#14 PyEval_EvalFrameEx (f=0x9cf754c, throwflag=0) at Python/ceval.c:2666
#15 0x080db8e1 in PyEval_EvalCodeEx (co=0x90b5e78, globals=0x90f6e84, locals=0x0, args=0x9cf751c, argcount=2,
kws=0x9cf7524, kwcount=0, defs=0x90fbd58, defcount=1, closure=0x0) at Python/ceval.c:3253
#16 0x080d98fb in call_function (f=0x9cf73bc, throwflag=0) at Python/ceval.c:4117
#17 PyEval_EvalFrameEx (f=0x9cf73bc, throwflag=0) at Python/ceval.c:2666
#18 0x080db8e1 in PyEval_EvalCodeEx (co=0x909aa88, globals=0x90f6e84, locals=0x0, args=0x8fb94058, argcount=2,
kws=0xb7fb2038, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#19 0x08136fca in function_call (func=0x910010c, arg=0x8fb9404c, kw=0x8313a714) at Objects/funcobject.c:526
#20 0x0805d015 in PyObject_Call (func=0x910010c, arg=0x8fb9404c, kw=0x8313a714) at Objects/abstract.c:2529
#21 0x080d6d7c in ext_do_call (f=0x867cb6b4, throwflag=0) at Python/ceval.c:4334
#22 PyEval_EvalFrameEx (f=0x867cb6b4, throwflag=0) at Python/ceval.c:2705
#23 0x080db8e1 in PyEval_EvalCodeEx (co=0x8cbec38, globals=0x8cc079c, locals=0x0, args=0x9bca630, argcount=2,
kws=0x9bca638, kwcount=0, defs=0x0, defcount=0, closure=0x90fa7fc) at Python/ceval.c:3253
#24 0x080d98fb in call_function (f=0x9bca48c, throwflag=0) at Python/ceval.c:4117
#25 PyEval_EvalFrameEx (f=0x9bca48c, throwflag=0) at Python/ceval.c:2666
#26 0x080db8e1 in PyEval_EvalCodeEx (co=0x8fb4848, globals=0x8fa5acc, locals=0x0, args=0x8fb8fbd8, argcount=2,
kws=0xb7fb2038, kwcount=0, defs=0x916b0f8, defcount=2, closure=0x0) at Python/ceval.c:3253
#27 0x08136fca in function_call (func=0x916c614, arg=0x8fb8fbcc, kw=0x8fb928ac) at Objects/funcobject.c:526
#28 0x0805d015 in PyObject_Call (func=0x916c614, arg=0x8fb8fbcc, kw=0x8fb928ac) at Objects/abstract.c:2529
#29 0x080d6d7c in ext_do_call (f=0xa4db1a0c, throwflag=0) at Python/ceval.c:4334
#30 PyEval_EvalFrameEx (f=0xa4db1a0c, throwflag=0) at Python/ceval.c:2705
#31 0x080db8e1 in PyEval_EvalCodeEx (co=0x8cbec38, globals=0x8cc079c, locals=0x0, args=0x8fb8fd58, argcount=2,
kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x9165b44) at Python/ceval.c:3253
#32 0x08136ef7 in function_call (func=0x916c6bc, arg=0x8fb8fd4c, kw=0x0) at Objects/funcobject.c:526
#33 0x0805d015 in PyObject_Call (func=0x916c6bc, arg=0x8fb8fd4c, kw=0x0) at Objects/abstract.c:2529
#34 0x080d6d7c in ext_do_call (f=0x9bafbc4, throwflag=0) at Python/ceval.c:4334
#35 PyEval_EvalFrameEx (f=0x9bafbc4, throwflag=0) at Python/ceval.c:2705
#36 0x080db8e1 in PyEval_EvalCodeEx (co=0x9182410, globals=0x9175714, locals=0x0, args=0x8fb8fd38, argcount=2,
kws=0xb7fb2038, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#37 0x08136fca in function_call (func=0x91994c4, arg=0x8fb8fd2c, kw=0x8fb92714) at Objects/funcobject.c:526
#38 0x0805d015 in PyObject_Call (func=0x91994c4, arg=0x8fb8fd2c, kw=0x8fb92714) at Objects/abstract.c:2529
#39 0x080d6d7c in ext_do_call (f=0xa4d0dd64, throwflag=0) at Python/ceval.c:4334
#40 PyEval_EvalFrameEx (f=0xa4d0dd64, throwflag=0) at Python/ceval.c:2705
#41 0x080db8e1 in PyEval_EvalCodeEx (co=0x8cbec38, globals=0x8cc079c, locals=0x0, args=0x9b18858, argcount=2,
kws=0x9b18860, kwcount=0, defs=0x0, defcount=0, closure=0x912bf7c) at Python/ceval.c:3253
#42 0x080d98fb in call_function (f=0x9b1871c, throwflag=0) at Python/ceval.c:4117
#43 PyEval_EvalFrameEx (f=0x9b1871c, throwflag=0) at Python/ceval.c:2666
#44 0x080db8e1 in PyEval_EvalCodeEx (co=0x923ea40, globals=0x922e934, locals=0x0, args=0x8fb8f798, argcount=1,
kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#45 0x08136ef7 in function_call (func=0x92433e4, arg=0x8fb8f78c, kw=0x0) at Objects/funcobject.c:526
#46 0x0805d015 in PyObject_Call (func=0x92433e4, arg=0x8fb8f78c, kw=0x0) at Objects/abstract.c:2529
#47 0x08063e17 in instancemethod_call (func=0xac8a4b4, arg=0x8fb8f78c, kw=0x0) at Objects/classobject.c:2578
#48 0x0805d015 in PyObject_Call (func=0xac8a4b4, arg=0x8fb8f78c, kw=0x0) at Objects/abstract.c:2529
#49 0x080d4cd4 in call_function (f=0x9b17564, throwflag=0) at Python/ceval.c:4239
#50 PyEval_EvalFrameEx (f=0x9b17564, throwflag=0) at Python/ceval.c:2666
#51 0x080db8e1 in PyEval_EvalCodeEx (co=0x923ec38, globals=0x922e934, locals=0x0, args=0x8fb8aa98, argcount=2,
kws=0x9293b38, kwcount=5, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#52 0x08136fca in function_call (func=0x9243534, arg=0x8fb8aa8c, kw=0x8fb9235c) at Objects/funcobject.c:526
#53 0x0805d015 in PyObject_Call (func=0x9243534, arg=0x8fb8aa8c, kw=0x8fb9235c) at Objects/abstract.c:2529
#54 0x080d6d7c in ext_do_call (f=0x99fc9ac, throwflag=0) at Python/ceval.c:4334
#55 PyEval_EvalFrameEx (f=0x99fc9ac, throwflag=0) at Python/ceval.c:2705
#56 0x080db8e1 in PyEval_EvalCodeEx (co=0x8eba260, globals=0x8e9f46c, locals=0x0, args=0x8fb8ab98, argcount=2,
kws=0x1f47af08, kwcount=3, defs=0x8f9e608, defcount=5, closure=0x0) at Python/ceval.c:3253
#57 0x08136fca in function_call (func=0x8fa4454, arg=0x8fb8ab8c, kw=0x8fb910b4) at Objects/funcobject.c:526
#58 0x0805d015 in PyObject_Call (func=0x8fa4454, arg=0x8fb8ab8c, kw=0x8fb910b4) at Objects/abstract.c:2529
#59 0x080d6d7c in ext_do_call (f=0x99c3d84, throwflag=0) at Python/ceval.c:4334
#60 PyEval_EvalFrameEx (f=0x99c3d84, throwflag=0) at Python/ceval.c:2705
#61 0x080db8e1 in PyEval_EvalCodeEx (co=0x9182920, globals=0x9175714, locals=0x0, args=0x8fb810d8, argcount=2,
kws=0xb7fb2038, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#62 0x08136fca in function_call (func=0x919980c, arg=0x8fb810cc, kw=0x51d841c4) at Objects/funcobject.c:526
#63 0x0805d015 in PyObject_Call (func=0x919980c, arg=0x8fb810cc, kw=0x51d841c4) at Objects/abstract.c:2529
#64 0x080d6d7c in ext_do_call (f=0x9ac8744, throwflag=0) at Python/ceval.c:4334
#65 PyEval_EvalFrameEx (f=0x9ac8744, throwflag=0) at Python/ceval.c:2705
#66 0x080db8e1 in PyEval_EvalCodeEx (co=0x92120b0, globals=0x922e35c, locals=0x0, args=0x99971a4, argcount=1,
kws=0x99971a8, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#67 0x080d98fb in call_function (f=0x999703c, throwflag=0) at Python/ceval.c:4117
#68 PyEval_EvalFrameEx (f=0x999703c, throwflag=0) at Python/ceval.c:2666
#69 0x080db8e1 in PyEval_EvalCodeEx (co=0x82e04a0, globals=0x85f224c, locals=0x0, args=0xb65014e8, argcount=2,
kws=0xb65014f0, kwcount=0, defs=0x864d4f8, defcount=1, closure=0x0) at Python/ceval.c:3253
#70 0x080d98fb in call_function (f=0xb650138c, throwflag=0) at Python/ceval.c:4117
#71 PyEval_EvalFrameEx (f=0xb650138c, throwflag=0) at Python/ceval.c:2666
#72 0x080db073 in call_function (f=0xb650121c, throwflag=0) at Python/ceval.c:4107
#73 PyEval_EvalFrameEx (f=0xb650121c, throwflag=0) at Python/ceval.c:2666
#74 0x080db8e1 in PyEval_EvalCodeEx (co=0xb7f5e3c8, globals=0xb7fe235c, locals=0x0, args=0x15d35c4c, argcount=3,
kws=0x15d35c58, kwcount=0, defs=0x92ad4f8, defcount=1, closure=0x0) at Python/ceval.c:3253
#75 0x080d98fb in call_function (f=0x15d35b0c, throwflag=0) at Python/ceval.c:4117
#76 PyEval_EvalFrameEx (f=0x15d35b0c, throwflag=0) at Python/ceval.c:2666
#77 0x080db073 in call_function (f=0x96002b4, throwflag=0) at Python/ceval.c:4107
#78 PyEval_EvalFrameEx (f=0x96002b4, throwflag=0) at Python/ceval.c:2666
#79 0x080db073 in call_function (f=0x9308c0c, throwflag=0) at Python/ceval.c:4107
#80 PyEval_EvalFrameEx (f=0x9308c0c, throwflag=0) at Python/ceval.c:2666
#81 0x080db073 in call_function (f=0x9308ab4, throwflag=0) at Python/ceval.c:4107
#82 PyEval_EvalFrameEx (f=0x9308ab4, throwflag=0) at Python/ceval.c:2666
#83 0x080db073 in call_function (f=0x8279f2c, throwflag=0) at Python/ceval.c:4107
#84 PyEval_EvalFrameEx (f=0x8279f2c, throwflag=0) at Python/ceval.c:2666
#85 0x080db8e1 in PyEval_EvalCodeEx (co=0xb7f5ed58, globals=0xb7fe235c, locals=0xb7fe235c, args=0x0, argcount=0,
kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#86 0x080db987 in PyEval_EvalCode (co=0xb7f5ed58, globals=0xb7fe235c, locals=0xb7fe235c) at Python/ceval.c:667
#87 0x080fb3dc in run_mod (fp=0x81ccb38, filename=0xbfffeb7d "voicetest.py", start=257, globals=0xb7fe235c,
locals=0xb7fe235c, closeit=1, flags=0xbfffe978) at Python/pythonrun.c:1353
#88 PyRun_FileExFlags (fp=0x81ccb38, filename=0xbfffeb7d "voicetest.py", start=257, globals=0xb7fe235c,
locals=0xb7fe235c, closeit=1, flags=0xbfffe978) at Python/pythonrun.c:1339
#89 0x080fb6c9 in PyRun_SimpleFileExFlags (fp=0x81ccb38, filename=0xbfffeb7d "voicetest.py", closeit=1,
flags=0xbfffe978) at Python/pythonrun.c:943
#90 0x080592c0 in Py_Main (argc=2, argv=0xbfffea44) at Modules/main.c:639
#91 0x08058412 in main (argc=164270992, argv=0x0) at ./Modules/python.c:23
(gdb)


Reply to this email directly or view it on GitHubhttps://github.com//issues/2843.

@hankhank
Copy link
Author

I don't really know exactly where it is segfaulting in my python scripts. After it has segfaulted is there a way to find out where it is failing in my script? Like a line number/file?

@hankhank
Copy link
Author

Ok figured out how to get line numbers and files in versions of gdb < 7.0 which already has support for this

x/s ((PyStringObject*)f->f_code->co_filename)->ob_sval
p f->f_lineno

@hankhank
Copy link
Author

Hmmm... Think it might be a thread safety issue in matplotlib - Can I safely assume that matplotlib is thread safe?

@hankhank
Copy link
Author

Ok I've put together a "stack trace" - I manually extracted all the files and function calls and have split them into the gdb part of the stack trace and the python extracted section. Unfortunately it doesn't give the exact line just the start of the function.

I also tried writing something to reproduce the issue but I can't seem to come up with anything. It looks as though its a problem with writing matplotlib plots to disk. It seems to be an issue after about 2000+ plots.

I have also previously had problems with 'too many files open' using matplotlib - see bug matplotlib/matplotlib#1466 -This was solved by increasing the number of files a user can have open to 200000.

C Calls

#0  0x0047c4e3 in trivial_three_operand_loop (op=0xbfffb7b8, innerloop=0x479090 <DOUBLE_multiply>, innerloopdata=0x0)
    at numpy/core/src/umath/ufunc_object.c:1750
#1  0x004965ef in execute_ufunc_loop (self=0x83389f0, args=0x8fb9856c, kwds=0x0, op=0xbfffb7b8)
    at numpy/core/src/umath/ufunc_object.c:2071
#2  PyUFunc_GenericFunction (self=0x83389f0, args=0x8fb9856c, kwds=0x0, op=0xbfffb7b8)
    at numpy/core/src/umath/ufunc_object.c:2725
#3  0x004967e0 in ufunc_generic_call (self=0x83389f0, args=0x8fb9856c, kwds=0x0)
    at numpy/core/src/umath/ufunc_object.c:4180
#4  0x0805d015 in PyObject_Call (func=0x83389f0, arg=0x8fb9856c, kw=0x0) at Objects/abstract.c:2529
#5  0x0806029b in call_function_tail (callable=0x83389f0, format=0xb15fbe "OO") at Objects/abstract.c:2561
#6  _PyObject_CallFunction_SizeT (callable=0x83389f0, format=0xb15fbe "OO") at Objects/abstract.c:2605
#7  0x00aaebbc in PyArray_GenericBinaryFunction (m1=0x261af990, m2=0x81bdbf0)
    at numpy/core/src/multiarray/number.c:212
#8  array_multiply (m1=0x261af990, m2=0x81bdbf0) at numpy/core/src/multiarray/number.c:261
#9  0x0805d313 in binary_op1 (v=0x261af990, w=0x261af990, op_slot=8) at Objects/abstract.c:945
#10 0x08061d33 in PyNumber_Multiply (v=0x261af990, w=0x81bdbf0) at Objects/abstract.c:1216

Python calls

/usr/local/lib/python2.7/site-packages/matplotlib/image.py:139
/usr/local/lib/python2.7/site-packages/matplotlib/image.py:562
/usr/local/lib/python2.7/site-packages/matplotlib/image.py:341
/usr/local/lib/python2.7/site-packages/matplotlib/artist.py:52
/usr/local/lib/python2.7/site-packages/matplotlib/axes.py:1972
/usr/local/lib/python2.7/site-packages/matplotlib/artist.py:52
/usr/local/lib/python2.7/site-packages/matplotlib/figure.py:921
/usr/local/lib/python2.7/site-packages/matplotlib/artist.py:52
/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py:428
/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py":490
/usr/local/lib/python2.7/site-packages/matplotlib/backend_bases.py:1957
/usr/local/lib/python2.7/site-packages/matplotlib/figure.py:1274
/usr/local/lib/python2.7/site-packages/matplotlib/pyplot.py:469
voicetest.py:634

@njsmith
Copy link
Member

njsmith commented Dec 19, 2012

Not sure what to tell you, but you might try asking the matplotlib folks?
They may have more of an idea how to track this down (and, frankly, have
more developer person-power to start with).

On Wed, Dec 19, 2012 at 12:16 AM, hankhank notifications@github.com wrote:

Ok I've put together a "stack trace" - I manually extracted all the files
and function calls and have split them into the gdb part of the stack trace
and the python extracted section. Unfortunately it doesn't give the exact
line just the start of the function.

I also tried writing something to reproduce the issue but I can't seem to
come up with anything. It looks as though its a problem with writing
matplotlib plots to disk. It seems to be an issue after about 2000+ plots.

I have also previously had problems with 'too many files open' using
matplotlib - see bug matplotlib/matplotlib#1466matplotlib/matplotlib#1466 was solved by increasing the number of files a user can have open to
200000.

C Calls

#0 0x0047c4e3 in trivial_three_operand_loop (op=0xbfffb7b8, innerloop=0x479090 <DOUBLE_multiply>, innerloopdata=0x0)
at numpy/core/src/umath/ufunc_object.c:1750
#1 0x004965ef in execute_ufunc_loop (self=0x83389f0, args=0x8fb9856c, kwds=0x0, op=0xbfffb7b8)
at numpy/core/src/umath/ufunc_object.c:2071
#2 PyUFunc_GenericFunction (self=0x83389f0, args=0x8fb9856c, kwds=0x0, op=0xbfffb7b8)
at numpy/core/src/umath/ufunc_object.c:2725
#3 0x004967e0 in ufunc_generic_call (self=0x83389f0, args=0x8fb9856c, kwds=0x0)
at numpy/core/src/umath/ufunc_object.c:4180
#4 0x0805d015 in PyObject_Call (func=0x83389f0, arg=0x8fb9856c, kw=0x0) at Objects/abstract.c:2529
#5 0x0806029b in call_function_tail (callable=0x83389f0, format=0xb15fbe "OO") at Objects/abstract.c:2561
#6 _PyObject_CallFunction_SizeT (callable=0x83389f0, format=0xb15fbe "OO") at Objects/abstract.c:2605
#7 0x00aaebbc in PyArray_GenericBinaryFunction (m1=0x261af990, m2=0x81bdbf0)
at numpy/core/src/multiarray/number.c:212
#8 array_multiply (m1=0x261af990, m2=0x81bdbf0) at numpy/core/src/multiarray/number.c:261
#9 0x0805d313 in binary_op1 (v=0x261af990, w=0x261af990, op_slot=8) at Objects/abstract.c:945
#10 0x08061d33 in PyNumber_Multiply (v=0x261af990, w=0x81bdbf0) at Objects/abstract.c:1216

Python calls

/usr/local/lib/python2.7/site-packages/matplotlib/image.py:139
/usr/local/lib/python2.7/site-packages/matplotlib/image.py:562
/usr/local/lib/python2.7/site-packages/matplotlib/image.py:341
/usr/local/lib/python2.7/site-packages/matplotlib/artist.py:52
/usr/local/lib/python2.7/site-packages/matplotlib/axes.py:1972
/usr/local/lib/python2.7/site-packages/matplotlib/artist.py:52
/usr/local/lib/python2.7/site-packages/matplotlib/figure.py:921
/usr/local/lib/python2.7/site-packages/matplotlib/artist.py:52
/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py:428
/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py":490
/usr/local/lib/python2.7/site-packages/matplotlib/backend_bases.py:1957
/usr/local/lib/python2.7/site-packages/matplotlib/figure.py:1274
/usr/local/lib/python2.7/site-packages/matplotlib/pyplot.py:469
voicetest.py:634


Reply to this email directly or view it on GitHubhttps://github.com//issues/2843#issuecomment-11511996.

@mdboom
Copy link
Contributor

mdboom commented Dec 20, 2012

@njsmith: We're happy to have a look over at matplotlib. I didn't realise numpy was having a problem with developer person-power. I always look from afar and am amazed at the productivity over here ;)

@njsmith
Copy link
Member

njsmith commented Dec 20, 2012

Oh, well, it may just be a grass-looks-greener thing :-).

On Thu, Dec 20, 2012 at 1:20 PM, Michael Droettboom <
notifications@github.com> wrote:

@njsmith https://github.com/njsmith: We're happy to have a look over at
matplotlib. I didn't realise numpy was having a problem with developer
person-power. I always look from afar and amazing at the productivity over
here ;)


Reply to this email directly or view it on GitHubhttps://github.com//issues/2843#issuecomment-11573120.

@njsmith
Copy link
Member

njsmith commented Dec 20, 2012

(Closing this for now so it doesn't clutter up the issue list, feel free to re-open if you get more information pointing at numpy or just want to poke us again :-).)

@njsmith njsmith closed this as completed Dec 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants