Skip to content

Add crash 7.2.6 #1199

Merged
merged 2 commits into from
Aug 19, 2019
Merged

Add crash 7.2.6 #1199

merged 2 commits into from
Aug 19, 2019

Conversation

pmenzel
Copy link
Collaborator

@pmenzel pmenzel commented Aug 14, 2019

No description provided.

[Description][1]:

> The core analysis suite is a self-contained tool that can be used to
> investigate either live systems, kernel core dumps created from dump
> creation facilities such as kdump, kvmdump, xendump, the netdump and
> diskdump packages offered by Red Hat, the LKCD kernel patch, the mcore
> kernel patch created by Mission Critical Linux, as well as other formats
> created by manufacturer-specific firmware.

[1]: https://github.com/crash-utility/crash
Fix the [error][1] below.

    [BEE] make -j120 install PREFIX=/usr EPREFIX=/usr BINDIR=/usr/bin SBINDIR=/usr/sbin LIBEXECDIR=/usr/libexec SYSCONFDIR=/etc SHAREDSTATEDIR=/var LOCALSTATEDIR=/var LIBDIR=/usr/lib INCLUDEDIR=/usr/include DATAROOTDIR=/usr/share DATADIR=/usr/share INFODIR=/usr/share/info LOCALEDIR=/usr/share/locale MANDIR=/usr/share/man DOCDIR=/usr/share/doc/crash DESTDIR=/dev/shm/bee-root/crash/crash-7.2.6-0/image
    /usr/bin/install crash /dev/shm/bee-root/crash/crash-7.2.6-0/image/usr/bin
    /usr/bin/install: cannot create regular file '/dev/shm/bee-root/crash/crash-7.2.6-0/image/usr/bin': No such file or directory
    make: *** [Makefile:306: install] Error 1
    Command exited with non-zero status 2

[1]: https://github.com/crash-utility/crash/pull/37
@donald
Copy link
Collaborator

donald commented Aug 19, 2019

The supposed missing memory at 0xffffffffa0000000 in our crash dumps is the vmalloc area. All physical pages are mapped to virtual pages at 0xffff880000000000 and this is in the crash dump. However, vmalloc() allocates continuous virtual address space and set up the page table to map the physical pages a second time at these virtual adresses. To assist in analyzing this, kdump writes some data into note section in the crash dump file. However, gdb alone does not interpret this information, so 0xffffffffa0000000 is not accessible.

One important user of vmalloc is the loader for dynamic modules. So everything stored in sections of loaded modules is not directly available in gdb. This is why so many pointers seem to be invalid when just using gdb on a vmcore.

However, "crash" does interpret this additional information and fixes up the address space for gdb:

buczek@dose:/scratch/local/linux (master)$ gdb vmlinux /var/crash.vmcore
[...]
(gdb) list_fs
$1 = (struct file_system_type *) 0xffffffff8249eec0 <sysfs_fs_type>
(struct file_system_type *) 0xffffffff8249eec0 : sysfs
(struct file_system_type *) 0xffffffff82479fe0 : tmpfs
(struct file_system_type *) 0xffffffff82498300 : bdev
(struct file_system_type *) 0xffffffff8249eb60 : proc
(struct file_system_type *) 0xffffffff82464540 : cgroup
(struct file_system_type *) 0xffffffff82464820 : cgroup2
(struct file_system_type *) 0xffffffff824644e0 : cpuset
(struct file_system_type *) 0xffffffff824dbb40 : devtmpfs
(struct file_system_type *) 0xffffffff8249d800 : binfmt_misc
(struct file_system_type *) 0xffffffff824be800 : debugfs
(struct file_system_type *) 0xffffffff824be860 : tracefs
(struct file_system_type *) 0xffffffff824c24e0 : securityfs
(struct file_system_type *) 0xffffffff8252e8c0 : sockfs
(struct file_system_type *) 0xffffffff82472a00 : bpf
(struct file_system_type *) 0xffffffff8248d0c0 : pipefs
(struct file_system_type *) 0xffffffff824a1000 : ramfs
(struct file_system_type *) 0xffffffff824a1060 : hugetlbfs
(struct file_system_type *) 0xffffffff8249ef20 : devpts
(struct file_system_type *) 0xffffffff824a0ca0 : reiserfs
(struct file_system_type *) 0xffffffff824a0fa0 : ext2
(struct file_system_type *) 0xffffffff824bd0a0 : xfs
(struct file_system_type *) 0xffffffff824c14a0 : mqueue
(struct file_system_type *) 0xffffffffa0009000 : Cannot access memory at address 0xffffffffa0009000
(gdb) quit

buczek@dose:/scratch/local/linux (master)$ crash vmlinux /var/crash.vmcore
[...]
crash> gdb list_fs
$1 = (struct file_system_type *) 0xffffffff8249eec0 <sysfs_fs_type>
(struct file_system_type *) 0xffffffff8249eec0 : sysfs
(struct file_system_type *) 0xffffffff82479fe0 : tmpfs
(struct file_system_type *) 0xffffffff82498300 : bdev
(struct file_system_type *) 0xffffffff8249eb60 : proc
(struct file_system_type *) 0xffffffff82464540 : cgroup
(struct file_system_type *) 0xffffffff82464820 : cgroup2
(struct file_system_type *) 0xffffffff824644e0 : cpuset
(struct file_system_type *) 0xffffffff824dbb40 : devtmpfs
(struct file_system_type *) 0xffffffff8249d800 : binfmt_misc
(struct file_system_type *) 0xffffffff824be800 : debugfs
(struct file_system_type *) 0xffffffff824be860 : tracefs
(struct file_system_type *) 0xffffffff824c24e0 : securityfs
(struct file_system_type *) 0xffffffff8252e8c0 : sockfs
(struct file_system_type *) 0xffffffff82472a00 : bpf
(struct file_system_type *) 0xffffffff8248d0c0 : pipefs
(struct file_system_type *) 0xffffffff824a1000 : ramfs
(struct file_system_type *) 0xffffffff824a1060 : hugetlbfs
(struct file_system_type *) 0xffffffff8249ef20 : devpts
(struct file_system_type *) 0xffffffff824a0ca0 : reiserfs
(struct file_system_type *) 0xffffffff824a0fa0 : ext2
(struct file_system_type *) 0xffffffff824bd0a0 : xfs
(struct file_system_type *) 0xffffffff824c14a0 : mqueue
(struct file_system_type *) 0xffffffffa0009000 : autofs
(struct file_system_type *) 0xffffffffa011fe60 : rpc_pipefs
(struct file_system_type *) 0xffffffffa01b92c0 : nfsd
(struct file_system_type *) 0xffffffffa03b7220 : nfs
(struct file_system_type *) 0xffffffffa03b7160 : nfs4
crash>

( list_fs is my own macro to walk the list of file systems ).

So this is definitely a useful tool for crash analysis. I'll merge and install on distmaster, because you are on vacation. Thanks.

@donald donald merged commit a1881fe into master Aug 19, 2019
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants