gdb unable to read python frame information

Wesley nispray at gmail.com
Mon Mar 10 21:43:39 EDT 2014


[root at localhost ~]# gdb python
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)
Copyright (C) 2010 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-redhat-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.debug...done.
done.
(gdb) run
Starting program: /usr/bin/python 
warning: the debug information found in "/usr/lib/debug//usr/lib64/libpython2.6.so.1.0.debug" does not match "/usr/lib64/libpython2.6.so.1.0" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug/usr/lib64/libpython2.6.so.1.0.debug" does not match "/usr/lib64/libpython2.6.so.1.0" (CRC mismatch).

[Thread debugging using libthread_db enabled]
Python 2.6.6 (r266:84292, Nov 22 2013, 12:16:22) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
Program received signal SIGTSTP, Stopped (user).
0x00000034214e15c3 in __select_nocancel () at ../sysdeps/unix/syscall-template.S:82
82      T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
Missing separate debuginfos, use: debuginfo-install python-2.6.6-51.el6.x86_64

Seems no debuginfo installed, but actually I have installed before, here is check:

root at localhost ~]# debuginfo-install python-2.6.6-51.el6.x86_64
Loaded plugins: auto-update-debuginfo, fastestmirror, refresh-packagekit
enabling epel-debuginfo
Loading mirror speeds from cached hostfile
epel/metalink                                                                                                                                  | 4.7 kB     00:00     
epel-debuginfo/metalink                                                                                                                        | 4.9 kB     00:00     
 * base: mirrors.yun-idc.com
 * epel: mirrors.hustunique.com
 * epel-debuginfo: mirrors.hustunique.com
 * extras: mirrors.yun-idc.com
 * rpmforge: mirror.hmc.edu
 * updates: mirrors.stuhome.net
adobe-linux-x86_64                                                                                                                             |  951 B     00:00     
base                                                                                                                                           | 3.7 kB     00:00     
debug                                                                                                                                          | 2.5 kB     00:00     
debug/primary_db                                                                                                                               | 966 kB     00:06     
epel                                                                                                                                           | 4.2 kB     00:00     
epel/primary_db                                                                                                                                | 6.0 MB     01:19     
epel-debuginfo                                                                                                                                 | 3.0 kB     00:00     
epel-debuginfo/primary_db                                                                                                                      | 587 kB     00:07     
extras                                                                                                                                         | 3.4 kB     00:00     
google64                                                                                                                                       |  951 B     00:00     
rpmforge                                                                                                                                       | 1.9 kB     00:00     
updates                                                                                                                                        | 3.4 kB     00:00     
Checking for new repos for mirrors
Package matching python-debuginfo-2.6.6-51.el6.x86_64 already installed. Checking for update.
Package glibc-debuginfo-2.12-1.132.el6.x86_64 already installed and latest version
Package glibc-debuginfo-2.12-1.132.el6.x86_64 already installed and latest version
Package glibc-debuginfo-2.12-1.132.el6.x86_64 already installed and latest version
Package glibc-debuginfo-2.12-1.132.el6.x86_64 already installed and latest version
Package glibc-debuginfo-2.12-1.132.el6.x86_64 already installed and latest version
Package matching python-debuginfo-2.6.6-51.el6.x86_64 already installed. Checking for update.
Package glibc-debuginfo-2.12-1.132.el6.x86_64 already installed and latest version
No debuginfo packages available to install

在 2014年3月10日星期一UTC+8下午3时28分30秒,dieter写道:
> Wesley <nispray at gmail.com> writes:
> 
> 
> 
> > If you don't read the loop from the top, and don't tell me exactly what you want by just keep saying context, please ingore this post.
> 
> 
> 
> You are doing things only a few people do: trying to debug
> 
> a Python process on C level -- and you observe really strange things.
> 
> It is very difficult to guess from the distance what goes wrong.
> 
> 
> 
> Apparently, your gdb sees a very strange state of the debugged
> 
> process. But why?
> 
> 
> 
> Missing symbols was the first guess (the
> 
> gdb output you have provided does not suggest this - but
> 
> I have not seen the "reading symbols from "python" ..."; thus,
> 
> there may still be a problem with this).
> 
> 
> 
> A runaway process is another guess.
> 
> 
> 
> Some gdb problem another one.
> 
> 
> 
> 
> 
> I would approach the situation by simplifying the setup.
> 
> Instead of attaching a running Python process, I would
> 
> use "gdb python"; then "run"; then "CTRL-C" and there look
> 
> what "bt" gives you (this should demonstrate whether your
> 
> "gdb" is set up correctly and can debug Python on C level).
> 
> Then you write an infinitely running function in Python,
> 
> run it and again interrupt with "gdb" to see whether the "py-*"
> 
> commands are working. If this all work, you come again
> 
> to your actual task -- understanding what your python process
> 
> is doing.



More information about the Python-list mailing list