crash-utility / crash

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

x86: WARNING: could not find MAGIC_START! #180

Open vt-alt opened 5 months ago

vt-alt commented 5 months ago

crash 8.0.5 on ia32 (i586) architecture and Linux 6.1.93 does not run with the error:

root@i586:/.in# crash

crash 8.0.5-alt2
Copyright (C) 2002-2024  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-2024  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 "i686-pc-linux-gnu".
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"...

warning: /usr/src/.gdbinit: Success

WARNING: not using untrusted file: "/usr/src/.gdbinit"

crash: read error: kernel virtual address: c1b57188  type: "kernel_config_data"
WARNING: could not find MAGIC_START!
WARNING: cannot read linux_banner string
crash: /usr/lib/debug/lib/modules/6.1.93-std-def-alt1/vmlinux and /proc/kcore do not match!

Usage:

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

Enter "crash -h" for details.

On Linux 6.6.33 the same crash works successfully.

root@i586:/.in# crash

crash 8.0.5-alt2
Copyright (C) 2002-2024  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-2024  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 "i686-pc-linux-gnu".
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"...

warning: /usr/src/.gdbinit: Success

WARNING: not using untrusted file: "/usr/src/.gdbinit"

crash: read error: kernel virtual address: c1baf6e8  type: "kernel_config_data"
WARNING: cannot determine hardirq_ctx addresses
WARNING: cannot determine softirq_ctx addresses
      KERNEL: /usr/lib/debug/lib/modules/6.6.33-un-def-alt1/vmlinux
    DUMPFILE: /proc/kcore
        CPUS: 8
        DATE: Sat Jun 15 18:17:51 UTC 2024
      UPTIME: 00:00:13
LOAD AVERAGE: 0.15, 0.03, 0.01
       TASKS: 134
    NODENAME: (none)
     RELEASE: 6.6.33-un-def-alt1
     VERSION: #1 SMP PREEMPT_DYNAMIC Wed Jun 12 12:18:16 UTC 2024
     MACHINE: i686  (2808 Mhz)
      MEMORY: 2 GB
         PID: 162
     COMMAND: "crash"
        TASK: c43d0000  [THREAD_INFO: c43d0000]
         CPU: 6
       STATE: TASK_RUNNING (ACTIVE)

crash>

Do you have an idea what this could be?

Tail of the log with additional debugging:

root@i586:~# crash -d 9
...
Type "apropos word" to search for commands related to "word"...

warning: /usr/src/.gdbinit: Success
GETBUF(176 -> 0)
  GETBUF(1500 -> 1)

  FREEBUF(1)
FREEBUF(0)
WARNING: not using untrusted file: "/usr/src/.gdbinit"
/dev/mem: Operation not permitted

<readmem: c1b57188, KVADDR, "kernel_config_data", 32768, (ROE), 2ccdfd0>
<read_dev_mem: addr: c1b57188 paddr: 1b57188 cnt: 3704>
crash: read(/dev/mem, 1b57188, 0): 3704 (ffffffff)
crash: read error: kernel virtual address: c1b57188  type: "kernel_config_data"
/dev/mem: Operation not permitted
<readmem: ff000, PHYSADDR, "devmem_is_allowed - pfn 255", 4, (ROE|Q|NDS), bfa12f5c>
<read_dev_mem: addr: ff000 paddr: ff000 cnt: 4>
<readmem: 101000, PHYSADDR, "devmem_is_allowed - pfn 257", 4, (ROE|Q|NDS), bfa12f5c>
<read_dev_mem: addr: 101000 paddr: 101000 cnt: 4>
crash: read(/dev/mem, 101000, 0): 4 (ffffffff)
crash: read error: physical address: 101000  type: "devmem_is_allowed - pfn 257"
/dev/mem: Operation not permitted
<readmem: c23c5cc0, KVADDR, "devmem_is_allowed - jiffies", 4, (ROE|Q|NDS), bfa12f5c>
<read_dev_mem: addr: c23c5cc0 paddr: 23c5cc0 cnt: 4>
crash: read(/dev/mem, 23c5cc0, 0): 4 (ffffffff)
crash: read error: kernel virtual address: c23c5cc0  type: "devmem_is_allowed - jiffies"
crash: this kernel may be configured with CONFIG_STRICT_DEVMEM, which
       renders /dev/mem unusable as a live memory source.
