kexec-tools: kexeced kernel hung

Bug #1364427 reported by bugproxy on 2014-09-02
24
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kexec-tools (Ubuntu)
High
Chris J Arges
Trusty
High
Chris J Arges
Utopic
High
Chris J Arges

Bug Description

SRU Justification:

[Impact]
Users of ppc64el hardware need the ability to use kexec kernels.

[Test Case]
1) apt-get install kexec-tools
2) sudo kexec -l /boot/vmlinux --initrd=/boot/initrd.img
3) sudo kexec -e
4) Kernel should kexec into current kernel and work

[Regression Potential]
This patch backports the following patches from upstream kexec-tools:

7bb7c2a4bae8 kexec/ppc64: Handle reserved memory ranges
d8847573a40f kexec/ppc64: Fix up ELF header and dt for PowerNV
90853885a859 ppc64/purgatory: Device tree values should be
2ca220389d21 kexec/ppc64: move to device tree version 17
335bad77fb07 kexec/ppc64: disabling exception handling when
45b33eb2e70c ppc64/kdump: Fix ELF header endianess

These are all specific to POWER architecture.

--

---Problem Description---
kexec is not working with kernel 3.16 or later.

The root cause is missing patch in the kexec-tools package provided with Ubuntu 14.04 and 14.10.

---uname output---
Linux qemu 3.16.0-10-generic #15-Ubuntu SMP Thu Aug 21 16:32:31 UTC 2014 ppc64le ppc64le ppc64le GNU/Linux

Machine Type = P8

---Steps to Reproduce---
On a 14.10 guest or host, run :
$ sudo kexec -l /boot/vmlinux --initrd=/boot/initrd.img-3.16.0-10-generic
$ sudo kexec -e

The kexeced kernel will hang here :
[ 300.002862] Starting new kernel
I'm in purgatory

The root cause is the following kexec-tools's patch missing:
2ca220389d21 kexec/ppc64: move to device tree version 17

This patch is required to kexec kernel 3.16 and later.

Among this patch, the following upstream pactches should be added to the current package :
335bad77fb07 kexec/ppc64: disabling exception handling when building the purgato
90853885a859 ppc64/purgatory: Device tree values should be read/stored in Big En

