Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 694146 - SSSD consumes GBs of RAM, possible memory leak
SSSD consumes GBs of RAM, possible memory leak
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sssd (Show other bugs)
6.1
x86_64 Linux
high Severity high
: rc
: ---
Assigned To: Stephen Gallagher
Chandrasekar Kannan
:
Depends On: 692251
Blocks: 694149 694217
  Show dependency treegraph
 
Reported: 2011-04-06 11:08 EDT by Stephen Gallagher
Modified: 2015-01-04 18:47 EST (History)
11 users (show)

See Also:
Fixed In Version: sssd-1.5.1-29.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 692251
: 694149 694217 (view as bug list)
Environment:
Last Closed: 2011-05-19 07:40:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0560 normal SHIPPED_LIVE Low: sssd security, bug fix, and enhancement update 2011-05-19 07:38:17 EDT

  None (edit)
Comment 2 RHEL Product and Program Management 2011-04-06 11:24:06 EDT
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 11:23:20 EDT
Created attachment 492144 [details]
LDIF for bulk user creation
Comment 6 Stephen Gallagher 2011-04-14 11:23:50 EDT
Created attachment 492145 [details]
LDIF for bulk group membership addition
Comment 8 Stephen Gallagher 2011-04-14 11:28:16 EDT
Created attachment 492148 [details]
LDIF for bulk group membership removal
Comment 9 Stephen Gallagher 2011-04-14 11:42:04 EDT
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 11:19:40 EDT
# 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 07:40:48 EDT
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 09:10:20 EDT
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.