chiark / gitweb /
journald: remove unconditional log_*() use in the main loop
authorKay Sievers <kay@vrfy.org>
Sat, 23 Mar 2013 20:02:59 +0000 (21:02 +0100)
committerKay Sievers <kay@vrfy.org>
Sat, 23 Mar 2013 20:09:37 +0000 (21:09 +0100)
Setting MaxRetentionSec= caused the kernel log to overflow and the
journal daemon to enter an endless loop.

Logging from the journald main loop gets directed to /dev/kmsg,
which wakes up journald again. We skip the import of this message
by checking for our own PID, but this still causes the main loop
to never go to sleep again because we never stopped logging from
there.

TODO
src/journal/journald.c

diff --git a/TODO b/TODO
index 565e85e07a214d259984df2dee5dbd81e64dfcc1..132aeaccbea716c76f2fa58369146acc638a2106 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,14 +1,4 @@
 Bugfixes:
-* journal: setting MaxRetentionSec= to any value creates a /dev/kmsg loop:
-    epoll_wait(7, {?} 0x7fff220df200, 1, 799489421) = 1
-    read(8, "46,156226155,545165984,-;systemd"..., 8192) = 75
-    writev(6, [{"<46>", 4}, {"systemd-journald", 16}, {"[3822]: ", 8}, {"Sleeping for 799489421 ms", 25}, {"\n", 1}], 5) = 54
-    epoll_wait(7, {?} 0x7fff220df200, 1, 799489421) = 1
-    read(8, "46,156226156,545166076,-;systemd"..., 8192) = 75
-    writev(6, [{"<46>", 4}, {"systemd-journald", 16}, {"[3822]: ", 8}, {"Sleeping for 799489421 ms", 25}, {"\n", 1}], 5) = 54
-    epoll_wait(7, {?} 0x7fff220df200, 1, 799489421) = 1
-    https://bbs.archlinux.org/viewtopic.php?pid=1200373
-
 * check systemd-tmpfiles for selinux context hookup for mknod(), symlink() and similar
 
 * swap units that are activated by one name but shown in the kernel under another are semi-broken
index d6b9be5974307c59327ef8a56484b2a6f100dc40..5fb10b1d3febe39905cff80c66e551e3741df784 100644 (file)
@@ -88,7 +88,6 @@ int main(int argc, char *argv[]) {
 
                         /* Calculate when to rotate the next time */
                         t = (int) ((server.oldest_file_usec + server.max_retention_usec - n + USEC_PER_MSEC - 1) / USEC_PER_MSEC);
-                        log_info("Sleeping for %i ms", t);
                 }
 
 #ifdef HAVE_GCRYPT