Bug 1379192

Summary: Crash can't open vmcore captured by kdump
Product: [Fedora] Fedora Reporter: Tong Li <tonli>
Component: crashAssignee: Dave Anderson <anderson>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: anderson, kdump-team-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-14 19:56:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1377567    
Bug Blocks:    

Description Tong Li 2016-09-26 01:57:46 UTC
Description of problem:

Crash can't open vmcore captured by kdump so that we can't perform debugging operations after a successful kdump.

Version-Release number of selected component (if applicable):

crash-7.1.5-2.fc25.x86_64
kernel-core-4.8.0-0.rc7.git0.1.fc26.x86_64 (patched to make kdump work)

How reproducible:


Steps to Reproduce:
1. Run 'echo c > /proc/sysrq-trigger' to get a kdump vmcore
2. crash /path/to/vmlinux /path/to/vmcore
3.

Actual results:

crash: page excluded: kernel virtual address: ffffffff81fdc940  type: "possible"
WARNING: cannot read cpu_possible_map
crash: page excluded: kernel virtual address: ffffffff81fdc140  type: "present"
WARNING: cannot read cpu_present_map
crash: page excluded: kernel virtual address: ffffffff81fdc540  type: "online"
WARNING: cannot read cpu_online_map
crash: page excluded: kernel virtual address: ffffffff81fdbd40  type: "active"
WARNING: cannot read cpu_active_map
crash: page excluded: kernel virtual address: ffffffff81e24090  type: "pv_init_ops"
crash: page excluded: kernel virtual address: ffffffff83195df0  type: "shadow_timekeeper xtime_sec"
crash: page excluded: kernel virtual address: ffffffff81e0d304  type: "init_uts_ns"
crash: /usr/lib/debug/lib/modules/4.8.0-0.rc7.git2.1.fc26.x86_64/vmlinux and /var/crash/127.0.0.1-2016-09-23-10:42:18/vmcore do not match!

Expected results:

crash loads vmcore without error and give out a debug shell.


Additional info:

Building crash from master branch on github can solve this problem. https://github.com/crash-utility/crash

Comment 1 Dave Anderson 2016-09-26 13:33:01 UTC
I'm hoping to do a Rawhide rebase in the next couple of weeks.

The issue you're seeing is a due to the new CONFIG_RANDOMIZE_MEMORY
configuration, which I fixed in the upstream crash repo last Wednesday:

https://github.com/crash-utility/crash/commit/da79c1bffc287309ecebc9fe40f0a3cdf5a5d26d

  commit da79c1bffc287309ecebc9fe40f0a3cdf5a5d26d
  Author: Dave Anderson <anderson>
  Date:   Wed Sep 21 15:58:22 2016 -0400

    Fix to recognize and support x86_64 Linux 4.8-rc1 and later kernels
    that are configured with CONFIG_RANDOMIZE_MEMORY, which randomizes
    the base addresses of the kernel's unity-map address (PAGE_OFFSET),
    and the vmalloc region.  Without the patch, the crash utility fails
    with a segmentation violation during session initialization.
    (anderson)

Also, Fedora's 4.8.0 kernel also introduced CONFIG_HARDENED_USERCOPY, 
which will prevent crash from working on a live system.  However, that
will require a kernel patch to the /dev/crash driver to fix it.  I have
forwarded a patch to Josh Boyer (the Fedora kernel maintainer) last
Thursday (?), and it should appear in Fedora kernels in the near future.

Comment 2 Dave Anderson 2016-10-14 19:56:08 UTC
- Fedora Rawhide build: crash-7.1.6-1.fc26  (10/14/16)
  http://koji.fedoraproject.org/koji/buildinfo?buildID=810068