Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

it cannot determine VA_BITS_ACTUAL on Linux 5.4 for ARM64 #52

Open
figozhang opened this issue Mar 31, 2020 · 7 comments
Open

it cannot determine VA_BITS_ACTUAL on Linux 5.4 for ARM64 #52

figozhang opened this issue Mar 31, 2020 · 7 comments

Comments

@figozhang
Copy link

i am using Linux 5.4 kernel, and found that there is a issue on crash.

root@ubuntu:~# crash /mnt/dump.202003310331 /usr/src/linux/vmlinux

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.

crash: cannot determine VA_BITS_ACTUAL

root@ubuntu:~#

i enable the debug message:
root@ubuntu:~# crash /mnt/dump.202003310331 -d 12 /usr/src/linux/vmlinux

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.

compressed kdump: header->utsname.machine: aarch64
compressed kdump: memory bitmap offset: 2000
diskdump_data:
filename: /mnt/dump.202003310331
flags: 6 (KDUMP_CMPRS_LOCAL|ERROR_EXCLUDED)
dfd: 3
ofp: 0
machine_type: 183 (EM_AARCH64)

        header: aaaafcd11150
       signature: "KDUMP   "
  header_version: 6
         utsname:
           sysname: Linux
          nodename: ubuntu
           release: 5.4.0+
           version: #14 SMP Sun Mar 29 02:05:34 PDT 2020
           machine: aarch64
        domainname: (none)
       timestamp:
            tv_sec: 5e82b92c
           tv_usec: 0
          status: 1 (DUMP_DH_COMPRESSED_ZLIB)
      block_size: 4096
    sub_hdr_size: 1
   bitmap_blocks: 28
       max_mapnr: 458752
total_ram_blocks: 0
   device_blocks: 0
  written_blocks: 0
     current_cpu: 0
         nr_cpus: 4
  tasks[nr_cpus]: 0
                  0
                  0
                  0

    sub_header: 0 (n/a)

sub_header_kdump: aaaafcd12160
phys_base: 40000000
dump_level: 31 (0x1f) (DUMP_EXCLUDE_ZERO|DUMP_EXCLUDE_CACHE|DUMP_EXCLUDE_CACHE_PRI|DUMP_EXCLUDE_USER_DATA|DUMP_EXCLUDE_FREE)
split: 0
start_pfn: (unused)
end_pfn: (unused)
offset_vmcoreinfo: 5872 (0x16f0)
size_vmcoreinfo: 1875 (0x753)
OSRELEASE=5.4.0+
PAGESIZE=4096
SYMBOL(init_uts_ns)=ffff8000116a3368
SYMBOL(node_online_map)=ffff80001169ac78
SYMBOL(swapper_pg_dir)=ffff80001156f000
SYMBOL(_stext)=ffff800010081000
SYMBOL(vmap_area_list)=ffff8000116e1300
SYMBOL(mem_section)=ffff00002bdf1f00
LENGTH(mem_section)=2048
SIZE(mem_section)=32
OFFSET(mem_section.section_mem_map)=0
SIZE(page)=64
SIZE(pglist_data)=4352
SIZE(zone)=1664
SIZE(free_area)=104
SIZE(list_head)=16
SIZE(nodemask_t)=8
OFFSET(page.flags)=0
OFFSET(page._refcount)=52
OFFSET(page.mapping)=24
OFFSET(page.lru)=8
OFFSET(page._mapcount)=48
OFFSET(page.private)=40
OFFSET(page.compound_dtor)=16
OFFSET(page.compound_order)=17
OFFSET(page.compound_head)=8
OFFSET(pglist_data.node_zones)=0
OFFSET(pglist_data.nr_zones)=3616
OFFSET(pglist_data.node_start_pfn)=3624
OFFSET(pglist_data.node_spanned_pages)=3640
OFFSET(pglist_data.node_id)=3648
OFFSET(zone.free_area)=192
OFFSET(zone.vm_stat)=1472
OFFSET(zone.spanned_pages)=96
OFFSET(free_area.free_list)=0
OFFSET(list_head.next)=0
OFFSET(list_head.prev)=8
OFFSET(vmap_area.va_start)=0
OFFSET(vmap_area.list)=40
LENGTH(zone.free_area)=11
SYMBOL(log_buf)=ffff8000116bb240
SYMBOL(log_buf_len)=ffff8000116bb248
SYMBOL(log_first_idx)=ffff800011794408
SYMBOL(clear_idx)=ffff800011794440
SYMBOL(log_next_idx)=ffff800011794418
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)=6
NUMBER(NR_FREE_PAGES)=0
NUMBER(PG_lru)=4
NUMBER(PG_private)=13
NUMBER(PG_swapcache)=10
NUMBER(PG_swapbacked)=19
NUMBER(PG_slab)=9
NUMBER(PG_hwpoison)=22
NUMBER(PG_head_mask)=65536
NUMBER(PAGE_BUDDY_MAPCOUNT_VALUE)=-129
NUMBER(HUGETLB_PAGE_DTOR)=2
NUMBER(PAGE_OFFLINE_MAPCOUNT_VALUE)=-257
NUMBER(VA_BITS)=48
NUMBER(kimage_voffset)=0xffff7fffd0000000
NUMBER(PHYS_OFFSET)=0x40000000
KERNELOFFSET=0
CRASHTIME=1585625388
offset_note: 4200 (0x1068)
size_note: 3548 (0xddc)
notes_buf: aaaafcd4b190
num_vmcoredd_notes: 0
num_prstatus_notes: 4
notes[0]: aaaafcd4b190 (NT_PRSTATUS)
si.signo: 0 si.code: 0 si.errno: 0
cursig: 0 sigpend: 0 sighold: 0
pid: 0 ppid: 0 pgrp: 0 sid:0
utime: 0.000000 stime: 0.000000
cutime: 0.000000 cstime: 0.000000
X0: 00000000000000e0 X1: 4c8d7d360216aa00 X2: 4c8d7d360216aa00
X3: ffff00002bd7e6a0 X4: 0000000000000000 X5: 0000000000000000
X6: 0000000000000000 X7: 0000000000000000 X8: ffff8000116a4bc0
X9: ffff800011693de0 X10: 00000000000009e0 X11: 0000000000000000
X12: 0000000000000000 X13: 0000000000000000 X14: 0000000000000000
X15: 0000000000000000 X16: 0000000000000000 X17: 0000000000000000
X18: 0000000000000000 X19: ffff800011607000 X20: 0000000000000000
X21: 0000000048000000 X22: 0000000000000000 X23: 0000000000000000
X24: 0000000000000000 X25: 0000000000000000 X26: 0000000000000000
X27: 0000000000000000 X28: 0000000041570018 X29: ffff800011693e50
LR: ffff80001008f5d0 SP: ffff800011693e50 PC: ffff80001008f644
PSTATE: 60000005 FPVALID: 00000000
notes[1]: aaaafcd4b32c (NT_PRSTATUS)
si.signo: 0 si.code: 0 si.errno: 0
cursig: 0 sigpend: 0 sighold: 0
pid: 0 ppid: 0 pgrp: 0 sid:0
utime: 0.000000 stime: 0.000000
cutime: 0.000000 cstime: 0.000000
X0: 00000000000000e0 X1: 1784968832808700 X2: 1784968832808700
X3: ffff00002bda06a0 X4: 0000000000000000 X5: ffff800010262cac
X6: 0000000000000000 X7: 0000000000000000 X8: ffff00002a5a5040
X9: ffff00002a5b7e40 X10: 00000000000009e0 X11: 0000000000000000
X12: 00001e8480000000 X13: 003d088b9f27daac X14: 000000005b8048cf
X15: 0000000000000000 X16: 0000000000000000 X17: 0000000000000000
X18: 0000000000000000 X19: 0000000000000000 X20: 0000000000000000
X21: 0000000000000000 X22: 0000000000000000 X23: 0000000000000000
X24: 0000000000000000 X25: 0000000000000000 X26: 0000000000000000
X27: 0000000000000000 X28: 0000000000000000 X29: ffff00002a5b7eb0
LR: ffff80001008f5d0 SP: ffff00002a5b7eb0 PC: ffff80001008f644
PSTATE: 60000005 FPVALID: 00000000
notes[2]: aaaafcd4b4c8 (NT_PRSTATUS)
si.signo: 0 si.code: 0 si.errno: 0
cursig: 0 sigpend: 0 sighold: 0
pid: 0 ppid: 0 pgrp: 0 sid:0
utime: 0.000000 stime: 0.000000
cutime: 0.000000 cstime: 0.000000
X0: 00000000000000e0 X1: 6092186060fd2600 X2: 6092186060fd2600
X3: ffff00002bdc26a0 X4: 0000000000000000 X5: ffff800010262cac
X6: 0000000000000000 X7: 0000000000000000 X8: ffff00002a5a6c40
X9: ffff00002a5bbe40 X10: 00000000000009e0 X11: 0000000000000000
X12: 0000000000000000 X13: 0000000000000000 X14: 0000000000000000
X15: 0000000000000000 X16: 0000000000000000 X17: 0000000000000000
X18: 0000000000000000 X19: 0000000000000000 X20: 0000000000000000
X21: 0000000000000000 X22: 0000000000000000 X23: 0000000000000000
X24: 0000000000000000 X25: 0000000000000000 X26: 0000000000000000
X27: 0000000000000000 X28: 0000000000000000 X29: ffff00002a5bbeb0
LR: ffff80001008f5d0 SP: ffff00002a5bbeb0 PC: ffff80001008f644
PSTATE: 60000005 FPVALID: 00000000
notes[3]: aaaafcd4b664 (NT_PRSTATUS)
si.signo: 0 si.code: 0 si.errno: 0
cursig: 0 sigpend: 0 sighold: 0
pid: 611 ppid: 0 pgrp: 0 sid:0
utime: 0.000000 stime: 0.000000
cutime: 0.000000 cstime: 0.000000
X0: 0000000000000000 X1: 0000000000000000 X2: ffff0000218b7938
X3: 0000000000000000 X4: ffff8000116c62b8 X5: 0000000000000000
X6: ffff00002a435f00 X7: 0720072007200720 X8: 0720072007200720
X9: 0720072007200720 X10: 0720072007200720 X11: 0720072007200720
X12: 0720072007200720 X13: 0720072007200720 X14: 0720072007200720
X15: 0000000000000000 X16: 0000000000000000 X17: 0000000000000000
X18: 0000000000000000 X19: 0000000000000000 X20: ffff80001a761000
X21: 00000000ffffffff X22: 0000ffffb51997e0 X23: 0000000020001000
X24: 0000000000000015 X25: 0000000056000000 X26: 0000000000000000
X27: 0000000000000000 X28: ffff000021934600 X29: ffff0000218b78e0
LR: ffff8000102b3b44 SP: ffff0000218b78e0 PC: ffff8000102b1af0
PSTATE: 60000085 FPVALID: 00000000
snapshot_task: 0
num_qemu_notes: 0
NOTE offsets: 1068 (NT_PRSTATUS)
1204 (NT_PRSTATUS)
13a0 (NT_PRSTATUS)
153c (NT_PRSTATUS)
offset_eraseinfo: 0 (0x0)
size_eraseinfo: 0 (0x0)
start_pfn_64: (unused)
end_pfn_64: (unused)
max_mapnr_64: 458752 (0x70000)

   data_offset: 1e000
    block_size: 4096
   block_shift: 12
        bitmap: aaaafcd13170
    bitmap_len: 114688
     max_mapnr: 458752 (0x70000)