crash: trying /proc/kcore as an alternative to /dev/mem

<readmem: c1b57188, KVADDR, "kernel_config_data", 32768, (ROE), 2ccdfd0>
<read_proc_kcore: addr: c1b57188 paddr: 1b57188 cnt: 3704>
<read_proc_kcore: addr: c1b58000 paddr: 1b58000 cnt: 4096>
<read_proc_kcore: addr: c1b59000 paddr: 1b59000 cnt: 4096>
<read_proc_kcore: addr: c1b5a000 paddr: 1b5a000 cnt: 4096>
<read_proc_kcore: addr: c1b5b000 paddr: 1b5b000 cnt: 4096>
<read_proc_kcore: addr: c1b5c000 paddr: 1b5c000 cnt: 4096>
<read_proc_kcore: addr: c1b5d000 paddr: 1b5d000 cnt: 4096>
<read_proc_kcore: addr: c1b5e000 paddr: 1b5e000 cnt: 4096>
<read_proc_kcore: addr: c1b5f000 paddr: 1b5f000 cnt: 392>
<readmem: c1b57180, KVADDR, "kernel_config_data MAGIC_START", 8, (ROE), bfa13048>
<read_proc_kcore: addr: c1b57180 paddr: 1b57180 cnt: 8>
WARNING: could not find MAGIC_START!
GETBUF(4 -> 0)
<readmem: c251d96c, KVADDR, "possible", 4, (ROE), 1060080>
<read_proc_kcore: addr: c251d96c paddr: 251d96c cnt: 4>
cpu_possible_mask: cpus: (none)
<readmem: c251d964, KVADDR, "present", 4, (ROE), 1060080>
<read_proc_kcore: addr: c251d964 paddr: 251d964 cnt: 4>
 cpu_present_mask: cpus: (none)
<readmem: c251d968, KVADDR, "online", 4, (ROE), 1060080>
<read_proc_kcore: addr: c251d968 paddr: 251d968 cnt: 4>
  cpu_online_mask: cpus: (none)
<readmem: c251d960, KVADDR, "active", 4, (ROE), 1060080>
<read_proc_kcore: addr: c251d960 paddr: 251d960 cnt: 4>
  cpu_active_mask: cpus: (none)
FREEBUF(0)
<readmem: c2672108, KVADDR, "shadow_timekeeper xtime_sec", 8, (ROE), bfa11990>
<read_proc_kcore: addr: c2672108 paddr: 2672108 cnt: 8>
xtime timespec.tv_sec: 0: Thu Jan  1 00:00:00 UTC 1970
<readmem: c24f0b00, KVADDR, "init_uts_ns", 390, (ROE), 105c1fc>
<read_proc_kcore: addr: c24f0b00 paddr: 24f0b00 cnt: 390>
utsname:
     sysname:
    nodename:
     release:
     version:
     machine:
  domainname:
base kernel version: 0.0.0
GETBUF(176 -> 0)
FREEBUF(0)
<readmem: c1c22dc0, KVADDR, "accessible check", 4, (ROE|Q), bfa0f680>
<read_proc_kcore: addr: c1c22dc0 paddr: 1c22dc0 cnt: 4>
<readmem: c1c22dc0, KVADDR, "read_string characters", 1499, (ROE|Q), bfa1023c>
<read_proc_kcore: addr: c1c22dc0 paddr: 1c22dc0 cnt: 576>
<read_proc_kcore: addr: c1c23000 paddr: 1c23000 cnt: 923>
WARNING: cannot read linux_banner string
/proc/version:
Linux version 6.1.93-std-def-alt1 (builder@localhost.localdomain) (gcc-13 (GCC) 13.2.1 20240128 (ALT Sisyphus 13.2.1-alt3), GNU ld (GNU Binutils) 2.41.0.20230826) #1 SMP PREEMPT_DYNAMIC Wed Jun 12 12:25:00 UTC 2024
linux_banner:

crash: /usr/lib/debug/lib/modules/6.1.93-std-def-alt1/vmlinux and /proc/kcore do not match!

Usage:

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

Enter "crash -h" for details.

ps. I also tested on Linux 6.8.12 and 6.9.4 and the same crash starts OK on these.