- 论坛徽章:
- 0
|
关于 内核调试 kdump 与crash的疑问,最近想要利用这两个工具查下自己写的内核模块驱动的问题,但是这两个工具一直没有能够运行起来希望知道的指点一二。
是这样的我用的是centos6.5的系统,系统的内核版本是2.6.32-431.el6.i686;自己又重新编译了一个内核版本为2.6.32.14。先前编写内核模块加运行一直是在
2.6.32.14内核上的,但是最近发现程序会导致系统崩溃,所以想找下bug。因此就想用用kdump 与crash;kdump系统本身是有的,我只是修改了一下配置,但是
在安装crash中的kernel-debuginfo和其支持包kernel-debuginfo-common时候,发现http://debuginfo.centos.org/6 这个网站上根本就没有与版本2.6.32.14内核相匹配
的kernel-debuginfo和其支持包kernel-debuginfo-common 这两个包,上面所有的 只是centos系统内核版本相匹配的包。但是我是在 编译过的内核中来调试的啊,所以不
太明白我哪里有问题。应该不是用与centos本身系统所匹配的kernel-debuginfo和包kernel-debuginfo-common的吧?
还有一个疑问的地方是我目前有两个内核一个是2.6.32.14;一个是系统自带的。当内核模块运行崩溃时候,利用kdump时候我的理解是由2.6.32.14切换到2.6.32-431.el6.i686,不知道对不对。
下面是我自己找的与2.6.32.版本接近的kernel-debuginfo和kernel-debuginfo-common 这两个包,我crash之后就会出现问题,红字处。请大家指导下。
[root@csc csc]# crash
crash 6.1.0-5.el6
Copyright (C) 2002-2012 Red Hat, Inc.
Copyright (C) 2004, 2005, 2006, 2010 IBM Corporation
Copyright (C) 1999-2006 Hewlett-Packard Co
Copyright (C) 2005, 2006, 2011, 2012 Fujitsu Limited
Copyright (C) 2006, 2007 VA Linux Systems Japan K.K.
Copyright (C) 2005, 2011 NEC Corporation
Copyright (C) 1999, 2002, 2007 Silicon Graphics, Inc.
Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc.
This program is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions. Enter "help copying" to see the conditions.
This program has absolutely no warranty. Enter "help warranty" for details.
crash: cannot find booted kernel -- please enter namelist argument
Usage:
crash [OPTION]... NAMELIST MEMORY-IMAGE (dumpfile form)
crash [OPTION]... [NAMELIST] (live system form)
Enter "crash -h" for details.
[root@csc csc]#
[root@csc csc]# crash /var/crash/127.0.0.1-2014-08-28-01:14:52/vmcore /usr/lib/debug/lib/modules/2.6.18-371.11.1.el5/vmlinux
crash 6.1.0-5.el6
Copyright (C) 2002-2012 Red Hat, Inc.
Copyright (C) 2004, 2005, 2006, 2010 IBM Corporation
Copyright (C) 1999-2006 Hewlett-Packard Co
Copyright (C) 2005, 2006, 2011, 2012 Fujitsu Limited
Copyright (C) 2006, 2007 VA Linux Systems Japan K.K.
Copyright (C) 2005, 2011 NEC Corporation
Copyright (C) 1999, 2002, 2007 Silicon Graphics, Inc.
Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc.
This program is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions. Enter "help copying" to see the conditions.
This program has absolutely no warranty. Enter "help warranty" for details.
GNU gdb (GDB) 7.3.1
Copyright (C) 2011 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 "i686-pc-linux-gnu"...
crash: cannot determine base kernel version
crash: /usr/lib/debug/lib/modules/2.6.18-371.11.1.el5/vmlinux and /var/crash/127.0.0.1-2014-08-28-01:14:52/vmcore do not match!
Usage:
crash [OPTION]... NAMELIST MEMORY-IMAGE (dumpfile form)
crash [OPTION]... [NAMELIST] (live system form)
Enter "crash -h" for details.
[root@csc csc]# |
|