dumpable_bitmap: aaaafcd2f180
byte: 0
bit: 0
compressed_page: aaaafcd74560
curbufptr: 0

page_cache_hdr[0]:
pg_flags: 0 ()
pg_addr: 0
pg_bufptr: aaaafcd64550
pg_hit_count: 0
page_cache_hdr[1]:
pg_flags: 0 ()
pg_addr: 0
pg_bufptr: aaaafcd65550
pg_hit_count: 0
page_cache_hdr[2]:
pg_flags: 0 ()
pg_addr: 0
pg_bufptr: aaaafcd66550
pg_hit_count: 0
page_cache_hdr[3]:
pg_flags: 0 ()
pg_addr: 0
pg_bufptr: aaaafcd67550
pg_hit_count: 0
page_cache_hdr[4]:
pg_flags: 0 ()
pg_addr: 0
pg_bufptr: aaaafcd68550
pg_hit_count: 0
page_cache_hdr[5]:
pg_flags: 0 ()
pg_addr: 0
pg_bufptr: aaaafcd69550
pg_hit_count: 0
page_cache_hdr[6]:
pg_flags: 0 ()
pg_addr: 0
pg_bufptr: aaaafcd6a550
pg_hit_count: 0
page_cache_hdr[7]:
pg_flags: 0 ()
pg_addr: 0
pg_bufptr: aaaafcd6b550
pg_hit_count: 0
page_cache_hdr[8]:
pg_flags: 0 ()
pg_addr: 0
pg_bufptr: aaaafcd6c550
pg_hit_count: 0
page_cache_hdr[9]:
pg_flags: 0 ()
pg_addr: 0
pg_bufptr: aaaafcd6d550
pg_hit_count: 0
page_cache_hdr[10]:
pg_flags: 0 ()
pg_addr: 0
pg_bufptr: aaaafcd6e550
pg_hit_count: 0
page_cache_hdr[11]:
pg_flags: 0 ()
pg_addr: 0
pg_bufptr: aaaafcd6f550
pg_hit_count: 0
page_cache_hdr[12]:
pg_flags: 0 ()
pg_addr: 0
pg_bufptr: aaaafcd70550
pg_hit_count: 0
page_cache_hdr[13]:
pg_flags: 0 ()
pg_addr: 0
pg_bufptr: aaaafcd71550
pg_hit_count: 0
page_cache_hdr[14]:
pg_flags: 0 ()
pg_addr: 0
pg_bufptr: aaaafcd72550
pg_hit_count: 0
page_cache_hdr[15]:
pg_flags: 0 ()
pg_addr: 0
pg_bufptr: aaaafcd73550
pg_hit_count: 0

