Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Cause: An internal schema list was not completed freed when the COS cache is released
Consequence: A memory leak.
Fix: Free the entire schema list from the COS cache.
Result: No memory leak
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/47969
When the COS cache is released, the schema cache is not correctly freed. We leak memory every time the cache is rebuilt.
{{{
==24017== 102 (72 direct, 30 indirect) bytes in 3 blocks are definitely lost in loss record 1,277 of 2,056
==24017== at 0x4C2745D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24017== by 0x4E854CA: slapi_ch_malloc (ch_malloc.c:155)
==24017== by 0x111F0244: cos_cache_add_attrval (cos_cache.c:1532)
==24017== by 0x111F2A48: cos_cache_schema_build (cos_cache.c:2751)
==24017== by 0x111EE46B: cos_cache_create (cos_cache.c:498)
==24017== by 0x111EE32E: cos_cache_wait_on_change (cos_cache.c:451)
==24017== by 0x718FE3A: ??? (in /usr/lib64/libnspr4.so)
==24017== by 0x77CEEE4: start_thread (in /usr/lib64/libpthread-2.18.so)
==24017== by 0x7AD8B8C: clone (in /usr/lib64/libc-2.18.so)
}}}
Fixed upstream.
Verification steps:
[1] setup DS using valgrind
[2] Add 2 COS templates and definitions
[3] Modify the template in any way
[4] stop theserver and check the valgrind output file for "cos_cache_add_attrval"
[5] If it's not found the leak is fixed.
[root@qe-blade-09 export]# ldapmodify -x -a -D "cn=Directory Manager" -w Secret123 -p 389 -h localhost -f /export/1169975COS.ldif
adding new entry "cn=cosTemplateExample,ou=People,dc=example,dc=com"
adding new entry "cn=cosTemplateExample1,ou=People,dc=example,dc=com"
adding new entry "cn=cosPointer,ou=People,dc=example,dc=com"
adding new entry "cn=cosPointer1,ou=People,dc=example,dc=com"
[root@qe-blade-09 export]# ldapmodify -x -D "cn=Directory Manager" -w Secret123 -p 389 -h localhost << EOF
dn: cn=cosTemplateExample,ou=People,dc=example,dc=com
changetype: modify
replace: st
st: AND
EOF
modifying entry "cn=cosTemplateExample,ou=People,dc=example,dc=com"
[root@qe-blade-09 export]# service dirsrv stop
Shutting down dirsrv:
qe-blade-09...[ OK
there is no memory leak for COS, but there are other leaks. PFA for the valgrind output and suggest, if they required to be fixed.
I am marking this bug as VERIFIED as no leaks for COS found.
Hi Amita,
You can mark this as verified. There are other virtual attribute search leaks, but there is already a ticket open for those. The rest of the leaks can be ignored and are harmless (startup) leaks.
Thanks,
Mark
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.
https://rhn.redhat.com/errata/RHBA-2015-1326.html