[Bug 2030476] [NEW] [UBUNTU 22.04] Kdump broken for s390 on Ubuntu 22.04.2

Launchpad Bug Tracker 2030476 at bugs.launchpad.net
Wed Aug 9 16:13:00 UTC 2023


You have been subscribed to a public bug by Frank Heimes (fheimes):

SRU Justification:
==================

[ Impact ]

 * The 'kdump-config load' step fails on s390x,
   while trying to create a dump with:
   $ kdump-config load
     * Creating symlink /var/lib/kdump/vmlinuz
     * Creating symlink /var/lib/kdump/initrd.img
     Unknown rela relocation: 0x14 0x6bc0901c
     * failed to load kdump kernel

 * Hence it's not possible to take a dump on jammy/s390x
   using kdump (which makes use of kexec).

 * The relocation entries of type R_390_PLT32DBL, that are generated
   by gcc 11.3 (and higher) for the kdump purgatory code are silently
   ignored, which leads to this kdump kernel load failures.

 * The solution is simply to handle all R_390_PLT32DBL relocation entries
   just like the R_390_PC32DBL ones.

[ Test Plan ]

 * Have an affected s390x system (LPAR, z/VM or KVM) installed
   with jammy or newer.

 * sudo apt install kdump-tools kexec-tools
   (ensure the patched kexec-tools package is pulled-in)

 * Select 'yes' on "Should kdump-tools be enabled by default?"

 * In case of a notification about a "Modified configuration file"
   chose "install the package maintainer's version" to get
   the new zipl.conf with the crashkernel argument.

 * sudo reboot

 * optional: systemctl status kdump-tools

 * sudo kdump-config load # see particularly here if it fails.
   Before reboot a valid output is:
   " * no crashkernel= parameter in the kernel cmdline"
   after reboot its:
   " * Cannot change symbolic links when kdump is loaded"
   but no crash.

 * optional: kdump-config show
   (look for line "current state:    ready to kdump"

 * and to complete the overall case, trigger a dump:

 * cat /proc/sys/kernel/sysrq
   127
   (anything else than "0" is good here and means enabled, but better do:)

 * sudo sysctl -w kernel.sysrq=1

 * sudo -s
   echo c > /proc/sysrq-trigger
   (you'll likely see "client_loop: send disconnect: Broken pipe")

 * Now watch the console output and wait until system is back up again
   and you'll find the dump in /var/crash:
   202308091605
   kdump_lock
   kexec_cmd
   linux-image-6.2.0-26-generic-202308091605.crash

[ Where problems could occur ]

 * First of all the changes are purely s390x related.
   In kernel it's in /arch/s390/kernel/machine_kexec_file.c
   and in kexec-tools it's in arch/s390/kexec-elf-rel-s390.c only.

 * In kernel all relocation entries (r_type) are simply changed from
   R_390_PLT32DBL to R_390_PC32DBL.
   +               if (r_type == R_390_PLT32DBL)
   +                       r_type = R_390_PC32DBL;
   This could become problematic _if_ a special handling of
   R_390_PLT32DBL would be needed (which is not the case here).

 * In kexec-tools it's similar. By this change:
   -		else if (r_type == R_390_PC32DBL)
   +		else if (r_type == R_390_PC32DBL || r_type == R_390_PLT32DBL)
   both R_390_PC32DBL and R_390_PLT32DBL are now treated the same way.

 * This works as long as no further differentiation between both
   relocation entries are needed.

[ Other Info ]

 * Jammy does not have the kernel nor the kexec-tools patch included.

 * lunar (with kernel 6.2) and mantic (with kernel 6.5, let's say > 6.2)
   have the kernel patch already in, since it got upstream accepted with 5.19.
   So these only need the kexec-tools patch, because both are still on
   kexec-tools v2.0.22, but the patch is only upstream with v2.0.24 and newer.
__________

== Reported by <MIHAJLOV at de.ibm.com> - 2023-08-07 03:10:48 ==

---Problem Description---
Kdump broken for s390

---uname output---
Linux m836037 5.15.0-78-generic #85-Ubuntu SMP Fri Jul 7 15:25:49 UTC 2023 s390x s390x s390x GNU/Linux

Machine Type = 3906-704

---Debugger---
A debugger is not configured

---Steps to Reproduce---
1. apt install kdump-tools
   enable kexec and kdump
2. reboot
3. kdump-config load
->
 # kdump-config load
  * Creating symlink /var/lib/kdump/vmlinuz
  * Creating symlink /var/lib/kdump/initrd.img
 Unknown rela relocation: 0x14 0x6bc0901c
  * failed to load kdump kernel

** Affects: ubuntu-z-systems
     Importance: High
     Assignee: Skipper Bug Screeners (skipper-screen-team)
         Status: In Progress

** Affects: kexec-tools (Ubuntu)
     Importance: High
     Assignee: Frank Heimes (fheimes)
         Status: In Progress

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: kexec-tools (Ubuntu Jammy)
     Importance: High
     Assignee: Frank Heimes (fheimes)
         Status: In Progress

** Affects: linux (Ubuntu Jammy)
     Importance: Undecided
         Status: New

** Affects: kexec-tools (Ubuntu Lunar)
     Importance: High
     Assignee: Frank Heimes (fheimes)
         Status: In Progress

** Affects: kexec-tools (Ubuntu Mantic)
     Importance: High
     Assignee: Frank Heimes (fheimes)
         Status: In Progress


** Tags: architecture-s39064 bugnameltc-203344 patch severity-high targetmilestone-inin---
-- 
[UBUNTU 22.04] Kdump broken for s390 on Ubuntu 22.04.2
https://bugs.launchpad.net/bugs/2030476
You received this bug notification because you are a member of Ubuntu Sponsors, which is subscribed to the bug report.



More information about the Ubuntu-sponsors mailing list