Re: [systemd-devel] journalctl not showing most boots/logs
On Fri, 2015-03-27 at 11:36 +0100, Martin Pitt wrote: Hello all, in [1] I just got a report that journalctl --list-boots (with persistant journal) only shows a few old boots, but not current ones. I checked this on my system (which has had persistant journal for a while), and confirm that: $ journalctl --list-boots -2 81de6f2120224dfdb6ac7cc0bf67ee3c Fr 2015-02-20 10:40:16 CET—Fr 2015-02-20 10:40:29 CET -1 f1d0c5a906b241bda8637abc2eb7ac94 Fr 2015-02-20 10:40:39 CET—Fr 2015-02-20 10:40:42 CET 0 a91d941cddff405e8e3f8a2dc89ff14a Fr 2015-02-20 10:44:10 CET—Fr 2015-02-20 10:44:22 CET Curiously it's even different with --system: $ ./journalctl --system --list-boots -1 81de6f2120224dfdb6ac7cc0bf67ee3c Fr 2015-02-20 10:40:16 CET—Fr 2015-02-20 10:40:29 CET 0 f1d0c5a906b241bda8637abc2eb7ac94 Fr 2015-02-20 10:40:39 CET—Fr 2015-02-20 10:40:42 CET When I dump all data, it correctly starts at the top (oldest available data), but stops in the middle again (although much later than the above): $ journalctl --no-pager | head -n 1 -- Logs begin at Fr 2015-02-20 10:40:16 CET, end at Fr 2015-03-27 11:28:19 CET. -- $ journalctl --no-pager | tail -n 1 Mär 06 09:26:30 donald systemd[2269]: Stopped target Basic System. $ journalctl --system --no-pager | tail -n 1 Mär 15 11:35:02 donald acpid[1573]: client 32107[0:0] has disconnected But journalctl -b is fine, i. e. the journal indeed has the current data. This can also be seen on the dates in /var/log/journal/*/system*: -rw-r-x---+ 1 root root 8388608 Feb 20 10:41 system@00050f81daeb3450-01f8b5c07f5c685d.journal~ -rw-r-x---+ 1 root systemd-journal 16777216 Feb 20 10:44 system@00050f81e6aae621-4cc822da2f4e5632.journal~ -rw-r-x---+ 1 root systemd-journal 50331648 Feb 23 14:51 system@00050fc1b33c71d9-e5b4f504845fa973.journal~ -rw-r-x---+ 1 root systemd-journal 58720256 Feb 27 05:39 system@0005100a72962dbf-87d746f79acfd368.journal~ -rw-r-x---+ 1 root systemd-journal 75497472 Mär 6 09:27 system@0005109a742ac2de-ce57867db39fa7fe.journal~ -rw-r-x---+ 1 root systemd-journal 16777216 Mär 7 13:35 system@000510b20aa96358-85c7ad2e2345c443.journal~ -rw-r-x---+ 1 root systemd-journal 16777216 Mär 10 06:30 system@000510e87298e593-c2804ca231570417.journal~ -rw-r-x---+ 1 root systemd-journal 16777216 Mär 11 06:17 system@000510fc61c2d25d-1dd07ebfd3198dcb.journal~ -rw-r-x---+ 1 root systemd-journal 16777216 Mär 13 05:10 system@00051123ad5c2e0d-0321e65975016e97.journal~ -rw-r-x---+ 1 root systemd-journal 25165824 Mär 13 20:57 system@00051130e8932ec1-464554bc60f0378a.journal~ -rw-r-x---+ 1 root systemd-journal 16777216 Mär 15 11:49 system@000511517e2e104a-70afd23a22d58ceb.journal~ -rw-r-x---+ 1 root systemd-journal 25165824 Mär 27 06:53 system@0005123ec10bcd08-2f94975a3c6b8a98.journal~ -rw-r-x---+ 1 root systemd-journal 8388608 Mär 27 11:31 system.journal (Note that the gap between Mar 15 and Mar 27 is expected -- I've been away on holidays) journalctl --system --header output is at http://paste.ubuntu.com/10688374/ in case that helps. This happens with both 219 and current master. Any idea about this? FWIW i'm seeing a similar discrepancy between --list-boots with and without --system on my system running Debians 215 package. So it's unlikely to be a recent issue. -- Sjoerd Simons sjoerd.sim...@collabora.co.uk Collabora Ltd. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] [PATCH] systemctl: Correct error message printed when bus_process_wait fails
Actually use the variable containing the return code of bus_process_wait when printing the error message as a result of it failing. --- src/systemctl/systemctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index d9b8bee..6534819 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -2382,7 +2382,7 @@ static int wait_for_jobs(sd_bus *bus, Set *s) { while (!set_isempty(s)) { q = bus_process_wait(bus); if (q 0) { -log_error(Failed to wait for response: %s, strerror(-r)); +log_error(Failed to wait for response: %s, strerror(-q)); return q; } -- 2.1.0 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [Fwd: [PATCH] journal: fix dereferenced pointer in journal_file_rotate()]
On Mon, 2012-05-21 at 21:35 -0700, shawn wrote: If journal_file_open() failed, due to (e.g.) -ENOSPC on open() new_file might still be NULL. On error, leave pointer to the old JournalFile (now closed), and require caller to check for error approiately. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43020 Reported-by: Sjoerd Simons sjo...@luon.net The bugzilla link seems wrong ? This actually remind me though, i did submit a patch for this issue to bugzilla (slightly different then your solution) more then a month ago. And a companion patch to not make the issue occur so easily, bugs filed here: https://bugs.freedesktop.org/show_bug.cgi?id=48688 https://bugs.freedesktop.org/show_bug.cgi?id=48685 If the systemd bugzilla is just somewhat of a decoy i'm happy to repost the patches to the list ofcourse :) src/journal/journal-file.c |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 5dd6e57..9f5f26e 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -1871,9 +1871,16 @@ int journal_file_rotate(JournalFile **f) { old_file-header-state = STATE_ARCHIVED; r = journal_file_open(old_file-path, old_file-flags, old_file-mode, old_file, new_file); -journal_file_close(old_file); + +if (r 0) { +r = -errno; +goto finish; +} *f = new_file; + +finish: +journal_file_close(old_file); return r; } ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [Fwd: [PATCH] journal: fix dereferenced pointer in journal_file_rotate()]
On Tue, 2012-05-22 at 13:26 +0200, Lennart Poettering wrote: On Tue, 22.05.12 08:40, Sjoerd Simons (sjo...@luon.net) wrote: On Mon, 2012-05-21 at 21:35 -0700, shawn wrote: If journal_file_open() failed, due to (e.g.) -ENOSPC on open() new_file might still be NULL. On error, leave pointer to the old JournalFile (now closed), and require caller to check for error approiately. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43020 Reported-by: Sjoerd Simons sjo...@luon.net The bugzilla link seems wrong ? This actually remind me though, i did submit a patch for this issue to bugzilla (slightly different then your solution) more then a month ago. And a companion patch to not make the issue occur so easily, bugs filed here: https://bugs.freedesktop.org/show_bug.cgi?id=48688 https://bugs.freedesktop.org/show_bug.cgi?id=48685 If the systemd bugzilla is just somewhat of a decoy i'm happy to repost the patches to the list ofcourse :) Nah, fdo bz is not a decoy. The reason I didnt merge this right away was actually that I wanted to rework the code in question in a bigger way, so that we have some logic in there that we automatically fallback to kmsg logging when the journal for some reason doesn't work. But I never found the time to. Aha! A note on the bug would have been great :). Anyway, since this is a bug I have now merged your patch 48685, and we can add the kmsg fallback logic later on. Thanks for your work! Np, thanks for merging :). About 48688 I am not sure sure. i.e. should we really bind the keep_free stuff to the reserved percentage of the FS? They are two different things, or are they not? I'm not sure either as i mentioned in the bugreport. The standard 5% is a bit odd though. Although I may be a bit odd, but my / partition tends to never have a lot of free space, which means it's basically always below the 5% (Which is still more then 0.5G on a 10G system..). I picked up using the reserved precentage mostly as it's the one place i could think of where there is currently a configuration for leave this much space free please. Furthermore it means that you get a no space error only when df shows you have 0 available space which is nice i'd think :).. It took me quite some time to figure out why journald was giving out of space errors while df was happily showing there was still quite a bit of space left. -- Sjoerd Simons sjo...@luon.net ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel