Bug 1016717

Summary: memory leak in range searches
Product: Red Hat Enterprise Linux 6 Reporter: mreynolds
Component: 389-ds-baseAssignee: Rich Megginson <rmeggins>
Status: CLOSED ERRATA QA Contact: Sankar Ramalingam <sramling>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: amsharma, jgalipea, nhosoi, nkinder, vashirov
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.2.11.15-34.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1016722 (view as bug list) Environment:
Last Closed: 2014-10-14 07:51:50 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:    
Bug Blocks: 1016722, 1061410    

Description mreynolds 2013-10-08 14:57:05 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/47517

In a range search like 
ldapsearch ... -b "cn=changelog" "(&(changenumber>=74)(changenumber<=84))"

valgrind reports the following memory leak:

==26736== 12 bytes in 3 blocks are definitely lost in loss record 128 of 1,619
==26736==    at 0x4A0881C: malloc (vg_replace_malloc.c:270)
==26736==    by 0x319DE4F8CB: slapi_ch_malloc (ch_malloc.c:155)
==26736==    by 0x390F752176: __os_umalloc (in /usr/lib64/libdb-5.2.so)
==26736==    by 0x390F71493D: __db_retcopy (in /usr/lib64/libdb-5.2.so)
==26736==    by 0x390F6EC9D3: __dbc_iget (in /usr/lib64/libdb-5.2.so)
==26736==    by 0x390F6FBC0B: __dbc_get_pp (in /usr/lib64/libdb-5.2.so)
==26736==    by 0x93D7FFF: idl_new_range_fetch (idl_new.c:466)
==26736==    by 0x93EB2A4: index_range_read_ext (index.c:1459)
==26736==    by 0x93D02DC: range_candidates (filterindex.c:619)
==26736==    by 0x93D0889: list_candidates (filterindex.c:773)
==26736==    by 0x93CEF11: filter_candidates_ext (filterindex.c:167)
==26736==    by 0x93D0B86: list_candidates (filterindex.c:836)

Comment 2 Viktor Ashirov 2014-07-28 16:25:27 UTC
Verifed using steps from https://bugzilla.redhat.com/show_bug.cgi?id=1016722#c4

Valgrind output doesn't have "range_candidates" messages. Hence marking as verified. 

Automated in basic test suit as bug1016717() in TET.

Comment 3 errata-xmlrpc 2014-10-14 07:51:50 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-2014-1385.html