[systemd-bugs] [Bug 58549] New: journald doesn't rotate uncleanly closed files

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Dec 19 17:34:39 PST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=58549

          Priority: medium
            Bug ID: 58549
          Assignee: systemd-bugs at lists.freedesktop.org
           Summary: journald doesn't rotate uncleanly closed files
        QA Contact: systemd-bugs at lists.freedesktop.org
          Severity: normal
    Classification: Unclassified
                OS: Linux (All)
          Reporter: d at falconindy.com
          Hardware: x86-64 (AMD64)
            Status: NEW
           Version: unspecified
         Component: general
           Product: systemd

Copypasta of my original reply on the ML:
http://lists.freedesktop.org/archives/systemd-devel/2012-November/007585.html

---------8<-----------------------------------------------------------
I'm not sure when it happened, but rotation used to be "off" by a
difference of whatever the MaxFileSize option was, e.g. if you had a
200M MaxUse and a 50M MaxFileSize, then you'd see usage up to 250M
before old logs were expired. I reported this, and there was a TODO item
added.

At least with 196 (maybe earlier), this no longer holds true any more.
The journal appears to just ignore settings in journald.conf and grow
without bound:

$ grep -E 'SystemMax(Use|FileSize)' /etc/systemd/journald.conf
SystemMaxUse=200M
SystemMaxFileSize=50M

$ journalctl --disk-usage
Journals take up 436.0M on disk.

Forcing rotation opens a new file, but old logs are not expired, leaving
disk usage way above the set maximum. There also seems to be a recent
issue with more uncleanly closed journal files showing up. Unless I
umount my root at shutdown (with initramfs magic), I can very reliably
expect that the journal will mark the last used file as unclean on the
next bootup. My suspicion is that the journal doesn't take into account
these uncleanly closed files when calculating disk usage for rotation,
but I've not had time to confirm that.
-----------------------------------------------------------8<---------

And to add, I've gone back and confirmed that rotation still happens,
and that actual maximum "managed" usage is:

 SystemMaxUse + (NumFilesOpen * SystemMaxFileUseSize)

But there indeed seems to be no attention paid to the tilde suffixed
files, which inflate this amount above the aforementioned maximum.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20121220/b0450197/attachment.html>


More information about the systemd-bugs mailing list