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

Re: (ITS#3862) Memory leak in back-ldap

On Lun 18 juillet 2005 14:27, Pierangelo Masarati wrote:
>> I can reproduce the problem with CVS/OPENLDAP_REL_ENG_2_2 of today :
> by CVS/OPENLDAP_REL_ENG_2_2 do you mean HEAD or 2.2 from CVS?

It is a cvs checkout with -rOPENLDAP_REL_ENG_2_2.

>> ==3690== 192 bytes in 8 blocks are definitely lost in loss record 2 of 6
>> ==3690==    at 0x1B905901: calloc (vg_replace_malloc.c:176)
>> ==3690==    by 0x80F1E5E: ber_memcalloc_x (memory.c:286)
>> ==3690==    by 0x80D3F48: try_read1msg (result.c:836)
>> ==3690==    by 0x80D387E: wait4msg (result.c:378)
>> ==3690==    by 0x80D33B9: ldap_result (result.c:126)
>> ==3690==    by 0x80A99FB: ldap_back_search (search.c:181)
>> ==3690==    by 0x805A3D4: do_search (search.c:412)
>> ==3690==    by 0x8058C31: connection_operation (connection.c:1079)
>> ==3690==    by 0x80D2172: ldap_int_thread_pool_wrapper (tpool.c:467)
>> ==3690==    by 0x1BA08D64: thread_wrapper (vg_libpthread.c:886)
>> ==3690==    by 0xB000F5DF: do__quit (vg_scheduler.c:1872)
>> Do you want I give you an exact way to reproduce it ?
> Yes, please.

I use my load testing software Charge (1.2.2) :
To build it, just type make.
Then you can run it with the following configuration file :

<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE charge SYSTEM "charge.dtd">

<server name="default" host="" port="1389" ldapversion="3"/>
<list name="root">
		<item value="cn=Manager,dc=my-domain,dc=com"/>
		<item value="secret"/>
<list name="_2search">
		<item value="dc=my-domain,dc=com"/>
		<item value="sub"/>
		<item value="objectClass=*"/>
		<item value="*"/>
		<item value="dc=my-domain,dc=com"/>
		<item value="sub"/>
		<item value=""/>
		<item value="ou"/>
<seq nb="10" it="100">
	<op type="bind" nb="1" name="root"/>
	<op type="search" nb="2" name="_2search"/>
	<op type="unbind" nb="1"/>

Of course you can change the path to the DTD file if necessary and the
host/port/admin/pass to connect the server.

Just type
./charge path/to/your/charge.conf

Break Charge with Crtl-C during searches. You will get each time the leak

>> Note that I use a client with an old library (2.1.30/ubuntu). I don't
>> know
>> if it can change something...
> It should not be relevant; in case, I'll build a 2.1.30 for the purpose.
>> I can reproduce the other memory leak with 2.3.4 too. Do you want I fill
>> an other ITS ?
> I couldn't, so please provide detailed instructions.

You can use exactly the same method as indicated. Just note that the
memory leak don't always appear. So run it some times before stoping

Raphael Ouazana.