This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
GDB crashing because of Python
- From: Kevin Pouget <kevin dot pouget at gmail dot com>
- To: gdb at sourceware dot org
- Date: Thu, 23 Aug 2012 15:21:13 +0200
- Subject: GDB crashing because of Python
Hello,
I notice today a lot for GDB crash because of Python, am I the only one?
(I didn't refresh my git tree since a while, so it might not be
directly related to the last Python patches)
It's hard to tell exactly what cause it, but for instance I see repeatedly:
> SystemError: /builddir/build/BUILD/Python-2.7.3/Objects/listobject.c:178: bad argument to internal function
This one aborts() GDB
> Fatal Python error: GC object already tracked
from
> #2 0x0000003f2c4f7b3e in Py_FatalError (msg=msg@entry=
> 0x3f2c520ae8 "GC object already tracked")
> at /usr/src/debug/Python-2.7.3/Python/pythonrun.c:1685
> #3 0x0000003f2c4739cb in PyList_New (size=size@entry=0)
> at /usr/src/debug/Python-2.7.3/Objects/listobject.c:170
> #4 0x0000003f2c4f58a5 in PyArena_New ()
> at /usr/src/debug/Python-2.7.3/Python/pyarena.c:143
> #5 0x0000003f2c4f793a in PyRun_FileExFlags (...)
and this one raises a segfault:
> Program received signal SIGSEGV, Segmentation fault.
> PyObject_Malloc (nbytes=32)
> at /usr/src/debug/Python-2.7.3/Objects/obmalloc.c:784
> 784 if ((pool->freeblock = *(block **)bp) != NULL) {
from:
> #0 PyObject_Malloc (nbytes=32)
> at /usr/src/debug/Python-2.7.3/Objects/obmalloc.c:784
> #1 0x0000003f2c475291 in _PyLong_New (size=1)
> at /usr/src/debug/Python-2.7.3/Objects/longobject.c:76
> #2 0x0000003f2c479e9f in PyLong_FromUnsignedLongLong (
> ival=ival@entry=135084326)
> at /usr/src/debug/Python-2.7.3/Objects/longobject.c:883
> #3 0x00000000004df100 in frapy_pc (self=
> <gdb.Frame at remote 0x2c1d130>, args=<optimized out>)
> at ../../../git/gdb/gdb/python/py-frame.c:209
> #4 0x0000003f2c4dce36 in call_function (oparg=<optimized out>,
> pp_stack=0x7fff850c3638)
> at /usr/src/debug/Python-2.7.3/Python/ceval.c:4082
> #5 PyEval_EvalFrameEx (f=f@entry=
I'm on Fedora 17, x86_64, Python seems to be at version 2.7.3, gdb is
up to date against the trunk (7.5.50.20120823-cvs)
Cordially,
Kevin