-
Notifications
You must be signed in to change notification settings - Fork 78
Debug Symbols on Ubuntu #19
Comments
You shouldn't have to use the Unfortunaltely, I don't have a Ubuntu machine handy to debug this issue. Other people have had trouble with Ubuntu's gdb (see issue #16, though this looks different, make sure your gdb isn't compiled to use The fact that you're not even seeing the number of threads after telling pyringe to attach makes me think gdb just crashes. I'd appreciate if you could post basic system information (that is the version of Ubuntu, gdb, and the output of Gdb should search for debugging info in Is this a custom build? (That would explain the failing sanity check -- the symbols from Given more information about your system, I'll try to set up a similar system to properly debug this. |
WRT $ ldd $(which gdb) | grep python
libpython2.7.so.1.0 => /usr/lib/libpython2.7.so.1.0 (0x00007fa9f4723000)
$ file /usr/lib/libpython2.7.so.1.0
/usr/lib/libpython2.7.so.1.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0x5d15da4466c0f66a892a5fb67187fcc2300f5c87, stripped GDB does, in fact appear to die -- it appears as defunct, though the >>> __repl__.inferior.gdb.is_running
WARNING:root:Failed to automatically load symbol file, some functionality will be unavailable until symbol file is provided.
True
==> pid:[11575] #threads:[0] current thread:[None] But looking for a corresponding $ ps aux | grep gdb
root 12755 0.2 0.0 0 0 pts/5 Z 19:58 0:00 [gdb] <defunct> We do in fact have the This is not a custom build -- just the normal |
TL;DR: Ubuntu doesn't package a symbol file with type information for the normal python binary, there's nothing pyringe can do in that case. (closing this) After setting up a basic 12.04 VM and looking at the file included in That's why the sanity check is failing -- it's legitimately reporting that the debug information is incomplete. As for why gdb isn't loading the right symbol file by itself, I'm still investigating that (adding more logging and more exact warning messages in the process). As you said, auto loading of symbol files is problematic as it is right now. As it stands, pyringe would have worked after explicitly telling it where to find the symbol file, if that file had passed the sanity check. Without type information there won't be any backtraces, file listings, proxy objects. Code injection might work if we're to allow pyringe to use non-debugging symbols, but not without some patches, and even then, you'd be mostly flying blind, as you'd have no way of knowing which thread (and under which frame) you're injecting code... Bottom line: The About that part you linked to in |
I'll add a note about the situation on Ubuntu to the README to warn other people about this issue. |
Ubuntu doesn't ship a symbol file with type information for the regular python executable (issue #19), so until that changes, Ubuntu users can only debug custom builds or the build included in the python-dbg package with pyringe.
Thanks for looking into it. That's pretty unfortunate that Ubuntu doesn't package the debug symbols for the default installation. I did check out the Again, thanks for digging into it, and if we find an easy way to get it going on Ubuntu, we'll post it back here. |
dlecocq when will you post it back ?? :o i hit the same issue on ubunbtu! |
Unfortunately, I don't think we ever did find a good workaround for this :-/ |
Having installed
python2.7-dbg
, the automatic loading of the symbol file isn't working:It seems that the default
SYMBOL_FILE
is relative topayload
, and it seems to not be present. Changing the default to, say, the binary or shared object files installed by thepython2.7-dbg
package then fails to pass the sanity check.Am I missing something obvious? Does the python (in our case, a daemon) have to have been invoked with
python-dbg
(we were under the impression that was not the case)?The text was updated successfully, but these errors were encountered: