From 6e3930c40f3379b7123e505a71ba4cd6db6c372f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 26 Apr 2016 14:38:45 +0200 Subject: smaller journal fixes (#3124) * sd-journal: detect earlier if we try to read an object from an invalid offset Specifically, detect early if we try to read from offset 0, i.e. are using uninitialized offset data. * journal: when dumping journal contents, react nicer to lines we can't read If journal files are not cleanly closed it might happen that intermediaery journal entries cannot be read. Handle this nicely, skip over the unreadable entries, and log a debug message about it; after all we generally follow the logic that we try to make the best of corrupted files. * journal-file: always generate the same error when encountering corrupted files Let's make sure EBADMSG is the one error we throw when we encounter corrupted data, so that we can neatly test for it. * journal-file: when iterating through a partly corruped journal file, treat error like EOF When we linearly iterate through a corrupted journal file, and we encounter a read error, don't consider this fatal, but merely as EOF condition (and log about it). * journal-file: make seeking in corrupted files work Previously, when we used a bisection table for seeking through a corrupted file, and the end of the bisection table was corrupted we'd most likely fail the entire seek operation. Improve the situation: if we encounter invalid entries in a bisection table, linearly go backwards until we find a working entry again. * man: elaborate on the automatic systemd-journald.socket service dependencies Fixes: #1603 --- man/systemd.exec.xml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'man/systemd.exec.xml') diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index 4ed62dbada..fea42ebd31 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -94,11 +94,10 @@ required to access /tmp and /var/tmp. - Units whose output standard output or error output is - connected to any other sink but , - and automatically - acquire dependencies of type After= on - journald.socket. + Units whose output standard output or error output is connected to , + or (or their combinations with console output, see below) + automatically acquire dependencies of type After= on + systemd-journald.socket. @@ -470,6 +469,10 @@ similar to the same option of StandardInput=. + If the standard output (or error output, see below) of a unit is connected with the journal, syslog or + the kernel log buffer the unit will implicitly gain a dependency of type After= on + systemd-journald.socket (also see the automatic dependencies section above). + This setting defaults to the value set with in systemd-system.conf5, -- cgit v1.2.3-54-g00ecf