----- Original Message -----
On 11/28/15 at 07:19am, Dave Anderson wrote:
>
>
> ----- Original Message -----
> > Hi, Dave
> >
> > I played with kdump on arm platform recently. It works well for me with a few
> > patches to kexec-tools, but seems crash tool can not recogonize the vmlinux.
> >
> > Do you have any hints about below error? I'm sure the vmlinux and vmcore
are
> > same build with rh cross compiler 5.2.1:
> >
> > WARNING: kernels compiled by different gcc versions:
> > vmlinux: (unknown)
> > /var/crash/127.0.0.1-2015-11-28-16:00:50/vmcore kernel: 5.2.1
> >
> > WARNING: kernel version inconsistency between vmlinux and dumpfile
> >
> > crash: incompatible arguments:
> > vmlinux is not SMP -- /var/crash/127.0.0.1-2015-11-28-16:00:50/vmcore
> > is SMP
> >
> > Thanks
> > Dave
> >
>
> It's not finding the "gcc version" string (the first warning), the
linux_banner string
> in the vmcore is not matching the one in the vmlinux file (the second warning), and
finally
> it's not finding the "SMP" part of the string (the fatal error).
>
> What does this show:
>
> $ strings vmlinux | grep "Linux version"
Here is the output:
Linux version 4.4.0-rc2+ (dyoung(a)dhcp-128-65.nay.redhat.com) (gcc version
5.2.1 20150716 (Red Hat Cross 5.2.1-3) (GCC) ) #44 SMP Sat Nov 28 15:29:52
CST 2015
>
> Here's one from a natively-compiled ARM64:
>
> # strings /usr/lib/debug/lib/modules/4.2.0-0.rc3.15.el7.aarch64/vmlinux |
> grep "Linux version"
> Linux version 4.2.0-0.rc3.15.el7.aarch64
> (mockbuild(a)arm64-002.build.eng.bos.redhat.com) (gcc version 4.8.3 20140911
> (Red Hat 4.8.3-9) (GCC) ) #1 SMP Wed Jul 29 13:26:18 EDT 2015
> #
>
> Entering "crash -d1 ..." will show the details on what it found.
>
Arm32 is supported in Fedora so I was testing the arm32 kexec/kdump, there
might exist some problems in either makedumpfile or crash.
crash -d1 test like below:
[root@localhost ~]# crash -d1 vmlinux /var/crash/127.0.0.1-2015-11-28-16\:00\:50/vmcore
crash 7.0.8-1.fc21
This is an old version of crash, and there have been several 32-bit ARM-related fixes
since then. You should at least try the most recent version here:
http://koji.fedoraproject.org/koji/buildinfo?buildID=693898
Copyright (C) 2002-2014 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.
vmcore_data:
flags: a0 (KDUMP_LOCAL|KDUMP_ELF32)
ndfd: 3
ofp: b6df9d78
header_size: 8192
num_pt_load_segments: 2
pt_load_segment[0]:
file_offset: 0
phys_start: 80000000
phys_end: 88000000
zero_fill: 0
pt_load_segment[1]:
file_offset: 0
phys_start: 8e400000
phys_end: 9fe00000
zero_fill: 0
elf_header: 58f8b8
elf32: 58f8b8
notes32: 58f8ec
load32: 58f90c
elf64: 0
notes64: 0
load64: 0
nt_prstatus: 5908b8
nt_prpsinfo: 0
nt_taskstruct: 0
task_struct: 0
page_size: 0
switch_stack: 0
xen_kdump_data: (unused)
num_prstatus_notes: 1
num_qemu_notes: 0
vmcoreinfo: 590978
size_vmcoreinfo: 1427
nt_prstatus_percpu: 005908b8
nt_qemu_percpu:
backup_src_start: 0
backup_src_size: 0
backup_offset: 0
Elf32_Ehdr:
e_ident: \177ELF
e_ident[EI_CLASS]: 1 (ELFCLASS32)
e_ident[EI_DATA]: 1 (ELFDATA2LSB)
e_ident[EI_VERSION]: 1 (EV_CURRENT)
e_ident[EI_OSABI]: 0 (ELFOSABI_SYSV)
e_ident[EI_ABIVERSION]: 0
e_type: 4 (ET_CORE)
e_machine: 40 (EM_ARM)
e_version: 1 (EV_CURRENT)
e_entry: 0
e_phoff: 34
e_shoff: 0
e_flags: 0
e_ehsize: 34
e_phentsize: 20
e_phnum: 3
e_shentsize: 0
e_shnum: 0
e_shstrndx: 0
Elf32_Phdr:
p_type: 4 (PT_NOTE)
p_offset: 4096 (1000)
p_vaddr: 0
p_paddr: 0
p_filesz: 1620 (654)
p_memsz: 1620 (654)
p_flags: 0 ()
p_align: 0
Elf32_Phdr:
p_type: 1 (PT_LOAD)
p_offset: 8192 (2000)
p_vaddr: c0000000
p_paddr: 80000000
p_filesz: 134217728 (8000000)
p_memsz: 134217728 (8000000)
p_flags: 7 (PF_X|PF_W|PF_R)
p_align: 0
Elf32_Phdr:
p_type: 1 (PT_LOAD)
p_offset: 134225920 (8002000)
p_vaddr: ce400000
p_paddr: 8e400000
p_filesz: 295698432 (11a00000)
p_memsz: 295698432 (11a00000)
p_flags: 7 (PF_X|PF_W|PF_R)
p_align: 0
Elf32_Nhdr:
n_namesz: 5 ("CORE")
n_descsz: 148
n_type: 1 (NT_PRSTATUS)
00000000 00000000 00000000 00000000
00000000 00000000 00000544 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000063 df93647c
1f26b000 00000000 00000001 00000063
00000007 c0700e3c 00000000 ddb16000
00000000 000e179c 00000030 ddb17ea8
c021e23b c021e23c 60060033 ffffffff
00000000 Elf32_Nhdr:
n_namesz: 11 ("VMCOREINFO")
n_descsz: 1427
n_type: 0 (unused)
OSRELEASE=4.4.0-rc2+
PAGESIZE=4096
SYMBOL(init_uts_ns)=c06d51bc
SYMBOL(node_online_map)=c06d2ef4
SYMBOL(swapper_pg_dir)=c0004000
SYMBOL(_stext)=c00082c0
SYMBOL(vmap_area_list)=c06f4354
SYMBOL(mem_map)=c076f140
SYMBOL(contig_page_data)=c072d480
SIZE(page)=36
SIZE(pglist_data)=3008
SIZE(zone)=960
SIZE(free_area)=36
SIZE(list_head)=8
SIZE(nodemask_t)=4
OFFSET(page.flags)=0
OFFSET(page._count)=16
OFFSET(page.mapping)=4
OFFSET(page.lru)=20
OFFSET(page._mapcount)=12
OFFSET(page.private)=28
OFFSET(pglist_data.node_zones)=0
OFFSET(pglist_data.nr_zones)=2912
OFFSET(pglist_data.node_mem_map)=2916
OFFSET(pglist_data.node_start_pfn)=2920
OFFSET(pglist_data.node_spanned_pages)=2928
OFFSET(pglist_data.node_id)=2932
OFFSET(zone.free_area)=128
OFFSET(zone.vm_stat)=768
OFFSET(zone.spanned_pages)=56
OFFSET(free_area.free_list)=0
OFFSET(list_head.next)=0
OFFSET(list_head.prev)=4
OFFSET(vmap_area.va_start)=0
OFFSET(vmap_area.list)=24
LENGTH(zone.free_area)=12
SYMBOL(log_buf)=c06f1498
SYMBOL(log_buf_len)=c06f1454
SYMBOL(log_first_idx)=c0731538
SYMBOL(log_next_idx)=c0731558
SIZE(printk_log)=16
OFFSET(printk_log.ts_nsec)=0
OFFSET(printk_log.len)=8
OFFSET(printk_log.text_len)=10
OFFSET(printk_log.dict_len)=12
LENGTH(free_area.free_list)=4
NUMBER(NR_FREE_PAGES)=0
NUMBER(PG_lru)=5
NUMBER(PG_private)=11
NUMBER(PG_swapcache)=15
NUMBER(PG_slab)=7
NUMBER(PG_head_mask)=16384
NUMBER(PAGE_BUDDY_MAPCOUNT_VALUE)=-128
CRASHTIME=1448697640
readmem: read_kdump()
kernel text: [c00082c0 - c0684c60]
exception text: [c0009000 - c000938c]
using 80000000 as phys_base
gdb vmlinux
GNU gdb (GDB) 7.6
Copyright (C) 2013 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 "armv7l-unknown-linux-gnueabihf"...
crash: CONFIG_NR_CPUS: 4
crash: CONFIG_HZ: 200
This looks good so far...
cpu_possible_mask: 0
cpu_present_mask: 0
cpu_online_mask: 0
cpu_active_mask: 0
The mask values don't make any sense -- their bitmask values should show
at least the panicking cpu.
base kernel version: 4.4.0
but this kernel version is correct.
WARNING: kernels compiled by different gcc versions:
vmlinux: (unknown)
/var/crash/127.0.0.1-2015-11-28-16:00:50/vmcore kernel: 5.2.1
WARNING: kernel version inconsistency between vmlinux and dumpfile
WARNING: cannot find matching kernel version in vmlinux file:
verify_namelist:
dumpfile /proc/version:
Linux version 4.4.0-rc2+ (dyoung(a)dhcp-128-65.nay.redhat.com) (gcc version
5.2.1 20150716 (Red Hat Cross 5.2.1-3) (GCC) ) #44 SMP Sat Nov 28 15:29:52
CST 2015
vmlinux:
This is the weird part -- the linux_banner string is not being found at all in the
vmlinux file, although you seem to have found it when you did the "strings
vmlinux"
command.
crash: incompatible arguments:
vmlinux is not SMP -- /var/crash/127.0.0.1-2015-11-28-16:00:50/vmcore is SMP
Usage:
crash [OPTION]... NAMELIST MEMORY-IMAGE[@ADDRESS] (dumpfile form)
crash [OPTION]... [NAMELIST] (live system form)
Enter "crash -h" for details.
Thanks
Dave
Can you send me the location of the vmlinux and vmcore files offline? I can
try working with them tomorrow with on an x86_64 host with a crash utility
built with "make target=ARM".
Thanks,
Dave