Bug 880592

Summary: systemd-journald address space usage gone crazy (persistent storage)
Product: [Fedora] Fedora Reporter: Paolo Bonzini <pbonzini>
Component: systemdAssignee: systemd-maint
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: johannbg, lnykryn, metherid, msekleta, notting, pbonzini, plautrba, systemd-maint, vpavlin
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-07 16:55:08 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:
Attachments:
Description Flags
/proc/PID/maps file for systemd-journald none

Description Paolo Bonzini 2012-11-27 12:00:01 UTC
Created attachment 652639 [details]
/proc/PID/maps file for systemd-journald

Description of problem:
I noticed that top was reporting 16.5G of address space used by journald.
My /etc/systemd/journald.conf has the following:

[Journal]
Storage=persistent

/proc/286/maps.log has a few thousand 4100K mappings of journal files, and running "strace -e mmap,munmap -p 286" confirmed the leak:

mmap(NULL, 4198400, PROT_READ|PROT_WRITE, MAP_SHARED, 14, 0x1692000) = 0x7fc90247e000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc90247d000
munmap(0x7fc90247d000, 4096)            = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc90247d000
munmap(0x7fc90247d000, 4096)            = 0
...
mmap(NULL, 4198400, PROT_READ|PROT_WRITE, MAP_SHARED, 14, 0x1693000) = 0x7fc90207d000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc90207c000
munmap(0x7fc90207c000, 4096)            = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc90207c000
munmap(0x7fc90207c000, 4096)            = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc90207c000
...

Version-Release number of selected component (if applicable):
Unfortunately I noticed this only after an update, but it should be 195-4 or -5 based on the uptime of the system.

Comment 1 Lennart Poettering 2013-03-07 16:18:23 UTC
Which version of systemd is this? Can you reproduce this with the current version from F18?

Comment 2 Paolo Bonzini 2013-03-07 16:55:08 UTC
I cannot reproduce it with systemd-197-1.fc18.2.x86_64.

Seems to be fixed.