[Crash-utility] Crash issues with ARM aarch64 on a live system

Dave Anderson anderson at redhat.com
Thu May 21 13:09:45 UTC 2020



----- Original Message -----
> On Wed, May 20, 2020 at 10:19 PM Siamak Nazari <siamaknazari at yahoo.com>
> wrote:
> >
> > Apologies if this the wrong place to ask this question. If in fact this is
> > the wrong alias to post this question, appreciate a pointer in the right
> > direction. We have been trying to get crash working on a live kernel
> > (aarch64) but have not been able to.
> >
> > Based on the crash help text:
> >
> > --machdep option=value
> >     Pass an option and value pair to machine-dependent code.  These
> >     architecture-specific option/pairs should only be required in
> >     very rare circumstances:
> >
> >     ARM64:
> >       phys_offset=<physical-address>
> >       kimage_voffset=<kimage_voffset-value>
> >       max_physmem_bits=<value>
> >       vabits_actual=<value>
> >
> > We probably need to specify the proper values for phys_offset and
> > kimage_voffset. kimage_offset is in /proc/kallsyms, but not phys_offset.
> > It is just not clear where the values should come from. I did try using
> > the value of kimage_offset  found in /proc/kallsyms but that did not help.
> > It is not clear where one needs to get the values from (and in fact a
> > casual reading of the crash source seems to try to compute the values
> > automatically)
> >
> > Here is some additional information:
> >
> > # uname -a
> > Linux bringup 5.1.0 #1 SMP Fri Oct 11 17:01:55 UTC 2019 aarch64 GNU/Linux
> >
> > # crash -s
> > crash: /proc/kcore: No such file or directory
> 
> Seem like your kernel is not configured with CONFIG_PROC_KCORE (/proc/kcore support).
> With /proc/kcore you don't need to supply any additional options &
> values to crash.

Santosh is correct, with /proc/kcore things should just work.

On your system, it then tries /dev/mem, which needs help, including phys_offset.
You might try getting it from /proc/iomem, where on my arm64 system, phys_offset
is 0x4000000000:

  $ cat /proc/iomem
  ...
  7e890000-7e890fff : APMC0D60:02
  7e8d0000-7e8d0fff : APMC0D60:03
  7e940000-7e940fff : APMC0D5E:00
  4000000000-40001fffff : reserved
  4000200000-43fa59ffff : System RAM
    4000280000-40012effff : Kernel code
    40012f0000-40017fffff : reserved
    4001800000-4002ccffff : Kernel data
    40dfe00000-40e3dfffff : reserved
    40e3e00000-40ffdfffff : Crash kernel
    40ffff0000-40ffffffff : reserved
    41909d0000-41919cffff : reserved
    43909d0000-4393ffffff : reserved
    43f8750000-43f875ffff : reserved
  ...

Try adding that on the command line.

Dave


