This is the mail archive of the 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]

Unable to debug core dumps generated by shared libraries loaded in Python

I'm having an issue debugging some segfaults that are being generated by an
application that runs in a Python interpreter.  The machine in question is
running RHEL 6 x86_64 with GDB 7.2.  Whenever I attempt to debug core file
that was generated from Python, I receive a bunch of "Cannot access memory
address <address here>" messages and receive unhelpful stack traces.  The
weird thing is, is that I can view the core files on other RHEL 6 machines
with identical packages installed.

Here is an example:
> gdb python core.4586
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-64.el6_5.2)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
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-redhat-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /opt/goes/bin/python...(no debugging symbols

warning: core file may not match specified executable file.
[New Thread 4774]
[New Thread 4887]
[New Thread 4886]
[New Thread 4776]
[New Thread 4888]
[New Thread 4711]
[New Thread 4890]
[New Thread 4586]
[New Thread 4591]
[New Thread 4680]
[New Thread 4703]
[New Thread 4783]
[New Thread 4695]
[New Thread 4694]
[New Thread 4590]
[New Thread 4889]
[New Thread 4773]
[New Thread 4775]
Cannot access memory at address 0xf
Cannot access memory at address 0xf
Cannot access memory at address 0xf
Cannot access memory at address 0xf
Reading symbols from /lib64/ debugging symbols
Loaded symbols for /lib64/
Cannot access memory at address 0xf
Core was generated by `/opt/goes/bin/python /opt/goes/bin/py.test
--mission=AST43 --skip_teardown_dump'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007fab3f43d766 in ?? ()
Missing separate debuginfos, use: debuginfo-install
(gdb) bt
#0  0x00007fab3f43d766 in ?? ()
#1  0x00007fab281cef30 in ?? ()
#2  0x0000000000000000 in ?? ()

If I hop over to a different machine, gdb works fine:

It doesn't appear to be an environment issue since I have a roaming home
directory, and have dumped my env and re-sourced.  My colleagues have the
same issue on this particular machine.

I attempted to use a newer version of gdb (7.5) via the developer toolset
collection and hit the same snag:
The only thing that changes is the format is slightly different.  I also
uninstalled and re-installed the system packages for GDB .

I'm at a loss right now. Non-Python applications that I've debugged on this
machine seem to open fine.  We are using a non-system version of Python, but
that is consistent on all of our machines.  I fired up gdb against the core
file using strace, but nothing is jumping out at me (other than that the
good runs actually open shared libraries).

Here is the strace from the bad machine:
Now one of the good machines:
And if you're really curious, an strace from the bad machine using GDB 7.5:

One thing I'll point out is that GDB does curiously open the system Python
installation in /usr, but it does that in all cases, so that in and of
itself, doesn't seem to be the issue.

Any ideas on what is going on here?


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