[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#5112) memory leak in pcache overlay



rhafer@suse.de wrote:
> Full_Name: Ralf Haferkamp
> Version: RE23, HEAD

> Valgrind gives me the log pasted below when I abort an ldapsearch command
> (CTRL-C) that is running against a back-ldap database that uses the pcache
> overlay.

Makes sense. We need to use the cleanup handler and free the saved query info 
if op->o_abandon is set. Do you want to code this up?

> ==20850== 53,092 (35,830 direct, 17,262 indirect) bytes in 883 blocks are
> definitely lost in loss record 17 of 18
> ==20850==    at 0x4C22AC6: malloc (in
> /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
> ==20850==    by 0x508A940: ber_memalloc_x (memory.c:226)
> ==20850==    by 0x4ABEEE: slap_sl_malloc (sl_malloc.c:273)
> ==20850==    by 0x4487C0: filter_dup (filter.c:801)
> ==20850==    by 0x5AB151: pcache_op_search (pcache.c:2237)
> ==20850==    by 0x4C3F41: overlay_op_walk (backover.c:642)
> ==20850==    by 0x4C41D3: over_op_func (backover.c:704)
> ==20850==    by 0x4C4269: over_op_search (backover.c:726)
> ==20850==    by 0x446210: fe_op_search (search.c:369)
> ==20850==    by 0x445B2E: do_search (search.c:217)
> ==20850==    by 0x4427DB: connection_operation (connection.c:1145)
> ==20850==    by 0x442CA6: connection_read_thread (connection.c:1271)
> 
> The database configuration looks like this:
> -----------------------------
> database ldap
> suffix o=test
> uri             ldap://xxxxxxxxxxxxxxxxx
> readonly        on
> lastmod         off
> 
> overlay pcache
> proxycache      bdb 100000 1 10000 180
> proxyattrset    0 givenname uid ou o cn sn mail objectclass
> 
> ###
> proxytemplate   (|(cn=)(mail=)(uid=)) 0 86400
> 
> directory       /var/lib/ldap/pcache
> cachesize       10000
> index           objectclass,queryid eq
> index           sn,cn,givenname,uid,mail pres,eq,sub
> -----------------------------
> 
> 
> 


-- 
   -- Howard Chu
   Chief Architect, Symas Corp.  http://www.symas.com
   Director, Highland Sun        http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP     http://www.openldap.org/project/