Bug 693785 - 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 5
Classification: Red Hat
Component: libtdb
Version: 5.7
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Stephen Gallagher
QA Contact:
URL:
Whiteboard:
Depends On: 692251
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-05 15:08 UTC by Stephen Gallagher
Modified: 2011-07-21 11:36 UTC (History)
9 users (show)

Fixed In Version: libtdb-1.2.1-6.el5
Doc Type: Bug Fix
Doc Text:
This field is the basis of the errata or release note for this bug. It can also be used for change logs. The Technical Note template, known as CCFR, is as follows: Cause A user account has been removed from a user group containing many members in LDAP. Consequence The SSSD client software, while removing the user from the local cache, experiences an explosion of memory usage, likely resulting in the OOM killer being triggered. Fix The SSSD's cache was corrected to properly clean up memory as it proceeded through the removal routines, thereby eliminating the memory explosion. Result The user is now properly removed from the user group in the cache without triggering the OOM killer.
Clone Of: 692251
Environment:
Last Closed: 2011-07-21 11:36:32 UTC
Target Upstream Version:


Attachments (Terms of Use)
test tool to reproduce this issue (2.09 KB, text/plain)
2011-05-13 11:46 UTC, Kaushik Banerjee
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1050 0 normal SHIPPED_LIVE libtdb bug fix update 2011-07-20 15:43:33 UTC

Comment 2 Kaushik Banerjee 2011-05-13 11:46:02 UTC
Created attachment 498753 [details]
test tool to reproduce this issue

Comment 3 Kaushik Banerjee 2011-05-13 11:51:05 UTC
Compile the above attached test tool with:
gcc -o tdb_expand_test -ltdb tdb_expand_test.c

Using libtdb-1.2.1-5.el5:
# time ./tdb_expand_test 

real	0m8.040s
user	0m0.167s
sys	0m0.930s
# ls -l test.tdb 
-rw------- 1 root root 143933440 May 13 17:03 test.tdb

Using libtdb-1.2.1-6.el5:
# time ./tdb_expand_test 

real	0m2.268s
user	0m0.055s
sys	0m0.159s
# ls -l test.tdb 
-rw------- 1 root root 15482880 May 13 17:04 test.tdb


Verified in version:
# rpm -qi libtdb
Name        : libtdb                       Relocations: (not relocatable)
Version     : 1.2.1                             Vendor: Red Hat, Inc.
Release     : 6.el5                         Build Date: Tue 12 Apr 2011 11:21:30 PM IST
Install Date: Fri 13 May 2011 05:04:42 PM IST      Build Host: x86-004.build.bos.redhat.com
Group       : System Environment/Daemons    Source RPM: libtdb-1.2.1-6.el5.src.rpm
Size        : 56636                            License: LGPLv3+
Signature   : (none)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://tdb.samba.org/
Summary     : The tdb library

Comment 5 Florian Nadge 2011-05-25 14:53:09 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause

The user runs fsck.gfs2 on a GFS2 file system in verbose mode (with the -v parameter).

Consequence

The user sees alarming error messages indicating that the master and root inode are not marked "In use" by the file system and an indication that the problem has been corrected:

System inode for 'master' is located at block 23 (0x17)
The inode exists but the block is not marked 'in use'; fixing it.
System inode for 'root' is located at block 22 (0x16)
The inode exists but the block is not marked 'in use'; fixing it.

There is no problem with either inode; the error messages are just misleading.

Fix

The code has been changed to set both the master and root inodes as "in use" in the in-core block map.

Result

As a result, fsck.gfs2 now realizes the master and root inodes are properly marked, so the error messages are not printed.

Comment 6 Stephen Gallagher 2011-05-25 14:57:39 UTC
(In reply to comment #5)
>     Technical note added. If any revisions are required, please edit the
> "Technical Notes" field
>     accordingly. All revisions will be proofread by the Engineering Content
> Services team.
> 
>     New Contents:
> Cause
> 
> The user runs fsck.gfs2 on a GFS2 file system in verbose mode (with the -v
> parameter).
> 
> Consequence
> 
> The user sees alarming error messages indicating that the master and root inode
> are not marked "In use" by the file system and an indication that the problem
> has been corrected:
> 
> System inode for 'master' is located at block 23 (0x17)
> The inode exists but the block is not marked 'in use'; fixing it.
> System inode for 'root' is located at block 22 (0x16)
> The inode exists but the block is not marked 'in use'; fixing it.
> 
> There is no problem with either inode; the error messages are just misleading.
> 
> Fix
> 
> The code has been changed to set both the master and root inodes as "in use" in
> the in-core block map.
> 
> Result
> 
> As a result, fsck.gfs2 now realizes the master and root inodes are properly
> marked, so the error messages are not printed.

I suspect that you intended this message for a different bug.

Comment 8 Florian Nadge 2011-05-26 12:02:29 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,22 +1,13 @@
-Cause
+This field is the basis of the errata or release note for this bug. It can also be used for change logs.
 
-The user runs fsck.gfs2 on a GFS2 file system in verbose mode (with the -v parameter).
+The Technical Note template, known as CCFR, is as follows:
 
+Cause
+    What actions or circumstances cause this bug to present.
 Consequence
-
-The user sees alarming error messages indicating that the master and root inode are not marked "In use" by the file system and an indication that the problem has been corrected:
-
-System inode for 'master' is located at block 23 (0x17)
-The inode exists but the block is not marked 'in use'; fixing it.
-System inode for 'root' is located at block 22 (0x16)
-The inode exists but the block is not marked 'in use'; fixing it.
-
-There is no problem with either inode; the error messages are just misleading.
-
+    What happens when the bug presents.
 Fix
-
-The code has been changed to set both the master and root inodes as "in use" in the in-core block map.
-
+    What was done to fix the bug.
 Result
-
+    What now happens when the actions or circumstances above occur.
-As a result, fsck.gfs2 now realizes the master and root inodes are properly marked, so the error messages are not printed.+    Note: this is not the same as the bug doesn’t present anymore.

Comment 9 Stephen Gallagher 2011-05-26 14:01:38 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -3,11 +3,13 @@
 The Technical Note template, known as CCFR, is as follows:
 
 Cause
-    What actions or circumstances cause this bug to present.
+    A user account has been removed from a user group containing many members in LDAP.
+
 Consequence
-    What happens when the bug presents.
+    The SSSD client software, while removing the user from the local cache, experiences an explosion of memory usage, likely resulting in the OOM killer being triggered.
+
 Fix
-    What was done to fix the bug.
+    The SSSD's cache was corrected to properly clean up memory as it proceeded through the removal routines, thereby eliminating the memory explosion.
+
 Result
-    What now happens when the actions or circumstances above occur.
+    The user is now properly removed from the user group in the cache without triggering the OOM killer.-    Note: this is not the same as the bug doesn’t present anymore.

Comment 10 errata-xmlrpc 2011-07-21 11:36:32 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/RHBA-2011-1050.html


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