[Numpy-discussion] Segmentation fault with argsort

Skipper Seabold jsseabold@gmail....
Fri Dec 18 12:10:41 CST 2009


On Fri, Dec 18, 2009 at 1:07 PM, Skipper Seabold <jsseabold@gmail.com> wrote:
> On Fri, Dec 18, 2009 at 1:00 PM, Robert Kern <robert.kern@gmail.com> wrote:
>>
>> Can you give us a gdb backtrace?
>>
>
> No idea what I'm doing, but I figure I should learn a bit...  Does
> this look right?
>
> skipper@linux-desktop:~$ gdb python
> GNU gdb (GDB) 7.0-ubuntu
> Copyright (C) 2009 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from /usr/bin/python...Reading symbols from
> /usr/lib/debug/usr/bin/python2.6...done.
> (no debugging symbols found)...done.
> (gdb) run argsort_seg.py
> Starting program: /usr/bin/python argsort_seg.py
> [Thread debugging using libthread_db enabled]
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00000000004b499a in _PyArg_ParseTupleAndKeywords_SizeT
> (args=0x7ffff7f54ad0, keywords=0x7ffff6d89eb0,
>    format=0x7ffff6d9308d "|O&O&O", kwlist=0x7ffff6faa5a0) at
> ../Python/getargs.c:1409
> 1409    ../Python/getargs.c: No such file or directory.
>        in ../Python/getargs.c
> (gdb)
>
 And ....

(gdb) backtrace
#0  0x00000000004b499a in _PyArg_ParseTupleAndKeywords_SizeT
(args=0x7ffff7f54ad0,
    keywords=0x7ffff6d89eb0, format=0x7ffff6d9308d "|O&O&O",
kwlist=0x7ffff6faa5a0)
    at ../Python/getargs.c:1409
#1  0x00007ffff6d7a08a in array_argsort (self=0xaf9af0,
args=0x7ffff7f54ad0, kwds=0x7ffff6d89eb0)
    at numpy/core/src/multiarray/methods.c:1063
#2  0x000000000041d6e7 in PyObject_Call (func=0x7ffff46cd950,
arg=0x7ffff6d89eb0, kw=0x7ffff6d9308d)
    at ../Objects/abstract.c:2492
#3  0x00007ffff6d89952 in gentype_generic_method (self=<value
optimized out>, args=0x7ffff7f54ad0,
    kwds=0x7ffff6d89eb0, str=<value optimized out>) at
numpy/core/src/multiarray/scalartypes.c.src:201
#4  0x00000000004a290d in call_function (f=0x90ed90, throwflag=<value
optimized out>)
    at ../Python/ceval.c:3706
#5  PyEval_EvalFrameEx (f=0x90ed90, throwflag=<value optimized out>)
at ../Python/ceval.c:2389
#6  0x00000000004a40e0 in PyEval_EvalCodeEx (co=0x7ffff7ef0eb8,
globals=<value optimized out>,
    locals=<value optimized out>, args=0x0, argcount=<value optimized
out>, kws=<value optimized out>,
    kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:2968
#7  0x00000000004a41b2 in PyEval_EvalCode (co=0x7ffff7f54ad0,
globals=0x7ffff6d89eb0,
    locals=0x7ffff6d9308d) at ../Python/ceval.c:522
#8  0x00000000004c33a0 in run_mod (fp=0x90e230, filename=<value optimized out>,
    start=<value optimized out>, globals=<value optimized out>,
locals=0x8b9270, closeit=1,
    flags=0x7fffffffe130) at ../Python/pythonrun.c:1335
#9  PyRun_FileExFlags (fp=0x90e230, filename=<value optimized out>,
start=<value optimized out>,
    globals=<value optimized out>, locals=0x8b9270, closeit=1,
flags=0x7fffffffe130)
    at ../Python/pythonrun.c:1321
#10 0x00000000004c3564 in PyRun_SimpleFileExFlags (fp=<value optimized out>,
    filename=0x7fffffffe542 "argsort_seg.py", closeit=1, flags=0x7fffffffe130)
    at ../Python/pythonrun.c:931
#11 0x0000000000418ab7 in Py_Main (argc=-135384960, argv=<value
optimized out>) at ../Modules/main.c:599
---Type <return> to continue, or q <return> to quit---
#12 0x00007ffff6fd0abd in __libc_start_main (main=<value optimized
out>, argc=<value optimized out>,
    ubp_av=<value optimized out>, init=<value optimized out>,
fini=<value optimized out>,
    rtld_fini=<value optimized out>, stack_end=0x7fffffffe248) at
libc-start.c:220
#13 0x0000000000417ca9 in _start () at ../sysdeps/x86_64/elf/start.S:113


More information about the NumPy-Discussion mailing list