> 
> > WARNING: could not find MAGIC_START!
> > WARNING: cannot read linux_banner string
> > crash: /boot/vmlinux-5.1.0 and /dev/mem do not match!
> >
> > This is with additional debugging turned on:
> >
> > # ./crash --version
> >
> > crash 7.2.8++
> > Copyright (C) 2002-2020  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 "aarch64-unknown-linux-gnu".
> >
> > Here is crash running with -d flag:
> >
> > find_booted_kernel: check: /boot/vmlinux-5.1.0
> > find_booted_kernel: found: /boot/vmlinux-5.1.0
> > get_live_memory_source: /dev/mem
> > /proc/version:
> > Linux version 5.1.0 (oe-user at oe-host) (gcc version 7.3.0 (GCC)) #1 SMP Fri
> > Oct 11 17:01:55 UTC 2019
> > /boot/vmlinux-5.1.0:
> > Linux version 5.1.0 (oe-user at oe-host) (gcc version 7.3.0 (GCC)) #1 SMP Fri
> > Oct 11 17:01:55 UTC 2019
> > crash: /proc/kcore: No such file or directory
> > readmem: read_dev_mem() -> /dev/mem
> > VA_BITS: 48
> > kimage_voffset: fffeffff88000000
> > phys_offset: 0
> > physvirt_offset: 800000000000
> > gdb --quiet /boot/vmlinux-5.1.0
> > GETBUF(328 -> 0)fffeffc00fe00000
> >   GETBUF(1500 -> 1)
> >   FREEBUF(1)
> > FREEBUF(0)
> > <readmem: ffff0000109c63b8, KVADDR, "kernel_config_data", 32768, (ROE),
> > aaaad82d4630>
> > <read_dev_mem: addr: ffff0000109c63b8 paddr: 889c63b8 cnt: 3144>
> > <read_dev_mem: addr: ffff0000109c7000 paddr: 889c7000 cnt: 4096>
> > <read_dev_mem: addr: ffff0000109c8000 paddr: 889c8000 cnt: 4096>
> > <read_dev_mem: addr: ffff0000109c9000 paddr: 889c9000 cnt: 4096>
> > <read_dev_mem: addr: ffff0000109ca000 paddr: 889ca000 cnt: 4096>
> > <read_dev_mem: addr: ffff0000109cb000 paddr: 889cb000 cnt: 4096>
> > <read_dev_mem: addr: ffff0000109cc000 paddr: 889cc000 cnt: 4096>
> > <read_dev_mem: addr: ffff0000109cd000 paddr: 889cd000 cnt: 4096>
> > <read_dev_mem: addr: ffff0000109ce000 paddr: 889ce000 cnt: 952>
> > <readmem: ffff0000109c63b0, KVADDR, "kernel_config_data MAGIC_START", 8,
> > (ROE), ffffe6a6d5a0>
> > <read_dev_mem: addr: ffff0000109c63b0 paddr: 889c63b0 cnt: 8>
> > WARNING: could not find MAGIC_START!
> > GETBUF(328 -> 0)
> > FREEBUF(0)
> > GETBUF(8 -> 0)
> > <readmem: ffff000010e1c6d8, KVADDR, "possible", 8, (ROE|Q), aaaacd15f258>
> > <read_dev_mem: addr: ffff000010e1c6d8 paddr: 88e1c6d8 cnt: 8>
> > cpu_possible_mask: cpus: (none)
> > <readmem: ffff000010e1c6d0, KVADDR, "present", 8, (ROE|Q), aaaacd15f258>
> > <read_dev_mem: addr: ffff000010e1c6d0 paddr: 88e1c6d0 cnt: 8>
> >  cpu_present_mask: cpus: (none)
> > <readmem: ffff000010e1c6c8, KVADDR, "online", 8, (ROE|Q), aaaacd15f258>
> > <read_dev_mem: addr: ffff000010e1c6c8 paddr: 88e1c6c8 cnt: 8>
> >   cpu_online_mask: cpus: (none)
> > <readmem: ffff000010e1c6e0, KVADDR, "active", 8, (ROE|Q), aaaacd15f258>
> > <read_dev_mem: addr: ffff000010e1c6e0 paddr: 88e1c6e0 cnt: 8>
> >   cpu_active_mask: cpus: (none)
> > FREEBUF(0)
> > GETBUF(328 -> 0)
> > FREEBUF(0)
> > GETBUF(328 -> 0)
> > FREEBUF(0)
> > GETBUF(328 -> 0)
> > FREEBUF(0)
> > <readmem: ffff000010ef8150, KVADDR, "shadow_timekeeper xtime_sec", 8,
> > (ROE), ffffe6a650b8>
> > <read_dev_mem: addr: ffff000010ef8150 paddr: 88ef8150 cnt: 8>
> > xtime timespec.tv_sec: 0: Wed Dec 31 16:00:00 1969
> > <readmem: ffff000010e2533c, KVADDR, "init_uts_ns", 390, (ROE),
> > aaaacd0fd194>
> > <read_dev_mem: addr: ffff000010e2533c paddr: 88e2533c cnt: 390>
> > utsname:
> >      sysname:
> >     nodename:
> >      release:
> >      version:
> >      machine:
> >   domainname:
> > base kernel version: 0.0.0
> > <readmem: ffff0000109b0098, KVADDR, "accessible check", 8, (ROE|Q),
> > ffffe6a64770>
> > <read_dev_mem: addr: ffff0000109b0098 paddr: 889b0098 cnt: 8>
> > <readmem: ffff0000109b0098, KVADDR, "read_string characters", 1499,
> > (ROE|Q), ffffe6a64ae8>
> > <read_dev_mem: addr: ffff0000109b0098 paddr: 889b0098 cnt: 1499>
> > WARNING: cannot read linux_banner string
> > /proc/version:
> > Linux version 5.1.0 (oe-user at oe-host) (gcc version 7.3.0 (GCC)) #1 SMP Fri
> > Oct 11 17:01:55 UTC 2019
> > linux_banner:
> >
> > crash: /boot/vmlinux-5.1.0 and /dev/mem do not match!
> >
> >
> >
> >
> > --
> > Crash-utility mailing list
> > Crash-utility at redhat.com
> > https://www.redhat.com/mailman/listinfo/crash-utility
> 
> 
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
> 




More information about the Crash-utility mailing list