Red Hat Bugzilla – Bug 831132
systemd journal leaks all logs into memory
Last modified: 2012-06-20 15:25:12 EDT
Description of problem:
systemd-journald does not munmap log files after rotation. By default this log files are stored in /run/log/journal, which is a tmpfs filesystem, so old log files, though deleted, still occupy memory.
Fortunately it crashed before eating all memory:
Jun 11 16:46:26 myhost kernel: [150734.343131] systemd-journal: segfault at 8 ip 00000000004061c2 sp 00007fff655d45a0 error 4 in systemd-journald[400000+1f000]
Jun 11 16:46:27 myhost systemd: systemd-journald.service: main process exited, code=killed, status=11
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Run a service that generates lots of syslog. Wait until journal logs are rotated.
/run file system and memory is filling up indefinitely. systemd-journald has all rotated log files mapped into memory:
lsof -c systemd-journal | grep /run/log/journal
By default systemd-journald should use no more than 10% of /run filesystem.
Only /run/log/journal/*/system.journal should be mapped into memory.
systemd-journald crashed when no space left on /run filesystem.
I can reproduce the leaks in Rawhide.
I think it's f->header that's leaked.
systemd-44-13.fc17 has been submitted as an update for Fedora 17.
There are no leaks with systemd-44-13. Thanks.
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-44-14.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
systemd-44-14.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.