Fix hanging journal flush (#1159641)

This commit is contained in:
Michal Schmidt 2014-11-05 00:31:09 +01:00
parent 32324f829f
commit ba201ce670
2 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,34 @@
From ec2b7ebedde908aed11e6504b58a7712d052344b Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Tue, 4 Nov 2014 20:28:08 +0100
Subject: [PATCH] units: make systemd-journald.service Type=notify
It already calls sd_notify(), so it looks like an oversight.
Without it, its ordering to systemd-journal-flush.service is
non-deterministic and the SIGUSR1 from flushing may kill journald before
it has its signal handlers set up.
https://bugs.freedesktop.org/show_bug.cgi?id=85871
https://bugzilla.redhat.com/show_bug.cgi?id=1159641
(from upstream commit 87a38c20196a4aeb56b6ba71d688eefd0b21c30)
---
units/systemd-journald.service.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/units/systemd-journald.service.in b/units/systemd-journald.service.in
index 4de38fa..441d5b1 100644
--- a/units/systemd-journald.service.in
+++ b/units/systemd-journald.service.in
@@ -14,6 +14,7 @@ After=systemd-journald.socket systemd-journald-dev-log.socket syslog.socket
Before=sysinit.target
[Service]
+Type=notify
Sockets=systemd-journald.socket systemd-journald-dev-log.socket
ExecStart=@rootlibexecdir@/systemd-journald
Restart=always
--
2.1.0

View File

@ -16,7 +16,7 @@
Name: systemd
Url: http://www.freedesktop.org/wiki/Software/systemd
Version: 217
Release: 2%{?gitcommit:.git%{gitcommit}}%{?dist}
Release: 3%{?gitcommit:.git%{gitcommit}}%{?dist}
# For a breakdown of the licensing, see README
License: LGPLv2+ and MIT and GPLv2+
Summary: A System and Service Manager
@ -41,6 +41,7 @@ Source6: sysctl.conf.README
# i=1; for p in 0*patch;do printf "Patch%04d: %s\n" $i $p; ((i++));done
Patch0001: 0001-units-don-t-order-journal-flushing-afte-remote-fs.ta.patch
Patch0002: 0002-units-make-systemd-journald.service-Type-notify.patch
Patch0998: fedora-disable-resolv.conf-symlink.patch
Patch0999: fedora-add-bridge-sysctl-configuration.patch
@ -824,6 +825,9 @@ getent passwd systemd-journal-upload >/dev/null 2>&1 || useradd -r -l -g systemd
%{_datadir}/systemd/gatewayd
%changelog
* Wed Nov 05 2014 Michal Schmidt <mschmidt@redhat.com> - 217-3
- Fix hanging journal flush (#1159641)
* Fri Oct 31 2014 Michal Schmidt <mschmidt@redhat.com> - 217-2
- Fix ordering cycles involving systemd-journal-flush.service and
remote-fs.target (#1159117)