diff --git a/5002-Revert-core-service-when-resetting-PID-also-reset-kn.patch b/5002-Revert-core-service-when-resetting-PID-also-reset-kn.patch new file mode 100644 index 00000000..aedd52d9 --- /dev/null +++ b/5002-Revert-core-service-when-resetting-PID-also-reset-kn.patch @@ -0,0 +1,41 @@ +From 996b00ede87d6a870332e63974a7d4def3c2f1b0 Mon Sep 17 00:00:00 2001 +From: msizanoen +Date: Mon, 12 Jun 2023 10:30:12 +0700 +Subject: [PATCH 5002/5002] Revert "core/service: when resetting PID also reset + known flag" + +This reverts commit ff32060f2ed37b68dc26256b05e2e69013b0ecfe. + +This change is incorrect as we don't want to mark the PID as invalid but +only mark it as dead. + +The change in question also breaks user level socket activation for +`podman.service` as the termination of the main `podman system service` +process is not properly handled, causing any application accessing the +socket to hang. + +This is because the user-level `podman.service` unit also hosts two +non-main processes: `rootlessport` and `rootlessport-child` which causes +the `cgroup_good` check to still succeed. + +The original submitter of this commit is recommended to find another +more correct way to fix the cgroupsv1 issue on CentOS 8. +--- + src/core/service.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/core/service.c b/src/core/service.c +index 171e091dff..cecdd3bf50 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -3752,7 +3752,6 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) { + return; + + s->main_pid = 0; +- s->main_pid_known = false; + exec_status_exit(&s->main_exec_status, &s->exec_context, pid, code, status); + + if (s->main_command) { +-- +2.35.3 + diff --git a/systemd.changes b/systemd.changes index 5aa4e43c..d0349f42 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Jun 20 07:05:34 UTC 2023 - Franck Bui + +- Temporarily add + 5002-Revert-core-service-when-resetting-PID-also-reset-kn.patch until it's + backported to the next stable release + + See https://github.com/systemd/systemd/pull/28000 + ------------------------------------------------------------------- Fri Jun 16 14:38:33 UTC 2023 - Franck Bui diff --git a/systemd.spec b/systemd.spec index dc1958ec..8d878b4b 100644 --- a/systemd.spec +++ b/systemd.spec @@ -216,6 +216,7 @@ Patch12: 0009-pid1-handle-console-specificities-weirdness-for-s390.patch # will be removed as soon as a proper fix will be merged by upstream. Patch5000: 5000-core-manager-run-generators-directly-when-we-are-in-.patch Patch5001: 5001-Revert-core-propagate-stop-too-if-restart-is-issued.patch +Patch5002: 5002-Revert-core-service-when-resetting-PID-also-reset-kn.patch %description Systemd is a system and service manager, compatible with SysV and LSB