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

ITS#3356( Was: Openldap Incoming/3356 Memory and Handle Leak using bdb)



You can just post to openldap-its@openldap.org with ITS#3356 in the subject.

Stephan Eckbauer wrote:

>Hi,
>
>I dont know where to post follow ups to my submission, so I contact you
>because you ansered to the issue. I write a cc to hyc@highlandsun.com
>because he seemes to be the creator of the currently used cache system.
>
>http://www.openldap.org/its/index.cgi/Incoming?id=3356;page=1
>
>I now have successfully set up a debug environment and found out the
>following:
>The back-bdb holds a cache that is built out of bdb_entry_info structs.
>Each struct contains a bei_kids_mutex, that is initialised in
>bdb_cache_entryinfo_new: ldap_pvt_thread_mutex_init(
>&ei->bei_kids_mutex );
>
>It is destroyed in bdb_cache_entryinfo_destroy:
>ldap_pvt_thread_mutex_destroy( &e->bei_kids_mutex );
>
>The bdb_entry_info items are kept in the list even if the cachsize is set
>to a low value. I debugged with a cachesize of 10 to find out if the
>entries in the cache would not grow.
>If the actual cache size (bdb->bi_cache.c_cursize) reaches
>bdb->bi_cache.c_maxsize, the entry is removed only from the LRU, but not
>from the cache.
>
>The problem I metioned (handle leak) is not really a leak, the handles get
>freed during shutdown of the server (bdb_cache_release_all).
>
>It´s just if you are adding some entries using ldap_add, lets say some
>100000 entries, the handle count increases to that values and never get
>freed until the server shuts down.
>
>Can you explain me, why the entries remain in the cache (even if they are
>deleted from the lru cache)? Any idea how to keep the cache (and the used
>handles) small? Do you have some hints for me where to start cleaning the
>cache or limiting the cache?
>
>Please feel free to post this mail as followup on the 3356 issue.
>
>Best regards
> Stephan Eckbauer
>---
>ESTOS GmbH, Stephan Eckbauer, Geschäftsführer http://www.estos.de
>Mail: ste@estos.de, Fon: +49-8151-368561-10, Fax: +49-8151-368561-99
>###########################################
>
>This message has been scanned by F-Secure Anti-Virus for Microsoft
>Exchange.
>For more information, connect to http://www.F-Secure.com/
>
>  
>





    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497