crash-utility / crash

Linux kernel crash utility
https://crash-utility.github.io
837 stars 275 forks source link

crash_arm64 can not load coredump #134

Open sensarliar opened 1 year ago

sensarliar commented 1 year ago

~/code/github/crash/crash ./symbols/vmlinux SYS_COREDUMP --no_modules

crash 8.0.2++ Copyright (C) 2002-2022 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, 2020-2022 NEC Corporation Copyright (C) 1999, 2002, 2007 Silicon Graphics, Inc. Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc. Copyright (C) 2015, 2021 VMware, 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) 10.2 Copyright (C) 2021 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 "--host=x86_64-pc-linux-gnu --target=aarch64-elf-linux". Type "show configuration" for configuration details. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.

For help, type "help". Type "apropos word" to search for commands related to "word"...

crash: read error: kernel virtual address: ffffffda76dfc1d8 type: "IRQ stack pointer" crash: read error: kernel virtual address: ffffffda76e161d8 type: "IRQ stack pointer" crash: read error: kernel virtual address: ffffffda76e301d8 type: "IRQ stack pointer" crash: read error: kernel virtual address: ffffffda76e4a1d8 type: "IRQ stack pointer" crash: read error: kernel virtual address: ffffffda76e641d8 type: "IRQ stack pointer" crash: read error: kernel virtual address: ffffffda76e7e1d8 type: "IRQ stack pointer" crash: read error: kernel virtual address: ffffffda76e981d8 type: "IRQ stack pointer" crash: read error: kernel virtual address: ffffffda76eb21d8 type: "IRQ stack pointer" crash: read error: kernel virtual address: ffffffda7f0c5000 type: "memory section root table"

another tools:

crash_arm64 ./symbols/vmlinux SYS_COREDUMP

crash_arm64 7.2.6++ Copyright (C) 2002-2019 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.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 "--host=x86_64-unknown-linux-gnu --target=aarch64-elf-linux"...

WARNING: kernel relocated [63488MB]: patching 530885 gdb minimal_symbol values

WARNING: cannot retrieve registers for active tasks

WARNING: cannot determine how modules are linked

crash_arm64: cannot resolve: "modules"

k-hagio commented 1 year ago

Recent arm64 kernels may need -m vabits_actual=xx and etc. especially if it's a ramdump. What is the kernel version and CONFIG_ARM64_VA_BITS?

sensarliar commented 1 year ago

uname -a

Linux localhost 4.14.186+ #1 SMP PREEMPT Thu Mar 9 18:01:42 CST 2023 aarch64 zcat /proc/config.gz |grep CONFIG_ARM64_VA_BIT CONFIG_ARM64_VA_BITS_39=y

CONFIG_ARM64_VA_BITS_48 is not set

CONFIG_ARM64_VA_BITS=39

add "-m vabits_actual=xx" , does not work.

~/code/github/crash/crash ./symbols/vmlinux SYS_COREDUMP --no_panic -m vabits_actual=39

crash 8.0.2++ Copyright (C) 2002-2022 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, 2020-2022 NEC Corporation Copyright (C) 1999, 2002, 2007 Silicon Graphics, Inc. Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc. Copyright (C) 2015, 2021 VMware, 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.

NOTE: setting vabits_actual to: 39

GNU gdb (GDB) 10.2 Copyright (C) 2021 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 "--host=x86_64-pc-linux-gnu --target=aarch64-elf-linux". Type "show configuration" for configuration details. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.

For help, type "help". Type "apropos word" to search for commands related to "word"...

crash: read error: kernel virtual address: ffffffd676dfc1d8 type: "IRQ stack pointer" crash: read error: kernel virtual address: ffffffd676e161d8 type: "IRQ stack pointer" crash: read error: kernel virtual address: ffffffd676e301d8 type: "IRQ stack pointer" crash: read error: kernel virtual address: ffffffd676e4a1d8 type: "IRQ stack pointer" crash: read error: kernel virtual address: ffffffd676e641d8 type: "IRQ stack pointer" crash: read error: kernel virtual address: ffffffd676e7e1d8 type: "IRQ stack pointer" crash: read error: kernel virtual address: ffffffd676e981d8 type: "IRQ stack pointer" crash: read error: kernel virtual address: ffffffd676eb21d8 type: "IRQ stack pointer" crash: read error: kernel virtual address: ffffffd67f0c5000 type: "memory section root table"

k-hagio commented 1 year ago

The "-m vabits_actual" option cannot be used for that old kernel (< 5.4), please don't specify it. What is the output of crash -d 1 vmlinux vmcore?

And please use code blocks [1] for log... [1] https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks

sensarliar commented 1 year ago

fatal err is here: <readmem: ffffff80afea6648, KVADDR, "mem_section", 8, (FOE), 7ffd77874228> <read_kdump: addr: ffffff80afea6648 paddr: 454a6648 cnt: 8> <readmem: ffffffd67f0c5000, KVADDR, "memory section root table", 16384, (FOE), 5647b0676350> <read_kdump: addr: ffffffd67f0c5000 paddr: 423f0c5000 cnt: 4096> crash: read error: kernel virtual address: ffffffd67f0c5000 type: "memory section root table"

sensarliar commented 1 year ago

crash-7-branch image is good to load dumpfile; but master branch is not good. it is a bit weird.