kexec-tools 2.0.14 fails to load 4.12+ crash kernels

Bug #1713940 reported by Stefan Bader
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
kexec-tools (Ubuntu)
Fix Released
High
Stefan Bader

Bug Description

Starting with 4.12 kernels, kexec-tools cannot load a crash kernel because ELF core parsing fails with errors like:

  Unknown type (Reserved) while parsing /sys/firmware/memmap/5/type.
  Please report this as bug. Using RANGE_RESERVED now.
  ...
  ELF core (kcore) parse failed
  Cannot load /var/lib/kdump/vmlinuz

The issue is fixed upstream in kexec-tools 2.0.15 (Debian is still at 2.0.14)

The complete changes list between 2.0.14 and 2.0.15 shows mostly bug fixes and in fact all additional patches in debian/patches which are Ubuntu delta, have moved into upstream 2.0.15. So we could drop all those while moving to the new version.

* ppc64: Reduce number of ELF LOAD segments
* kexec: Increase the upper limit for RAM segments
* alpha: add missing __NR_kexec_load definition
* kexec: implemented XEN KEXEC STATUS to determine if an image is loaded
* kexec: Remove redundant space from help message
* purgatory: Add purgatory.map and purgatory.ro.sym to clean recipe
* kexec: Add option to get crash kernel region size
* crashdump/arm: Add get_crash_kernel_load_range() function
* crashdump/arm64: Add get_crash_kernel_load_range() function
* crashdump/cris: Add get_crash_kernel_load_range() function
* crashdump/ia64: Add get_crash_kernel_load_range() function
* crashdump/m68k: Add get_crash_kernel_load_range() function
* crashdump/mips: Add get_crash_kernel_load_range() function
* crashdump/ppc: Add get_crash_kernel_load_range() function
* crashdump/ppc64: Add get_crash_kernel_load_range() function
* crashdump/s390: Add get_crash_kernel_load_range() function
* crashdump/sh: Add get_crash_kernel_load_range() function
* gitignore: add two generated files in purgatory
* Only print debug message when failed to serach for kernel symbol from
  /proc/kallsyms
* build_mem_phdrs(): check if p_paddr is invalid
* uImage: fix realloc() pointer confusion
* uImage: Fix uImage_load() for little-endian machines
* uImage: Add new IH_ARCH_xxx definitions
* uImage: use 'char *' instead of 'unsigned char *' for uImage_load()
* uImage: use 'char *' instead of 'unsigned char *' for uImage_probe()
* arm64: add uImage support
* vmcore-dmesg: Define _GNU_SOURCE
* Don't use %L width specifier with integer values
* x86/x86_64: Fix format warning with die()
* ppc: Fix format warning with die()
* crashdump: Remove stray get_crashkernel_region() declaration
* x86: Support large number of memory ranges
* Fix broken Xen support in configure.ac
* kexec: extend the semantics of kexec_iomem_for_each_line
* kexec: generalize and rename get_kernel_stext_sym()
* arm64: identify PHYS_OFFSET correctly
* arm64: change return values on error to negative
* arm64: kdump: identify memory regions
* arm64: kdump: add elf core header segment
* arm64: kdump: set up kernel image segment
* arm64: kdump: set up other segments
* arm64: kdump: add DT properties to crash dump kernel's dtb
* arm64: kdump: Add support for binary image files
* Handle additional e820 memmap type strings

Tags: patch artful
Revision history for this message
Stefan Bader (smb) wrote :
tags: added: patch
Andy Whitcroft (apw)
Changed in kexec-tools (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Andy Whitcroft (apw) wrote :

The delta indeed does appear to majority bug fixes, the only new features look to be arm64 crash support which we were already carrying in the ubuntu delta so can be ignored. Sponsored to artful.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kexec-tools - 1:2.0.15-0ubuntu1

---------------
kexec-tools (1:2.0.15-0ubuntu1) artful; urgency=medium

  * New upstream version (LP: #1713940):
    - Modified:
      - distclean_fix.patch
        Hunk which modified purgatory makefile went upstream
    - Dropped (already upstream):
      - format-security.patch
      - kexec-Increase-the-upper-limit-for-RAM-segments.patch
      - ppc64-Reduce-number-of-ELF-LOAD-segments.patch
      - 0001-kexec-extend-the-semantics-of-kexec_iomem_for_each_l.patch
      - 0002-kexec-generalize-and-rename-get_kernel_stext_sym.patch
      - 0003-arm64-identify-PHYS_OFFSET-correctly.patch
      - 0004-arm64-change-return-values-on-error-to-negative.patch
      - 0005-arm64-kdump-identify-memory-regions.patch
      - 0006-arm64-kdump-add-elf-core-header-segment.patch
      - 0007-arm64-kdump-set-up-kernel-image-segment.patch
      - 0008-arm64-kdump-set-up-other-segments.patch
      - 0009-arm64-kdump-add-DT-properties-to-crash-dump-kernel-s.patch
      - 0010-arm64-kdump-Add-support-for-binary-image-files.patch

 -- Stefan Bader <email address hidden> Wed, 30 Aug 2017 10:02:25 +0200

Changed in kexec-tools (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
WinEunuchs2Unix (ricklee518) wrote :

Same error Ubuntu 16.04.3 LTS, kexec-tools apt-installed today, Kernel 4.12.2, Skylake HM170, nVidia GTX 970M, NVMe M.2 Gen 3x4 SSD:

$ sudo kexec -l /boot/vmlinuz-`uname -r` --initrd=/boot/initrd.img-`uname -r` --reuse-cmdline
Unknown type (Reserved) while parsing /sys/firmware/memmap/15/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/5/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/23/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/3/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/21/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/1/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/18/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/8/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Unknown E820 type) while parsing /sys/firmware/memmap/16/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/22/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/12/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/20/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/10/type. Please report this as bug. Using RANGE_RESERVED now.
Unknown type (Reserved) while parsing /sys/firmware/memmap/19/type. Please report this as bug. Using RANGE_RESERVED now.

Revision history for this message
Guilherme G. Piccoli (gpiccoli) wrote :

Thanks for the report and fix Stefan! Although the LP is a bit old, I think worth to mention here the patches that fix boths issues (the "Unknown type (Reserved) while parsing" message and the "ELF core (kcore) parse failed" bug) - both present in kexec-tools as fixes due to Linux kernel modifications:

ed15ba1b ("build_mem_phdrs(): check if p_paddr is invalid")
fab91841 ("Handle additional e820 memmap type strings")

Cheers,

Guilherme

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.