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 694146 - SSSD consumes GBs of RAM, possible memory leak
Summary: SSSD consumes GBs of RAM, possible memory leak
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sssd
Version: 6.1
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Stephen Gallagher
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On: 692251
Blocks: 694149 694217
TreeView+ depends on / blocked
 
Reported: 2011-04-06 15:08 UTC by Stephen Gallagher
Modified: 2015-01-04 23:47 UTC (History)
11 users (show)

Fixed In Version: sssd-1.5.1-29.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 692251
: 694149 694217 (view as bug list)
Environment:
Last Closed: 2011-05-19 11:40:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
LDIF for bulk user creation (2.64 MB, text/plain)
2011-04-14 15:23 UTC, Stephen Gallagher
no flags Details
LDIF for bulk group membership addition (1.13 MB, text/plain)
2011-04-14 15:23 UTC, Stephen Gallagher
no flags Details
LDIF for bulk group membership removal (1.13 MB, text/plain)
2011-04-14 15:28 UTC, Stephen Gallagher
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0560 0 normal SHIPPED_LIVE Low: sssd security, bug fix, and enhancement update 2011-05-19 11:38:17 UTC

Comment 2 RHEL Program Management 2011-04-06 15:24:06 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 5 Stephen Gallagher 2011-04-14 15:23:20 UTC
Created attachment 492144 [details]
LDIF for bulk user creation

Comment 6 Stephen Gallagher 2011-04-14 15:23:50 UTC
Created attachment 492145 [details]
LDIF for bulk group membership addition

Comment 8 Stephen Gallagher 2011-04-14 15:28:16 UTC
Created attachment 492148 [details]
LDIF for bulk group membership removal

Comment 9 Stephen Gallagher 2011-04-14 15:42:04 UTC
These steps are a bit contrived, but they should adequately demonstrate the problem and the solution. Copy the three LDIF files attached to this bug to the test system. DO NOT PERFORM THIS TEST ON BARE IRON. Use a VM. If you don't kill the test before the memory grows too large, the OOM killer will start causing problems and you may have to forcibly kill the VM.

Steps to reproduce (all performed as root):
1) Set up SSSD with a single LOCAL domain (domain name must be LOCAL to use the attached LDIf files):

[sssd]
config_file_version = 2

services = nss, pam

domains = LOCAL

[nss]

[pam]
[domain/LOCAL]
description = LOCAL Users domain
id_provider = local
min_id = 1000


2) Stop SSSD, rm -f /var/lib/db/sssd.ldb; restart SSSD

3) Bulk load 10,000 users into the local domain using the usersadd.ldif
ldbadd -H /var/lib/db/sssd.ldb usersadd.ldif

4) Add the following two groups with the sss_groupadd command:
sss_groupadd largegroup1
sss_groupadd largegroup2
(They must be named largegroup1 and largegroup2 for the attached LDIFs to work properly)

5) Add the 10,000 users to each of those groups using groupadd.ldif
ldbmodify -H /var/lib/db/sssd.ldb groupadd.ldif

6) Open a separate window and run 'top'. Keep this window visible.

7) Remove group members from the two large groups using groupdel.ldif
ldbmodify -H /var/lib/db/sssd.ldb groupdel.ldif

While watching the 'top' window, you will see the memory percentage increase rapidly. Be prepared to kill the ldbmodify command before memory grows too high.

Comment 11 Gowrishankar Rajaiyan 2011-04-15 15:19:40 UTC
# rpm -q sssd
sssd-1.5.1-26.el6.x86_64

top - 14:48:32 up  2:08,  4 users,  load average: 0.91, 0.63, 0.36
Tasks: 125 total,   2 running, 123 sleeping,   0 stopped,   0 zombie
Cpu(s): 26.0%us,  1.3%sy,  0.0%ni, 72.6%id,  0.0%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:  15377228k total, 13581608k used,  1795620k free,    19096k buffers
Swap: 15470584k total,        0k used, 15470584k free,   234996k cached


# rpm -q sssd
sssd-1.5.1-29.el6.x86_64

top - 14:54:03 up  2:14,  4 users,  load average: 0.99, 0.79, 0.49
Tasks: 125 total,   2 running, 123 sleeping,   0 stopped,   0 zombie
Cpu(s): 24.4%us,  0.7%sy,  0.0%ni, 75.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  15377228k total,   767704k used, 14609524k free,    19980k buffers
Swap: 15470584k total,        0k used, 15470584k free,   247280k cached


Memory doesn't keep growing. Verified. 
# rpm -qi sssd
Name        : sssd                         Relocations: (not relocatable)
Version     : 1.5.1                             Vendor: Red Hat, Inc.
Release     : 29.el6                        Build Date: Thu 14 Apr 2011 09:56:12 PM IST
Install Date: Fri 15 Apr 2011 02:49:16 PM IST      Build Host: ls20-bc2-14.build.redhat.com
Group       : Applications/System           Source RPM: sssd-1.5.1-29.el6.src.rpm
Size        : 3462869                          License: GPLv3+
Signature   : (none)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://fedorahosted.org/sssd/
Summary     : System Security Services Daemon

Comment 12 errata-xmlrpc 2011-05-19 11:40:48 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0560.html

Comment 13 errata-xmlrpc 2011-05-19 13:10:20 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0560.html


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