page_cache_buf: aaaafcd64550
   evict_index: 0
     evictions: 0
      accesses: 0
  cached_reads: 0 
   valid_pages: aaaafcd641c0

readmem: read_diskdump()
crash: pv_ops exists: ARCH_PVOPS

crash: cannot determine VA_BITS_ACTUAL

root@ubuntu:~#

@crash-utility
Copy link
Collaborator

crash-utility commented Mar 31, 2020 via email

@figozhang
Copy link
Author

figozhang commented Apr 1, 2020

@figozhang
Copy link
Author

my question is the crash code should check the kernel version before you add "TCR_EL1.T1SZ"?

@crash-utility
Copy link
Collaborator

crash-utility commented Apr 1, 2020 via email

@crash-utility
Copy link
Collaborator

crash-utility commented Apr 1, 2020 via email

@crash-utility
Copy link
Collaborator

I don't know if this will help your cause, but I just checked this patch in:

d379b47

Introduce a new ARM64 "--machdep vabits_actual=" command
line option for Linux 5.4 and later dumpfiles, which require the
kernel's dynamically-determined "vabits_actual" value for virtual
address translation. Without the patch, the crash session fails
during initialization with the error message "crash: cannot determine
VA_BITS_ACTUAL". This option will become unnecessary when the
proposed TCR_EL1.T1SZ vmcoreinfo entry entry is incorporated into
the kernel.
([email protected])

Here's an attempt on a compressed kdump dumpfile from a 5.6.0-rc7 based kernel:

$ ./crash vmlinux vmcore

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.

crash: cannot determine VA_BITS_ACTUAL

$

And then here with the new option:

$ ./crash vmlinux vmcore --machdep vabits_actual=48

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.

NOTE: setting vabits_actual to: 48

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"...

    KERNEL: vmlinux                           
  DUMPFILE: vmcore
      CPUS: 8 [OFFLINE: 1]
      DATE: Thu Apr  2 08:22:17 2020
    UPTIME: 00:00:58

LOAD AVERAGE: 1.45, 0.51, 0.18
TASKS: 222
NODENAME: apm-mustang-ev3-07.khw2.lab.eng.bos.redhat.com
RELEASE: 5.6.0-0.rc7.1.elrdy.aarch64
VERSION: #1 SMP Mon Mar 30 18:59:14 UTC 2020
MACHINE: aarch64 (unknown Mhz)
MEMORY: 16 GB
PANIC: "Unable to handle kernel NULL pointer dereference at virtual address 0000000000000038"
PID: 1622
COMMAND: "bash"
TASK: ffff0003c0f9ed00 [THREAD_INFO: ffff0003c0f9ed00]
CPU: 1
STATE: TASK_RUNNING (PANIC)

crash>

@figozhang
Copy link
Author

great! it woks for me, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant