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 784119 - schema compat is able to consume over 16 gigs of ram and crash the kernel
Summary: schema compat is able to consume over 16 gigs of ram and crash the kernel
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: slapi-nis
Version: 6.2
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Nalin Dahyabhai
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On: 771493
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-23 21:17 UTC by Rob Crittenden
Modified: 2012-06-20 13:36 UTC (History)
6 users (show)

Fixed In Version: slapi-nis-0.37-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 771493
Environment:
Last Closed: 2012-06-20 13:36:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
sample reproducer (1.71 KB, text/plain)
2012-01-31 05:27 UTC, Nalin Dahyabhai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0821 0 normal SHIPPED_LIVE slapi-nis bug fix and enhancement update 2012-06-19 19:51:13 UTC

Description Rob Crittenden 2012-01-23 21:17:49 UTC
+++ This bug was initially created as a clone of Bug #771493 +++

Description of problem:
When processing a great deal of individual changes triggered from the memberof plugin in realtime, schema compat is capable of a sort of storm situation which can consume all available memory to the point of exhaustion.

Version-Release number of selected component (if applicable):
slapi-nis-0.28-1.fc15.x86_64

How reproducible:
100%

Steps to Reproduce:
0. Start with a vanilla FreeIPA Server Install
1. For performance reasons, I find its best to disable schema compat for the import.
2. Import the attached ldif to populate the Directory or run the attached scripted commands to populate the Directory. (This will take 'a long time')
3. Delete the sudorule named admins: ipa sudorule-del admins
4. Run various ldap / freeipa commands: ipa host-find, ldapsearch etc, Notice the huge performance hit.
  
Actual results:
Substantial Memory usage and intense usage of slapd process causes serious performance hit. 

Expected results:
Release previously stored values when computing new schema compat modifications and don't consume all available memory.
Optimized performance during memberof updates.

Additional info:

--- Additional comment from jr.aquino on 2012-01-03 16:45:50 EST ---

Created attachment 550537 [details]
Ldif for complete test directory

--- Additional comment from jr.aquino on 2012-01-03 16:47:21 EST ---

Created attachment 550538 [details]
Scripts to populate Test FreeIPA Directory

As an alternative to importing the previously attached ldif, you should be able to use the included batch scripts to fully populate the test FreeIPA database.

--- Additional comment from nalin on 2012-01-19 14:44:10 EST ---

0.31 and later fix some memory leaks, one of which is quite severe.  Please retest with the candidate update, once it's built, and let me know if the server's memory usage continues to grow without apparent bound -- on my test systems, it's affected (sometimes contrary to my expectations) somewhat by the cache sizes set in the server's cn=config entry.

--- Additional comment from rmeggins on 2012-01-19 15:01:35 EST ---

(In reply to comment #3)
> 0.31 and later fix some memory leaks, one of which is quite severe.  Please
> retest with the candidate update, once it's built, and let me know if the
> server's memory usage continues to grow without apparent bound -- on my test
> systems, it's affected (sometimes contrary to my expectations) somewhat by the
> cache sizes set in the server's cn=config entry.

Yeah - there appears to be a memory leak if the cache is too small to hold all of the entries.  What happens then is that the entries are churned - repeatedly added and deleted - there must be either a memory leak during deletion, or just the accumulated memory fragmentation over time that causes the memory usage to go up.  This may be https://fedorahosted.org/389/ticket/51 - the solution for that is to make sure the nsslapd-cachememsize is large enough to contain all of the data.

--- Additional comment from updates on 2012-01-19 15:02:50 EST ---

slapi-nis-0.34-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/slapi-nis-0.34-1.fc15

--- Additional comment from updates on 2012-01-19 15:03:11 EST ---

slapi-nis-0.34-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/slapi-nis-0.34-1.fc16

--- Additional comment from updates on 2012-01-21 16:49:29 EST ---

Package slapi-nis-0.34-1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing slapi-nis-0.34-1.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-0722/slapi-nis-0.34-1.fc16
then log in and leave karma (feedback).

Comment 1 Nalin Dahyabhai 2012-01-31 05:27:27 UTC
Created attachment 558524 [details]
sample reproducer

A script to load test data, based on the original bug report's data set.  When it gets to the "ipa group-add-member" invocation, memory usage will grow noticeably as the plugin visits each of the group's member entries as each member is added to the group, and leaks the contents of those entries.

Comment 3 Jenny Severance 2012-05-25 12:22:28 UTC
verified ::

reproducer script executed on VM with 1GIG memory.  No OOM.

Actual changes took 36101 seconds.
Settled after 211 seconds.

verision ::
ipa-server-2.2.0-15.el6.i686
slapi-nis-0.40-1.el6.i686

Comment 4 errata-xmlrpc 2012-06-20 13:36:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0821.html


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