Centos服务器意外重启,我无法处理崩溃文件,我做错了什么?

我的一个Mysql复制服务器在晚上重新启动,我试图find原因。 last运行命令显示了这一行: reboot system boot 2.6.32-71.29.1.e Wed Jul 31 04:37 - 11:02 (06:24)我正在尝试读取已经创build的vmcore文件重启。 我已经安装了创buildvmlinux文件的kernel-debuginfo包。 然后我跑了:

 [root@dbs ~]# crash -s /usr/lib/debug/lib/modules/2.6.32-358.14.1.el6.centos.plus.x86_64/vmlinux /var/crash/127.0.0.1-2013-07-31-01:33:32/vmcore crash 6.1.0-1.el6 crash: invalid kernel virtual address: 68f8e06b73fe5f1f type: "possible" WARNING: cannot read cpu_possible_map crash: invalid kernel virtual address: fce96c6b73fe5f1f type: "present" WARNING: cannot read cpu_present_map crash: invalid kernel virtual address: e10de07591befc69 type: "online" WARNING: cannot read cpu_online_map crash: /usr/lib/debug/lib/modules/2 and /var/crash/127.0.0.1-2013-07-31-01:33:32/vmcore do not match! Usage: crash [OPTION]... NAMELIST MEMORY-IMAGE (dumpfile form) crash [OPTION]... [NAMELIST] (live system form) Enter "crash -h" for details. [root@dbs ~]# 

任何人都可以请指点我做错了什么? 我想知道vmcore和vmlinux怎么没有像安装kernel-debuginfo软件包时生成的vmlinux那么多…

 [root@dbs 2.6.32-358.14.1.el6.centos.plus.x86_64]# rpm -qa |grep kernel-debug kernel-debuginfo-common-x86_64-2.6.32-358.14.1.el6.centos.plus.x86_64 kernel-debug-2.6.32-358.14.1.el6.x86_64 kernel-debuginfo-2.6.32-358.14.1.el6.centos.plus.x86_64 [root@dbs 2.6.32-358.14.1.el6.centos.plus.x86_64]# uname -r 2.6.32-71.29.1.el6.x86_64 [root@dbs 2.6.32-358.14.1.el6.centos.plus.x86_64]# 

为什么kernel-debuginfo软件包生成错误的vmlinuxuname -r显示内核版本2.6.32-71.29.1,而生成的vmlinux版本是2.6.32-358.14.1。

 [root@dbs ~]# yum list installed |grep kernel abrt-addon-kerneloops.x86_64 dracut-kernel.noarch 004-33.2.el6_0 @updates kernel.x86_64 2.6.32-71.el6 @anaconda-CentOS-201106060106.x86_64/6.0 kernel.x86_64 2.6.32-71.29.1.el6 kernel-debuginfo.x86_64 2.6.32-358.14.1.el6.centos.plus kernel-debuginfo-common-x86_64.x86_64 kernel-headers.x86_64 2.6.32-71.29.1.el6 [root@dbs ~]# 

我find了解决scheme! 我做的步骤是:

 [root@dbs ~]# uname -r 2.6.32-71.29.1.el6.x86_64 [root@dbs ~]# 

我跑了:

 [root@dbs ~]# yum provides kernel-debuginfo-2.6.32 

并手动寻找:

 kernel-debuginfo-2.6.32-71.29.1.el6.x86_64 

然后我运行: rpm -qa |grep ^kernelyum remove kernel-debuginfo当前安装的错误版本的kernel-debuginfo

然后我安装了正确的kernel-debuginfo-2.6.32-71.29.1.el6.x86_64 ,运行了updatedb ,然后locate了正确版本的新vmlinux 。 然后我使用下一个命令: crash /usr/lib/debug/lib/modules/2.6.32-71.29.1.el6.x86_64/vmlinux /var/crash/127.0.0.1-2013-07-31-01\:33\:32/vmcore和崩溃报告成功运行。 感谢您的帮助@ALex_hha。