RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1361120 - Memory leaks found in systemd and its subcomponents
Summary: Memory leaks found in systemd and its subcomponents
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: systemd-maint
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On:
Blocks: 1400961 1472751
TreeView+ depends on / blocked
 
Reported: 2016-07-28 11:30 UTC by Frantisek Sumsal
Modified: 2017-08-22 10:22 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-22 10:22:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
# systemctl disable postfix (2.63 KB, text/plain)
2016-07-28 11:31 UTC, Frantisek Sumsal
no flags Details
# systemctl enable postfix (1.93 KB, text/plain)
2016-07-28 11:32 UTC, Frantisek Sumsal
no flags Details
# journalctl --no-pager -u system.slice (2.19 KB, text/plain)
2016-07-28 11:32 UTC, Frantisek Sumsal
no flags Details
/usr/lib/systemd/systemd-modules-load (1.65 KB, text/plain)
2016-07-28 11:32 UTC, Frantisek Sumsal
no flags Details
/usr/lib/systemd/systemd (75.24 KB, text/plain)
2016-07-28 11:33 UTC, Frantisek Sumsal
no flags Details
# journalctl --no-pager -u system.slice (2.29 KB, text/plain)
2016-08-22 07:21 UTC, Frantisek Sumsal
no flags Details
/usr/lib/systemd/systemd-modules-load (1.71 KB, text/plain)
2016-08-22 07:22 UTC, Frantisek Sumsal
no flags Details
/usr/lib/systemd/systemd (75.28 KB, text/plain)
2016-08-22 07:24 UTC, Frantisek Sumsal
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1331667 0 urgent CLOSED [rhel7.3] Backport memory leak bug fixes 2021-02-22 00:41:40 UTC

Internal Links: 1331667

Description Frantisek Sumsal 2016-07-28 11:30:12 UTC
systemd package version: systemd-219-24.el7.x86_64

These memory leaks were found in systemd package already recompiled with -DVALGRIND=1 option. It's worth mentioning that all these commands/binaries were run in an nspawn container.

Issued commands/executed binaries:
1) # systemctl disable postfix
2) # systemctl enable postfix
3) # journalctl --no-pager -u system.slice
4) # /usr/lib/systemd/systemd-modules-load
5) # /usr/lib/systemd/systemd

As the valgrind logs are quite big, I'll add them as attachments rather than pasting them directly into this comment.

Comment 1 Frantisek Sumsal 2016-07-28 11:31:46 UTC
Created attachment 1185042 [details]
# systemctl disable postfix

Comment 2 Frantisek Sumsal 2016-07-28 11:32:05 UTC
Created attachment 1185043 [details]
# systemctl enable postfix

Comment 3 Frantisek Sumsal 2016-07-28 11:32:22 UTC
Created attachment 1185044 [details]
# journalctl --no-pager -u system.slice

Comment 4 Frantisek Sumsal 2016-07-28 11:32:43 UTC
Created attachment 1185045 [details]
/usr/lib/systemd/systemd-modules-load

Comment 5 Frantisek Sumsal 2016-07-28 11:33:03 UTC
Created attachment 1185046 [details]
/usr/lib/systemd/systemd

Comment 7 Frantisek Sumsal 2016-08-22 07:18:57 UTC
On Friday I found out that systemd-nspawnd -D behaves differently than systemd-nspawnd -bD - even though I had the recompiled version installed literally everywhere, it still somehow showed leaks which it shouldn't show. After rewriting our test case to use systemd-nspawnd -bD with systemd-run -M I was able to (hopefully) get relevant results for the most recent systemd version.

I'll upload the new valgrind logs shortly.

Comment 8 Frantisek Sumsal 2016-08-22 07:19:31 UTC
Comment on attachment 1185042 [details]
# systemctl disable postfix

No leaks found in the new version.

Comment 9 Frantisek Sumsal 2016-08-22 07:19:54 UTC
Comment on attachment 1185043 [details]
# systemctl enable postfix

No leaks found in the new version.

Comment 10 Frantisek Sumsal 2016-08-22 07:21:57 UTC
Created attachment 1192781 [details]
# journalctl --no-pager -u system.slice

Comment 11 Frantisek Sumsal 2016-08-22 07:22:54 UTC
Created attachment 1192782 [details]
/usr/lib/systemd/systemd-modules-load

Comment 12 Frantisek Sumsal 2016-08-22 07:24:00 UTC
Created attachment 1192783 [details]
/usr/lib/systemd/systemd

Comment 15 Frantisek Sumsal 2017-08-22 08:33:27 UTC
After several meetings with Michal, we managed to fix the test case by adding suppression rules for false-positives and other measures for accurate results reporting. Now valgrind reports no memory leaks for all mentioned scenarios in this thread. I would say it is safe to close this issue as it works in current release.


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