故障kimage_voffset cannot be determined from the dumpfile cannot read linux_banner string do not match

2023-05-16

未成功,以下做笔记记录

环境

CPU:FT2000+

HostOS:openEuler 20.03 LTS SP3 aarch64

guestOS: CentOS8 aarch64

故障现象

virsh dump 产生的内核转储文件,在虚拟机内crash时报错

WARNING: kimage_voffset cannot be determined from the dumpfile.

WARING: cannot read linux_banner string 

crash /usr/lib/debug/lib/modules/4.18.8-240.el8.aarch64/vmlinux and /mnt/hostshare/qemu-virtual-machine/centos8-tcti-0505.zlib not match

解决

卸载,手动编译crash  

yum remove crash
yum install byacc bison ncurses-devel perl-Unicode-EastAsianWidth texinfo

https://github.com/crash-utility/crash/archive/refs/tags/8.0.3.tar.gz

$ tar -xf crash-8.0.3.tar.gz
$ cd crash-8.0.3
$ make

注意

不要make -j16这种多进程编译 ,出错时看不到详细错误信息。

makeinfo位于texinfo包,texinfo下载路径在PowerTools

https://vault.centos.org/centos/8/PowerTools/aarch64/os/Packages/texinfo-6.5-6.el8.aarch64.rpm

https://vault.centos.org/centos/8/PowerTools/aarch64/os/Packages/perl-Unicode-EastAsianWidth-1.33-13.el8.noarch.rpm

故障 

编译到最后报错 crash build failed gdb merge Error 1

尝试解决:

 make gdb_merge过程出错

对应Makefile(注意,如果直接make,每次都会通过configure.c生成configure,再覆盖Makefile)

 添加打印信息

 

 make gdb_merge

 发现这一段就没有报错

有故障的应该是这两句话,签名删除了编译的程序,后面又判断了一下。

 

 

yum install snappy-devel

没搞定

换个思路,采用openEuler 20.03 LTS SP3 arm64版本crash,参考crash.spec,手动合并补丁编译

openEuler-20.03-LTS-SP3-source-dvd.iso:Packages/crash-7.2.8-3.oe1.src.rpm

报错-Werror=implicit-fallthrough 

解决

export CFLAGS="-Wno-implicit-fallthrough"
make

错误aarch64-linux-nat.c error conficting types for 'ps_get_thread_area'

vim gdb-7.6/gdb/gdb_proc_service.h

 23行插入

#undef HAVE_PROC_SERVICE_H

zlib.h no such file or directory

 

yum install zlib-devel

 

yum install lzo-devel

成功了!

 

make install

 

最终结果:失败。 

参考

[Crash-utility] [PATCH 1/1] arm64: Fix missing offset formodules_vaddr with aarch64 guest dump 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

故障kimage_voffset cannot be determined from the dumpfile cannot read linux_banner string do not match 的相关文章

随机推荐