Merge ~mustafakemalgilor/ubuntu/+source/systemd:systemd-fix-lp1978079-efi-pstore-not-cleared-jammy into ~ubuntu-core-dev/ubuntu/+source/systemd:ubuntu-jammy

Proposed by Mustafa Kemal Gilor
Status: Merged
Merge reported by: Lukas Märdian
Merged at revision: 0569b1422bf26d157e4c120794f542ee032a347c
Proposed branch: ~mustafakemalgilor/ubuntu/+source/systemd:systemd-fix-lp1978079-efi-pstore-not-cleared-jammy
Merge into: ~ubuntu-core-dev/ubuntu/+source/systemd:ubuntu-jammy
Diff against target: 72 lines (+50/-0)
3 files modified
debian/changelog (+8/-0)
debian/patches/lp1978079-efi-pstore-not-cleared-on-boot.patch (+41/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Lukas Märdian Approve
Canonical Server Pending
Canonical Server Core Reviewers Pending
Review via email: mp+425082@code.qastaging.launchpad.net

Description of the change

Backported a fix from upstream to jammy for the LP issue #1978079:

      * d/p/lp1978079-efi-pstore-not-cleared-on-boot.patch: pstore: Run
        after
        modules are loaded. Thanks to Alexander Graf <email address hidden>.
        LP: #1978079)

Please tag & sponsor.

(See backport merge request for focal: https://code.launchpad.net/~mustafakemalgilor/ubuntu/+source/systemd/+git/systemd/+merge/424938)

Steps to reproduce/test:

# In order to be able to reproduce this issue, the system must have EFI-backed pstore.
# To check which kind of backend that pstore, use `cat /sys/module/pstore/parameters/backend`
# If it says `efi`, the steps below are applicable. Otherwise, find an environment that has
# EFI backed pstore.

# Enable the pstore service. This service is supposed to move the data in /sys/fs/pstore
# to the `/var/lib/systemd/pstore` path on boot.
systemctl enable systemd-pstore.service # (or can be vendor enabled)

# Crash the kernel
echo 1 > /proc/sys/kernel/sysrq
echo 1 > /proc/sys/kernel/panic # this is usually set to zero, causing kernel to loop over the panic and freeze
echo "c" > /proc/sysrq-trigger

# The system will reboot itself. Check `/sys/fs/pstore` path first:
ls /sys/fs/pstore # The path should not be empty, which means the systemd-pstore has failed to do its' job
ls /var/lib/systemd/pstore # The path should be empty.

# Apply the fix
sudo add-apt-repository ppa:mustafakemalgilor/lp-1978079-1
sudo apt upgrade

# Crash the kernel
echo 1 > /proc/sys/kernel/sysrq
echo 1 > /proc/sys/kernel/panic # this is usually set to zero, causing kernel to loop over the panic and freeze
echo "c" > /proc/sysrq-trigger

# The system will reboot itself. Check `/sys/fs/pstore` path first:
ls /sys/fs/pstore # The path should be empty
ls /var/lib/systemd/pstore # The path should not be empty

Package Test Results:

autopkgtest [15:49:45]: test systemd-fsckd: [-----------------------
SKIP: root file system is being checked by initramfs already
autopkgtest [15:49:45]: test systemd-fsckd: -----------------------]
systemd-fsckd SKIP exit status 77 and marked as skippable
autopkgtest [15:49:46]: test systemd-fsckd: - - - - - - - - - - results - - - - - - - - - -
autopkgtest [15:49:46]: @@@@@@@@@@@@@@@@@@@@ summary
timedated PASS
hostnamed PASS
localed-locale PASS
localed-x11-keymap PASS
logind PASS
unit-config PASS
storage PASS
networkd-test.py PASS
build-login PASS
boot-and-services PASS
udev PASS
unit-tests PASS
tests-in-lxd PASS
upstream-1 PASS
upstream-2 PASS
boot-smoke PASS
systemd-fsckd SKIP exit status 77 and marked as skippable
qemu-system-x86_64: terminating on signal 15 from pid 474221 (/usr/bin/python3)

To post a comment you must log in.
Revision history for this message
Robie Basak (racb) wrote :

Hi,

Normally the Foundations team reviews systemd changes. Is there a particular reason you requested reviews from the Server Team please?

Revision history for this message
Lukas Märdian (slyon) wrote (last edit ):

Thank you very much! This is quality work and LGTM.

Good work on the detailed reproducer/testcase and thanks for executing autopkgtest ahead of time!

I will probably re-write the d/changelog file a bit, to bring it in line with our "gbp dch" (git-buildpackage) workflow. Other than that, I'll merge it as is.

review: Approve
Revision history for this message
Mustafa Kemal Gilor (mustafakemalgilor) wrote :

Thanks for the feedback!

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches