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

Re: (ITS#6629) send_search_entry() does not clear controls



quanah@zimbra.com wrote:
> --On August 26, 2010 3:44:02 AM +0000 masarati@aero.polimi.it wrote:
>
>> Full_Name: Pierangelo Masarati
>> Version: HEAD/re24
>> OS: irrelevant
>> URL: ftp://ftp.openldap.org/incoming/
>> Submission from: (NULL) (129.72.175.5)
>> Submitted by: ando
>>
>>
>> REP_CTRLS_MUSTBEFREED is only honored by send_ldap_response(); when
>> response controls are attached to slap_send_search_entry() it is not
>> honored.  This does not surface because controls must be malloc'ed on the
>> slab; however, it clearly appears when built with SLAP_NO_SL_MALLOC.
>
> Interesting -- I'm seeing an issue where I can get slapd to consume all
> available memory on the system by using paged results.  It takes a while to
> do so (depending on how much memory is available), but it's 100%
> repeatable.  The more mixes of paged and non paged results there are with
> large result sets, the more quickly it happens.  However, I do not build
> with SLAP_NO_SL_MALLOC (or at least, not intentionally ;) ).

If these two behaviors are related, that says to me that we should just go the 
rest of the way with the slab allocator and allocate additional slabs when the 
current one is exhausted. The purpose of the slab allocator was two-fold - to 
provide thread-local memory that needs no locking, and also to provide local 
memory that needs no housekeeping/explicit frees.

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