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.

Bug 711241

Summary: memory leak found by reliab12
Product: Red Hat Enterprise Linux 6 Reporter: Noriko Hosoi <nhosoi>
Component: 389-ds-baseAssignee: Rich Megginson <rmeggins>
Status: CLOSED ERRATA QA Contact: Chandrasekar Kannan <ckannan>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.1CC: amsharma, benl, dpal, jgalipea, jwest
Target Milestone: rcKeywords: ZStream
Target Release: 6.2   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 389-ds-base-1.2.8.4-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 697027 Environment:
Last Closed: 2011-12-06 17:48:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 697027, 717073    
Bug Blocks: 714607    
Attachments:
Description Flags
git patch file (RHEL-6) rmeggins: review+

Description Noriko Hosoi 2011-06-06 23:34:53 UTC
+++ This bug was initially created as a clone of Bug #697027 +++

Description of problem:
It turned out the leak found by reliab12 was the same as the case 6 of #697027.  This leak is a test stopper.

Created attachment 492469 [details]
git patch file (master): [Case 6]

ruvstore>
==28643== 48 bytes in 3 blocks are definitely lost in loss record 579 of 1,499
==28643==    at 0x4C23481: calloc (vg_replace_malloc.c:418)
==28643==    by 0x4E70F19: slapi_ch_calloc (ch_malloc.c:243)
==28643==    by 0x4E72AE6: csn_new (csn.c:102)
==28643==    by 0x4E72B1D: csn_new_by_string (csn.c:112)
==28643==    by 0x4E80146: str2entry_state_information_from_type (entry.c:131)
==28643==    by 0x4E8179F: str2entry_dupcheck (entry.c:786)
==28643==    by 0x4E82D4B: slapi_str2entry_ext (entry.c:1405)
==28643==    by 0xBC6146C: id2entry (id2entry.c:406)
==28643==    by 0xBC9D7C0: ldbm_back_next_search_entry_ext (ldbm_search.c:1296)
==28643==    by 0xBC9D1D7: ldbm_back_next_search_entry (ldbm_search.c:1141)
==28643==    by 0x4EB9211: iterate (opshared.c:1141)
==28643==    by 0x4EB9ACF: send_results_ext (opshared.c:1522)
==28643==    by 0x4EB8979: op_shared_search (opshared.c:733)
==28643==    by 0x42BBE4: do_search (search.c:393)
==28643==    by 0x413B76: connection_dispatch_operation (connection.c:611)
==28643==    by 0x4152BF: connection_threadmain (connection.c:2328)
==28643==    by 0x5FCD632: _pt_root (ptthread.c:187)
==28643==    by 0x61E8760: start_thread (pthread_create.c:301)
==28643==    by 0x64DD98C: clone (clone.S:115)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Bug 697027 - 6 - minor memory leaks found by Valgrind + TET
Description: Moving "csn_free(&attributedeletioncsn)" to the
free_and_return section to fix the leak.

Comment 2 Noriko Hosoi 2011-06-06 23:46:37 UTC
More accurate stacktrace which causes the leak in reliab12 test.
#0  str2entry_state_information_from_type (s=<value optimized out>,
    csnset=0x7feb661f1620, attributedeletioncsn=0x7feb661f1628,
    maxcsn=0x7feb661f1638, value_state=0x7feb661f166c,
    attr_state=0x7feb661f1668) at ldap/servers/slapd/entry.c:131
#1  0x0000003594056805 in str2entry_dupcheck (rawdn=0x0,
    s=<value optimized out>, flags=1024, read_stateinfo=-1)
    at ldap/servers/slapd/entry.c:786
#2  0x0000003594057b8d in slapi_str2entry_ext (
    dn=0x7feb48003280 "cn=data_1770,ou=ou2 with space,o=o1",
    s=0x7feb480036a0 "rdn", flags=1024) at ldap/servers/slapd/entry.c:1401
#3  0x00007feb7a047368 in id2entry (be=0x284ef30, id=918, txn=0x0,
    err=<value optimized out>) at ldap/servers/slapd/back-ldbm/id2entry.c:406
#4  0x00007feb7a086d41 in uniqueid2entry (be=0x284ef30,
    uniqueid=<value optimized out>, txn=0x0, err=0x7feb661f58cc)
    at ldap/servers/slapd/back-ldbm/uniqueid2entry.c:86
#5  0x00007feb7a0469eb in find_entry_internal_uniqueid (pb=0x2b03860,
    be=0x284ef30, addr=<value optimized out>, lock=1, txn=0x0,
    really_internal=<value optimized out>)
    at ldap/servers/slapd/back-ldbm/findentry.c:219
#6  find_entry_internal (pb=0x2b03860, be=0x284ef30,
    addr=<value optimized out>, lock=1, txn=0x0,
    really_internal=<value optimized out>)
    at ldap/servers/slapd/back-ldbm/findentry.c:275
#7  0x00007feb7a071ddb in ldbm_back_modify (pb=0x2b03860)
    at ldap/servers/slapd/back-ldbm/ldbm_modify.c:266
#8  0x000000359407b83c in op_shared_modify (pb=<value optimized out>,
    pw_change=0, old_pw=0x0) at ldap/servers/slapd/modify.c:886
#9  0x000000359407c696 in do_modify (pb=0x2b03860)
    at ldap/servers/slapd/modify.c:384
#10 0x00000000004135e4 in connection_dispatch_operation ()
    at ldap/servers/slapd/connection.c:583
#11 connection_threadmain () at ldap/servers/slapd/connection.c:2328
#12 0x0000003e5c829633 in ?? () from /lib64/libnspr4.so
#13 0x0000003e4d8077e1 in start_thread () from /lib64/libpthread.so.0
#14 0x0000003e4d4e68ed in clone () from /lib64/libc.so.6

Comment 3 Noriko Hosoi 2011-06-06 23:59:11 UTC
Created attachment 503349 [details]
git patch file (RHEL-6)

Description: str2entry_dupcheck (entry.c):
If attributedeletioncsn was associated with entrydn and flag
SLAPI_STR2ENTRY_NO_ENTRYDN is set, the address was not released.
This patch fixes the leak.

cherry-picked commit: 2af101b69ece052498158fd50804d843d75ef1a0

Comment 5 Noriko Hosoi 2011-06-27 22:03:14 UTC
*** Bug 717073 has been marked as a duplicate of this bug. ***

Comment 8 Amita Sharma 2011-09-08 11:22:49 UTC
Cloned https://bugzilla.redhat.com/show_bug.cgi?id=697027 is VERIFIED hence marking this as VERIFIED

Comment 9 errata-xmlrpc 2011-12-06 17:48:52 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/RHEA-2011-1711.html