From 3d81e0bef51259eee8021956851758c7456938e7 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 06 2020 14:27:48 +0000 Subject: import systemd-219-73.el7_8.9 --- diff --git a/SOURCES/0820-core-coldplug-possible-nop_job.patch b/SOURCES/0820-core-coldplug-possible-nop_job.patch new file mode 100644 index 0000000..550a685 --- /dev/null +++ b/SOURCES/0820-core-coldplug-possible-nop_job.patch @@ -0,0 +1,54 @@ +From 59bce92b081cf0b52c4335461af7cbd003a11aeb Mon Sep 17 00:00:00 2001 +From: chenglin130 +Date: Sat, 9 Nov 2019 23:04:04 +0800 +Subject: [PATCH] core: coldplug possible nop_job + +When a unit in a state INACTIVE or DEACTIVATING, JobType JOB_TRY_RESTART or +JOB_TRY_RELOAD will be collapsed to JOB_NOP. And use u->nop_job instead +of u->job. + +If a JOB_NOP job is going on with a waiting state, a parallel daemon-reload +just install it during deserialization. Without a coldplug, the job will +not be in m->run_queue, which results in a hung try-restart or +try-reload process. + +Reproduce: +1. run systemctl try-restart test.servcie (inactive) repeatly in a terminal. +2. run systemctl daemon-reload repeatly in other terminals. + +After successful reproduce, systemctl list-jobs will list the hang job. + +Upsteam: +https://github.com/systemd/systemd/pull/13124 + +(cherry picked from commit 8ee652948b0255005e4c9d278ac06b30711d9dbd) + +Resolves: #1847336 +--- + src/core/unit.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/core/unit.c b/src/core/unit.c +index dc2df4c89c..856ebf3e64 100644 +--- a/src/core/unit.c ++++ b/src/core/unit.c +@@ -2900,6 +2900,7 @@ static int unit_add_deserialized_job_coldplug(Unit *u) { + + int unit_coldplug(Unit *u, Hashmap *deferred_work) { + int r; ++ Job *uj; + + assert(u); + +@@ -2907,8 +2908,9 @@ int unit_coldplug(Unit *u, Hashmap *deferred_work) { + if ((r = UNIT_VTABLE(u)->coldplug(u, deferred_work)) < 0) + return r; + +- if (u->job) { +- r = job_coldplug(u->job); ++ uj = u->job ?: u->nop_job; ++ if (uj) { ++ r = job_coldplug(uj); + if (r < 0) + return r; + } else if (u->deserialized_job >= 0) diff --git a/SOURCES/9999-Update-kernel-install-script-by-backporting-fedora-p.patch b/SOURCES/9999-Update-kernel-install-script-by-backporting-fedora-p.patch deleted file mode 100644 index c42f0b6..0000000 --- a/SOURCES/9999-Update-kernel-install-script-by-backporting-fedora-p.patch +++ /dev/null @@ -1,57 +0,0 @@ -From c49c37d5e26bf71a97d5194d390f80d3e71758e1 Mon Sep 17 00:00:00 2001 -From: systemd team -Date: Tue, 23 Apr 2019 10:46:19 -0300 -Subject: [PATCH] Update kernel-install script by backporting fedora patches - ---- - src/kernel-install/kernel-install | 30 +++++++++++++++++------------- - 1 file changed, 17 insertions(+), 13 deletions(-) - -diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install -index f1c74de..d860701 100755 ---- a/src/kernel-install/kernel-install -+++ b/src/kernel-install/kernel-install -@@ -73,23 +73,27 @@ KERNEL_IMAGE="$2" - - if [[ -x /sbin/new-kernel-pkg ]]; then - KERNEL_DIR="${KERNEL_IMAGE%/*}" -- if [[ "${KERNEL_DIR}" != "/boot" ]]; then -- for i in \ -- "$KERNEL_IMAGE" \ -- "$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac" \ -- "$KERNEL_DIR"/System.map \ -- "$KERNEL_DIR"/config \ -- "$KERNEL_DIR"/zImage.stub \ -- "$KERNEL_DIR"/dtb \ -- ; do -- [[ -e "$i" ]] || continue -- cp -a "$i" "/boot/${i##*/}-${KERNEL_VERSION}" -- done -- fi - - [[ "$KERNEL_VERSION" == *\+* ]] && flavor=-"${KERNEL_VERSION##*+}" - case "$COMMAND" in - add) -+ if [[ "${KERNEL_DIR}" != "/boot" ]]; then -+ for i in \ -+ "$KERNEL_IMAGE" \ -+ "$KERNEL_DIR"/System.map \ -+ "$KERNEL_DIR"/config \ -+ "$KERNEL_DIR"/zImage.stub \ -+ "$KERNEL_DIR"/dtb \ -+ ; do -+ [[ -e "$i" ]] || continue -+ cp -aT "$i" "/boot/${i##*/}-${KERNEL_VERSION}" -+ done -+ # hmac is .vmlinuz-.hmac so needs a special treatment -+ i="$KERNEL_DIR/.${KERNEL_IMAGE##*/}.hmac" -+ if [[ -e "$i" ]]; then -+ cp -aT "$i" "/boot/.${KERNEL_IMAGE##*/}-${KERNEL_VERSION}.hmac" -+ fi -+ fi - /sbin/new-kernel-pkg --package "kernel${flavor}" --install "$KERNEL_VERSION" || exit $? - /sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$KERNEL_VERSION" || exit $? - /sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$KERNEL_VERSION" || exit $? --- -1.8.3.1 - diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec index 2ac74f8..3da53f4 100644 --- a/SPECS/systemd.spec +++ b/SPECS/systemd.spec @@ -7,7 +7,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 219 -Release: 73%{?dist}.8 +Release: 73%{?dist}.9 # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: A System and Service Manager @@ -858,7 +858,7 @@ Patch0816: 0816-swap-adjust-swap.c-in-a-similar-way-to-what-we-just-.patch Patch0817: 0817-swap-finish-the-secondary-swap-units-jobs-if-deactiv.patch Patch0818: 0818-udev-rules-make-tape-changers-also-apprear-in-dev-ta.patch Patch0819: 0819-core-make-sure-to-restore-the-control-command-id-too.patch -Patch9999: 9999-Update-kernel-install-script-by-backporting-fedora-p.patch +Patch0820: 0820-core-coldplug-possible-nop_job.patch %global num_patches %{lua: c=0; for i,p in ipairs(patches) do c=c+1; end; print(c);} @@ -1836,6 +1836,9 @@ fi %{_mandir}/man8/systemd-resolved.* %changelog +* Wed Jun 17 2020 systemd maintenance team - 219-73.9 +- core: coldplug possible nop_job (#1847336) + * Mon May 25 2020 systemd maintenance team - 219-73.8 - core: make sure to restore the control command id, too (#1837973)