This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB crashing because of Python


On Thu, Aug 23, 2012 at 3:55 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Kevin" == Kevin Pouget <kevin.pouget@gmail.com> writes:
>
> Kevin> I notice today a lot for GDB crash because of Python, am I the
> Kevin> only one?  (I didn't refresh my git tree since a while, so it
> Kevin> might not be directly related to the last Python patches)
>
> Kevin> It's hard to tell exactly what cause it, but for instance I see
> Kevin> repeatedly:
> [...]
>
> I haven't seen it.
> I updated from CVS just now, rebuilt, and ran the gdb.python tests
> without any problems.
>
> Kevin> I'm on Fedora 17, x86_64, Python seems to be at version 2.7.3, gdb is
> Kevin> up to date against the trunk (7.5.50.20120823-cvs)
>
> I'm still on Fedora 16.  I wouldn't expect 17 to have particular
> problems like this though.
>
> What were you doing when you got these crashes?  Is it something simple
> that I could try?  What happens if you run the gdb.python tests?
>
> Tom

Hello,

> What happens if you run the gdb.python tests?
unfortunately, the run 100% fine ...

> What were you doing when you got these crashes?
just "normal" things, I mean, running code which have been running
fine until today.

> SystemError: /builddir/build/BUILD/Python-2.7.3/Objects/listobject.c:178: bad argument to internal function
this one is triggered in the middle of a Breakpoint callback, so it
appears quite often

> Program received signal SIGSEGV, Segmentation fault.
> PyObject_Malloc (nbytes=32)
>     at /usr/src/debug/Python-2.7.3/Objects/obmalloc.c:784
this one is when I want to attach gdb to another gdb instance (gdb2
--pid $(pidof gdb))

and finally:
> Fatal Python error: GC object already tracked
this one appears when I start the inferior execution, and start it again

I've attached the complete stack of this crash (from a third gdb!).

We can see that it crashed while auto-loading
"/usr/lib/debug/usr/bin/gdb-gdb.py", which is the original file from
Fedora gdb package.

I can also see that the stack contains "prompt_hook", I've seen another crash
which was mentioned this file [1], which deals with prompt customization.
It *might* be related, but I'm not sure at all.


Thanks,

Kevin


[1] : http://gitorious.org/misc-gdb-stuff/misc-gdb-stuff/blobs/master/misc_gdb/gaudy_prompt.py

Attachment: stack.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]