Bug 1778744
Summary: | Failed to create new system journal: Argument list too long | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Florencia Fotorello <ffotorel> |
Component: | systemd | Assignee: | David Tardon <dtardon> |
Status: | CLOSED ERRATA | QA Contact: | Frantisek Sumsal <fsumsal> |
Severity: | urgent | Docs Contact: | |
Priority: | urgent | ||
Version: | 7.7 | CC: | bdeering, dchong, dtardon, duge, jsynacek, redhat, rmetrich, sbroz |
Target Milestone: | rc | Keywords: | Patch, Reproducer |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-09-29 20:32:27 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Florencia Fotorello
2019-12-02 12:22:55 UTC
Reproduction scenario (basically an alternative to the original reproducer): 1. Configure systemd-journald to use permanent or auto (default) storage and create "/var/log/journal" directory. # mkdir /var/log/journal 2. Edit "/etc/systemd/journald.conf" and use the following configuration: --8<--------8<--------8<--------8<------ [Journal] RateLimitInterval=0 RateLimitBurst=0 SystemMaxUse=100G SystemMaxFileSize=1G MaxRetentionSec=1d MaxFileSec=30 --8<--------8<--------8<--------8<------ NOTE: Use SystemMaxUse really large, larger than available disk space on "/var" (or "/" if you don't have dedicated "/var" filesystem). 3. Restart systemd-journald. # systemctl restart systemd-journald 4. Create a really large file to fill-up disk space so that less than 15% free is left in "/var". # dd if=/dev/zero of=bigfile bs=1M count=<you need to use your own calculation, I've used 10240 for 12.8G of available space> 5. Wait for journal rotation. 6. Rotation fails, errord on console, systemd-journald in indefinite recursion loop, systemd-journald crashes. *** Bug 1692407 has been marked as a duplicate of this bug. *** fix merged to github master branch -> https://github.com/systemd-rhel/rhel-7/pull/107 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Low: systemd security and bug fix update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:4007 Still, the customer is facing the issue with systemd-219-78.el7_9.3.x86_64 on RHEL7.9 --8<--------8<--------8<--------8<------ /etc/systemd/journald.conf: [Journal] Storage=persistent Compress=yes RateLimitBurst=10000 SystemMaxUse=600M SystemKeepFree=5.6G SystemMaxFileSize=1G --8<--------8<--------8<--------8<------ Output of journalctl --verify File corruption detected at /var/log/journal/e1acb366491c40dbbb362347d855d92d/user-1002~:0015d0 (of 8388608 bytes, 0%). FAIL: /var/log/journal/e1acb366491c40dbbb362347d855d92d/user-1002~ (Bad message) PASS: /var/log/journal/e1acb366491c40dbbb362347d855d92d/user-1002.journal PASS: /var/log/journal/e1acb366491c40dbbb362347d855d92d/system~ 0015d0: Unused data (entry_offset==0) 0000d0: Data number mismatch File corruption detected at /var/log/journal/e1acb366491c40dbbb362347d855d92d/user-1001:0015d0 (of 8388608 bytes, 0%). FAIL: /var/log/journal/e1acb366491c40dbbb362347d855d92d/user-1001 (Bad message) 0015d0: Unused data (entry_offset==0) [ 1010.266193] systemd-journald[2306]: Failed to write entry (13 items, 429 bytes) despite vacuuming, ignoring: Bad message [ 1010.267833] systemd-journald[2306]: /var/log/journal/e1acb366491c40dbbb362347d855d92d/system.journal: Journal file corrupted, rotating. [ 1010.271599] systemd-journald[2306]: Failed to create new system journal: Argument list too long [ 1010.273421] systemd-journald[2306]: Failed to write entry (13 items, 396 bytes) despite vacuuming, ignoring: Bad message [ 1010.277275] systemd-journald[2306]: /var/log/journal/e1acb366491c40dbbb362347d855d92d/user-1002.journal: Journal file corrupted, rotating. [ 1010.281075] systemd-journald[2306]: Failed to create new system journal: Argument list too long [ 1010.286775] systemd-journald[2306]: Failed to create new user journal: Argument list too long [ 1010.289336] systemd-journald[2306]: Failed to write entry (13 items, 366 bytes) despite vacuuming, ignoring: Bad message I am running version 219 of systemd. The above problem can also occur if there are too many files that systemd-journald sees, not only in the local /var/log/journal/123... directory, but also in (for example) the /var/log/journal/remote directory. Apparently this is a per-directory max of somewhere around 160(?) files. Scenario: This (lots of error messages to tty1) started happening about a month ago. Clearing all the journal files in the local /var/log/journal/123... directory & restarting did not fix the problem. Then I manually purged most of the /var/log/journal/remote directory, & then journaling to the local /var/log/journal/123... directory worked. Note that I was not running systemd-journal-remote was not running on the problem system; the /var/log/journal/remote directory was being populated by using RSYNC from another host. Unfortunately (at least on version 219), "journalctl -D /var/log/journal/remote --vacuum-time=5weeks" DOES NOTHING. Purging has to be done manually. Also unfortunately, since I do not have access to https://access.redhat.com/errata/RHSA-2020:4007, I have no idea whether that fix is relevant to the above problem. Forgot: Here is my journald.conf: # -- /etc/systemd/journald.conf -- # The default setting for MaxFileSec is *INSANE*, as it allows one # old entry in a journal to cause the entire journal to be deleted! [Journal] Storage = persistent SplitMode = none SystemMaxUse = 8G SystemKeepFree = 8G SystemMaxFileSize = 1G MaxRetentionSec = 5weeks MaxFileSec = 1day ForwardToSyslog = no |