Skip to content

segfault in any() on large object array (Trac #1522) #2119

Closed
@thouis

Description

@thouis

Original ticket http://projects.scipy.org/numpy/ticket/1522 on 2010-06-27 by trac user glub, assigned to unknown.

I am consistently getting segfaults when I call any() on a particular array of 42364 elements. I will try to attach the array as a text file. There doesn't appear to be anything interesting about the array except that it does not have any zeros and appears to have a lot of smallish, duplicate values. I got the same segfault in 1.3.0, 1.4.1, and r8464 from svn:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff03eac2f in PyUFunc_Reduce (self=, args=, kwds=, operation=)
at numpy/core/src/umath/ufunc_object.c:2785
2785 Py_XINCREF(((PyObject *)loop->castbuf));
(gdb) bt
#0 0x00007ffff03eac2f in PyUFunc_Reduce (self=, args=, kwds=, operation=)

at numpy/core/src/umath/ufunc_object.c:2785

#1 PyUFunc_GenericReduction (self=, args=, kwds=, operation=)

at numpy/core/src/umath/ufunc_object.c:3352

#2 0x00000035d1043db3 in PyObject_Call () from /usr/lib64/libpython2.6.so.1.0
#3 0x00007ffff065ecbe in PyArray_GenericReduceFunction (m1=, op=, axis=, rtype=, out=0x0)

at numpy/core/src/multiarray/number.c:173

#4 0x00007ffff0682aab in PyArray_Any (self=, axis=0, out=0x0) at numpy/core/src/multiarray/calculation.c:697
#5 0x00007ffff0682b5e in array_any (self=0xd6ae90, args=, kwds=) at numpy/core/src/multiarray/methods.c:1825
#6 0x00000035d10ddae6 in PyEval_EvalFrameEx () from /usr/lib64/libpython2.6.so.1.0
#7 0x00000035d10de312 in PyEval_EvalFrameEx () from /usr/lib64/libpython2.6.so.1.0
#8 0x00000035d10df4e9 in PyEval_EvalCodeEx () from /usr/lib64/libpython2.6.so.1.0
#9 0x00000035d10dd897 in PyEval_EvalFrameEx () from /usr/lib64/libpython2.6.so.1.0
#10 0x00000035d10de312 in PyEval_EvalFrameEx () from /usr/lib64/libpython2.6.so.1.0
#11 0x00000035d10de312 in PyEval_EvalFrameEx () from /usr/lib64/libpython2.6.so.1.0
#12 0x00000035d10df4e9 in PyEval_EvalCodeEx () from /usr/lib64/libpython2.6.so.1.0
#13 0x00000035d10df5b2 in PyEval_EvalCode () from /usr/lib64/libpython2.6.so.1.0
#14 0x00000035d10fa52c in ?? () from /usr/lib64/libpython2.6.so.1.0
#15 0x00000035d10fa600 in PyRun_FileExFlags () from /usr/lib64/libpython2.6.so.1.0
#16 0x00000035d10fb9dc in PyRun_SimpleFileExFlags () from /usr/lib64/libpython2.6.so.1.0
#17 0x00000035d110807d in Py_Main () from /usr/lib64/libpython2.6.so.1.0
#18 0x00000034b341ec5d in __libc_start_main () from /lib64/libc.so.6
#19 0x0000000000400649 in _start ()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions