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

Re: (ITS#6453) OpenLDAP memory leak on LDAP_TIMEOUT



alinachegalati@yahoo.com wrote:
> Full_Name: Alin Vasile
> Version: 2.4.19
> OS: Solaris 10
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (194.237.142.7)
>

A patch for this is now in CVS HEAD.

>
> Hi,
>
>     We have a memory leak LDAP_TIMEOUT is encountered on
> ldap_search_ext_invocation and we are unable to determine if it is related to
> OpenLdap or not. The following summarizes our code in case the LDAP_TIMEOUT
> response is returned :
>
>   LDAPMessage *res ;
>
>   // acquire connection
>
>   // perform search
>
>   if(rc == LDAP_TIMEOUT)
>   {
>      ldap_msgfree(res);
>      // return connection
>   }
>
>   Is ldap_msgfree(res) enough in this case ?
>
> We tested our program by enabling a low timeout and hence all ldap calls
> resulting in timeout. The memory leak is about 9 Megs in several minutes, at a
> load of 5 req/ sec.
>
>   dmalloc sees the following not allocated pointers
>
> 6642692 bytes : Line 640 of "io.c" starts at address 0xff2659c4
> <ber_get_next+468>  and ends at 0xff2659cc<ber_get_next+476>.
>
> 2019876 bytes : Line 277 of "memory.c" starts at address 0xff26676c
> <ber_memcalloc_x+132>  and ends at 0xff266774<ber_memcalloc_x+140>.
>
>
>


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