In addition the following incoming patch should be applied :
ppc64/kdump: Fix ELF header endianess (http://lists.infradead.org/pipermail/kexec/2014-July/012247.html)

Another option to consider is to move to kexec-tools 2.0.7, and to apply the missing patches

Is it possible to get this patches also applied to the kexec-tools shipped with 14.04 ?

bugproxy (bugproxy) on 2014-09-02
tags: added: architecture-ppc64le bugnameltc-115353 severity-critical targetmilestone-inin1410
Luciano Chavez (lnx1138) on 2014-09-02
affects: ubuntu → kexec-tools (Ubuntu)
Laurent Dufour (ldufour) wrote :

Please note that this bug is affecting both 14.04 and 14.10.

Diane Brent (drbrent) on 2014-09-25
Changed in kexec-tools (Ubuntu):
assignee: nobody → Taco Screen team (taco-screen-team)
Thierry FAUCK (thierry-j) wrote :

Changed status as patch is available

Changed in kexec-tools (Ubuntu):
status: New → Fix Committed
Chris J Arges (arges) on 2014-10-01
Changed in kexec-tools (Ubuntu):
assignee: Taco Screen team (taco-screen-team) → Chris J Arges (arges)
importance: Undecided → Medium
importance: Medium → High
status: Fix Committed → In Progress
Changed in kexec-tools (Ubuntu Trusty):
assignee: nobody → Chris J Arges (arges)
importance: Undecided → High
status: New → In Progress
Chris J Arges (arges) on 2014-10-01
summary: - kexeced kernel hung
+ kexec-tools: kexeced kernel hung
Chris J Arges (arges) wrote :
description: updated
Chris J Arges (arges) wrote :

Uploaded for Utopic.

tags: added: patch

Hi Chris & Laurent,

Aren't these other 2 ppc64el-specific patches required too?
- kexec/ppc64: Handle reserved memory ranges exported by OPAL firmware.
- kexec/ppc64: Fix up ELF header and dt for PowerNV platform.

I'm not knowledgeable in kexec, but I see those upstream post-2.0.6 as well.

Chris J Arges (arges) wrote :

I was able to get a crash dump with the above patch (but didn't test crash on the dump file itsself), but I'll check the above since I'm sure they affect the dump format and actually using crash.

Laurent Dufour (ldufour) wrote :

Hi Mauricio,

Yes, the commit 7bb7c2a4bae8 and d8847573a40f should be imported too.

But why not considering the 2.0.7 (+ 2ca220389d21 + 335bad77fb07 + 45b33eb2e70c) ?

Laurent.

------- Comment From <email address hidden> 2014-10-02 09:44 EDT-------
*** Bug 113879 has been marked as a duplicate of this bug. ***

Chris J Arges (arges) wrote :

Just as an FYI, here are the patches I have stacked on top of _2.0.6_ which is the version in Utopic. In addition I plan on backporting any working patch stack to Trusty which has the identical version.

335bad77fb0750f3961aa8df47c83a522d212b08
d8847573a40fc00442fd727c4906b5b619fa5e1f
7bb7c2a4bae8510cfc898373e21007ac996432ec
2ca220389d212249cc842d49084c95e524fb299b
45b33eb2e70cd44f41abf1058a92659cb4315011
90853885a859e42b0ff6935199bf6fceda1c6a87

Let me know if there are any additional patches required.

Thanks,

description: updated
description: updated
Laurent Dufour (ldufour) wrote :

Chris,

On top of 2.0.6, you need also
db3c32babc52 kexec/fs2dt : Fix endianess issue with initrd base and size

I'd recommend to take this one also:
7d33c8933ebf ppc64/purgatory: Disabling GCC's stack protection

Again why not considering 2.0.7 with the 3 patches I mentioned in comment 7 ?

Cheers,

Chris J Arges (arges) wrote :

Due to the timing in the Utopic release schedule we no longer sync newer versions of package into the archive. At this time we generally try to keep things restricted to bugfixes. Therefore at this point we need to apply these fixes on top of 2.0.6.

7d33c8933ebf is already applied in our version

I'll add the following patch as well:
db3c32babc52 kexec/fs2dt : Fix endianess issue with initrd base and size

Chris J Arges (arges) wrote :

Oh and db3c32babc52 was already applied, so the patchset mentioned in comment #9 is what will be added.

Chris J Arges (arges) wrote :

@ldufour:
I'm looking into a 2.0.7 merge at the moment. If that looks good we'll merge 2.0.7 then add these patches on top:
335bad77fb0750f3961aa8df47c83a522d212b08
2ca220389d212249cc842d49084c95e524fb299b
45b33eb2e70cd44f41abf1058a92659cb4315011

These patches are already included in 2.0.7:
d8847573a40fc00442fd727c4906b5b619fa5e1f
7bb7c2a4bae8510cfc898373e21007ac996432ec
90853885a859e42b0ff6935199bf6fceda1c6a87

--chris

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kexec-tools - 1:2.0.7-1ubuntu2

---------------
kexec-tools (1:2.0.7-1ubuntu2) utopic; urgency=medium

  * The following enable kexec-tools for ppc64el: (LP: #1364427)
    - kexec-ppc64-disabling-exception-handling-when-buildi.patch
    - kexec-ppc64-move-to-device-tree-version-17.patch
    - ppc64-kdump-Fix-ELF-header-endianess.patch

kexec-tools (1:2.0.7-1ubuntu1) utopic; urgency=low

  * Merge from Debian unstable. Remaining changes:
    - Run aclocal during build; build-dep on automake.
    - Add and install kdump init script and initramfs snippet; depend on
      initramfs-tools and call update-initramfs.
    - Call to update-grub to update boot args with crashkernel=
    - Default to not kexecing a kernel on boot in the automatically
      generated conffile
    - Don't call db_stop from the postinst.
    - Add ppc64el architecture.
    - Use format-security.patch instead of const_string_warning.patch
    - Dropped:
       - kexec-p-fails-to-load-kernels-with-version-x.y.patch
       - kdump_makefile.patch

kexec-tools (1:2.0.7-1) unstable; urgency=low

  * New upstream release. Refreshed patches to apply without offsets
  * Stopped passing start/stop to update-rc.d
  * Includes fix for multiboot image booting bug from upstream
    (closes: Bug#735360)
 -- Chris J Arges <email address hidden> Thu, 02 Oct 2014 21:38:53 +0000

Changed in kexec-tools (Ubuntu Utopic):
status: In Progress → Fix Released
Laurent Dufour (ldufour) wrote :

@arges
I'm glad to see the move to 2.0.7.
Thanks,

Chris J Arges (arges) wrote :

Uploaded trusty version of the fixes against 2.0.6.

Hello bugproxy, or anyone else affected,

Accepted kexec-tools into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/kexec-tools/1:2.0.6-0ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in kexec-tools (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Chris J Arges (arges) wrote :

Verified in a Trusty VM, with this package in conjunction with the other fixes needed for linux/makedumpfile I can get a proper crashdump.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kexec-tools - 1:2.0.6-0ubuntu2.1

---------------
kexec-tools (1:2.0.6-0ubuntu2.1) trusty; urgency=medium

  * Add the following patches to enable kexec-tools on ppc64el (LP: #1364427):
    - kexec-ppc64-Handle-reserved-memory-ranges-exported-b.patch
    - kexec-ppc64-Fix-up-ELF-header-and-dt-for-PowerNV-pla.patch
    - ppc64-purgatory-Device-tree-values-should-be-read-st.patch
    - kexec-ppc64-move-to-device-tree-version-17.patch
    - kexec-ppc64-disabling-exception-handling-when-buildi.patch
    - ppc64-kdump-Fix-ELF-header-endianess.patch
 -- Chris J Arges <email address hidden> Wed, 01 Oct 2014 11:26:17 -0500

Changed in kexec-tools (Ubuntu Trusty):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for kexec-tools has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

Duplicates of this bug

Other bug subscribers