Bug 831132 - systemd journal leaks all logs into memory
systemd journal leaks all logs into memory
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
17
All All
unspecified Severity high
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-12 05:33 EDT by Artur Zaprzała
Modified: 2012-06-20 15:25 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 15:25:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Artur Zaprzała 2012-06-12 05:33:21 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[310]: segfault at 8 ip 00000000004061c2 sp 00007fff655d45a0 error 4 in systemd-journald[400000+1f000]
Jun 11 16:46:27 myhost systemd[1]: systemd-journald.service: main process exited, code=killed, status=11


Version-Release number of selected component (if applicable):
systemd-44-12.fc17.x86_64


How reproducible:
Always.


Steps to Reproduce:
Run a service that generates lots of syslog. Wait until journal logs are rotated.

  
Actual results:
/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


Expected results:
By default systemd-journald should use no more than 10% of /run filesystem.
Only /run/log/journal/*/system.journal should be mapped into memory.
Comment 1 Artur Zaprzała 2012-06-12 05:52:07 EDT
systemd-journald crashed when no space left on /run filesystem.
Comment 2 Michal Schmidt 2012-06-12 07:09:33 EDT
I can reproduce the leaks in Rawhide.
Comment 3 Michal Schmidt 2012-06-12 07:15:49 EDT
I think it's f->header that's leaked.
Comment 5 Fedora Update System 2012-06-12 20:15:07 EDT
systemd-44-13.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/systemd-44-13.fc17
Comment 6 Artur Zaprzała 2012-06-13 07:53:15 EDT
There are no leaks with systemd-44-13. Thanks.
Comment 7 Fedora Update System 2012-06-15 08:28:01 EDT
Package systemd-44-14.fc17:
* 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:
https://admin.fedoraproject.org/updates/FEDORA-2012-9471/systemd-44-14.fc17
then log in and leave karma (feedback).
Comment 8 Fedora Update System 2012-06-20 15:25:12 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.