Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
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:
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


Attachments (Terms of Use)
# systemctl disable postfix (deleted)
2016-07-28 11:31 UTC, Frantisek Sumsal
no flags Details
# systemctl enable postfix (deleted)
2016-07-28 11:32 UTC, Frantisek Sumsal
no flags Details
# journalctl --no-pager -u system.slice (deleted)
2016-07-28 11:32 UTC, Frantisek Sumsal
no flags Details
/usr/lib/systemd/systemd-modules-load (deleted)
2016-07-28 11:32 UTC, Frantisek Sumsal
no flags Details
/usr/lib/systemd/systemd (deleted)
2016-07-28 11:33 UTC, Frantisek Sumsal
no flags Details
# journalctl --no-pager -u system.slice (deleted)
2016-08-22 07:21 UTC, Frantisek Sumsal
no flags Details
/usr/lib/systemd/systemd-modules-load (deleted)
2016-08-22 07:22 UTC, Frantisek Sumsal
no flags Details
/usr/lib/systemd/systemd (deleted)
2016-08-22 07:24 UTC, Frantisek Sumsal
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1331667 None CLOSED [rhel7.3] Backport memory leak bug fixes 2018-12-27 18:17:00 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.