crash分析vmcore和vmlinux出现不匹配问题的解决方法

最近两天做实验中,使用sysrq-c触发系统崩溃后,生成转储文件vmcore。但是使用crash分析的时候却提示vmcore与vmLinux不匹配

# crash /var/crash/127.0.0.1-2014.07.13-18\:23\:21/vmcore /usr/lib/debug/lib/modules/3.9.5-301.fc19.i686/vmlinux

crash 6.1.4-1.fc19
Copyright (C) 2002-2013  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: invalid kernel virtual address: c7c0  type: "possible"
WARNING: cannot read cpu_possible_map
crash: invalid kernel virtual address: 364c0cf  type: "present"
WARNING: cannot read cpu_present_map
crash: page excluded: kernel virtual address: d0005405  type: "online"
WARNING: cannot read cpu_online_map
crash: /usr/lib/debug/lib/modules/3.9.5-301.fc19.i686/vmlinux and /var/crash/127.0.0.1-2014.07.13-18:23:21/vmcore do not match!

Usage:

  crash [OPTION]... NAMELIST MEMORY-IMAGE  (dumpfile form)
  crash [OPTION]... [NAMELIST]             (live system form)

Enter "crash -h" for details.

在网上也没有找到什么解决办法,只是说vmlinux与vmcore版本不匹配。


后来仔细观察,发现系统版本与安装的软件版本还是有一点小的区别

# uname -a
Linux localhost.localdomain 3.9.5-301.fc19.i686.PAE #1 SMP Tue Jun 11 19:46:44 UTC 2013 i686 i686 i386 GNU/Linux

重点在PAE三个字,物理地址扩展。

原来还是安装的系统架构不同。粗心了。

在软件源中寻找,找到这样的一个软件包

kernel-PAE-debuginfo-3.9.5-301.fc19.i686.rpm  


于是,安装之


之后果然发现多出一个目录,而原来只有一个,即

/usr/lib/debug/lib/modules/3.9.5-301.fc19.i686  

现在多出一个

/usr/lib/debug/lib/modules/3.9.5-301.fc19.i686.PAE


再次crash分析,这次vmlinux需要在后来这个目录中找

# crash /var/crash/127.0.0.1-2014.07.13-18\:23\:21/vmcore  /usr/lib/debug/lib/modules/3.9.5-301.fc19.i686.PAE/vmlinux
之后果然进去了

crash 6.1.4-1.fc19
Copyright (C) 2002-2013  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"...

      KERNEL: /usr/lib/debug/lib/modules/3.9.5-301.fc19.i686.PAE/vmlinux
    DUMPFILE: /var/crash/127.0.0.1-2014.07.13-18:23:21/vmcore  [PARTIAL DUMP]
        CPUS: 2
        DATE: Mon Jul 14 22:22:37 2014
      UPTIME: 07:04:31
LOAD AVERAGE: 0.00, 0.04, 0.08
       TASKS: 92
    NODENAME: localhost.localdomain
     RELEASE: 3.9.5-301.fc19.i686.PAE
     VERSION: #1 SMP Tue Jun 11 19:46:44 UTC 2013
     MACHINE: i686  (2600 Mhz)
      MEMORY: 1 GB
       PANIC: "Oops: 0002 [#1] SMP " (check log for details)
         PID: 1384
     COMMAND: "bash"
        TASK: f47fb300  [THREAD_INFO: f4640000]
         CPU: 0
       STATE: TASK_RUNNING (PANIC)

crash> 




  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值