Bug 1016722

Summary: memory leak in range searches
Product: Red Hat Enterprise Linux 7 Reporter: mreynolds
Component: 389-ds-baseAssignee: Rich Megginson <rmeggins>
Status: CLOSED CURRENTRELEASE QA Contact: Sankar Ramalingam <sramling>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: amsharma, jgalipea, mreynolds, nkinder
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.1.6-6.el7 Doc Type: Bug Fix
Doc Text:
Cause: Performing a search with a compound filter using range filters. Consequence: Memory leak, and potential exhaustion of available memory on the system. Fix: Resolve memory leak. Result: Searches using range filters do not leak memory.
Story Points: ---
Clone Of: 1016717 Environment:
Last Closed: 2014-06-13 10:25: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: 1016717    
Bug Blocks:    
Attachments:
Description Flags
valgrind output none

Description mreynolds 2013-10-08 15:01:13 UTC
+++ This bug was initially created as a clone of Bug #1016717 +++

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 5 Amita Sharma 2014-02-12 10:11:29 UTC
Created attachment 862183 [details]
valgrind output

Thanks Mark for the clean steps :)

PFA for the valgrind output, it does not have "range_candidates" So marking bug as VERIFIED.

Comment 6 Amita Sharma 2014-03-11 12:27:24 UTC
Automated in Basic test suit as bug1016722() in TET.

Comment 7 Ludek Smid 2014-06-13 10:25:52 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.