免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4257 | 回复: 6

[内核入门] 请教kdump+crash问题 [复制链接]

论坛徽章:
0
发表于 2012-12-18 19:29 |显示全部楼层
前几天在内核中加了一段调用用户态程序的代码,一运行发现死机,故使用kdump+crash查找死机原因。kernel-debuginfo应该要和待调试内核版本一致吧,否则没有/usr/lib/debug/lib/modules/`uname -r`/vmlinux。但是fedora 16可以下载的kernel-debuginfo只有3.6.7版本的,没有我要调试的3.1.10,这个问题该如何解决?还一个问题就是,我试着用3.6.7版本内核,在执行crash /var/crash/.../vmcore /usr/lib/debug/lib/modules/`uname -r`/vmlinux的时候会报错。
  1. crash: invalid kernel virtual address: 89f8754b  type: "possible"
  2. WARNING: cannot read cpu_possible_map
  3. crash: page excluded: kernel virtual address: e805ebc3  type: "present"
  4. WARNING: cannot read cpu_present_map
  5. crash: page excluded: kernel virtual address: ffabf884  type: "online"
  6. WARNING: cannot read cpu_online_map

  7. crash: cannot resolve: "xtime"
复制代码
下面是几个软件包的版本号:
kexec-tools-2.0.2-29.fc16.i686
crash-6.0.2-1.fc16.i686
kernel-debuginfo-3.6.7-4.fc16.i686
kernel-debuginfo-common-3.6.7-4.fc16.i686
请教各位该如何解决上面两个问题?多谢了!

论坛徽章:
1
天蝎座
日期:2013-10-23 21:11:03
发表于 2012-12-19 09:38 |显示全部楼层
你这个 3.1.10 的 kernel 是从哪里来的?
如果是自己编译的话,可以看看是否编入了调试信息,如果有,可以用作debuginfo kernel

论坛徽章:
1
天蝎座
日期:2013-10-23 21:11:03
发表于 2012-12-19 09:39 |显示全部楼层
至于最后一个 crash: cannot resolve: "xtime"

这个需要自己编译crash工具了 http://people.redhat.com/anderson/
我在新的内核上使用crash会遇到这个问题,编译安装最新的crash工具后就没有问题了

论坛徽章:
0
发表于 2012-12-19 10:34 |显示全部楼层
回复 2# openspace
3.1.10是自己编译的,在配置内核过程中我选了kdump选项,那我直接用 /usr/src/kernels/linux-3.1.10/vmlinux就可以了吧,我试下,多谢

论坛徽章:
0
发表于 2012-12-19 10:39 |显示全部楼层
回复 3# openspace
  1. Fix for crash invocation failure on 3.3-era kernels in which the
  2.            the former standalone "xtime" timespec structure has been moved into
  3.            the "timekeeper" structure.  Without the patch, the crash session
  4.            would fail early on with the message "crash: cannot resolve: xtime".
  5.            The patch also prevents the crash session failure in the unlikely
  6.            event that the timespec access fails.
复制代码
这是crash6.0.5的changelog,当时就没想到自己手动编译一个最新版本的,再次感谢...


   

论坛徽章:
0
发表于 2012-12-21 16:18 |显示全部楼层
回复 3# openspace
问题解决了,原来内核在编译完后在kenel目录下就有vmlinux文件,不过看了下crash输出的信息,看的有些迷糊,请问有什么资料么?


   

论坛徽章:
1
天蝎座
日期:2013-10-23 21:11:03
发表于 2012-12-26 11:01 |显示全部楼层
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP