- 論壇徽章:
- 0
|
關(guān)于 內(nèi)核調(diào)試 kdump 與crash的疑問,最近想要利用這兩個(gè)工具查下自己寫的內(nèi)核模塊驅(qū)動(dòng)的問題,但是這兩個(gè)工具一直沒有能夠運(yùn)行起來希望知道的指點(diǎn)一二。
是這樣的我用的是centos6.5的系統(tǒng),系統(tǒng)的內(nèi)核版本是2.6.32-431.el6.i686;自己又重新編譯了一個(gè)內(nèi)核版本為2.6.32.14。先前編寫內(nèi)核模塊加運(yùn)行一直是在
2.6.32.14內(nèi)核上的,但是最近發(fā)現(xiàn)程序會(huì)導(dǎo)致系統(tǒng)崩潰,所以想找下bug。因此就想用用kdump 與crash;kdump系統(tǒng)本身是有的,我只是修改了一下配置,但是
在安裝crash中的kernel-debuginfo和其支持包kernel-debuginfo-common時(shí)候,發(fā)現(xiàn)http://debuginfo.centos.org/6 這個(gè)網(wǎng)站上根本就沒有與版本2.6.32.14內(nèi)核相匹配
的kernel-debuginfo和其支持包kernel-debuginfo-common 這兩個(gè)包,上面所有的 只是centos系統(tǒng)內(nèi)核版本相匹配的包。但是我是在 編譯過的內(nèi)核中來調(diào)試的啊,所以不
太明白我哪里有問題。應(yīng)該不是用與centos本身系統(tǒng)所匹配的kernel-debuginfo和包kernel-debuginfo-common的吧?
還有一個(gè)疑問的地方是我目前有兩個(gè)內(nèi)核一個(gè)是2.6.32.14;一個(gè)是系統(tǒng)自帶的。當(dāng)內(nèi)核模塊運(yùn)行崩潰時(shí)候,利用kdump時(shí)候我的理解是由2.6.32.14切換到2.6.32-431.el6.i686,不知道對不對。
下面是我自己找的與2.6.32.版本接近的kernel-debuginfo和kernel-debuginfo-common 這兩個(gè)包,我crash之后就會(huì)出現(xiàn)問題,紅字處。請大家指導(dǎo)下。
[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]# |
|