quanah(a)zimbra.com wrote:
> --On August 26, 2010 3:44:02 AM +0000 masarati(a)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/
>
>
> --On August 26, 2010 3:44:02 AM +0000 masarati(a)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.
pagedResults only sends a control response with the searchResultDone
response, which uses send_ldap_response() and thus clears the controls;
moreover, we are talking about few bytes, so I don't think this is the
issue. There might be something else related to slab allocation that runs
out of slab memory and starts using the heap without freeing it.
The present issue might affect syncrepl, since in that case a control is
attached to each entry/intermediate response (afaik).
It might even be intentional; in fact, often when a control is attached to
an entry in a searchResultEntry the same control needs to be applied to
many entries returned by the same operation. However, in this case we
should probably define a specific API for slap_add_ctrls() that does not
set the REP_CTRLS_MUSTBEFREED, or something like that.
> However, I do not build
> with SLAP_NO_SL_MALLOC (or at least, not intentionally ;) ).
I occasionally do (you only need to recompile slapd/sl_malloc.c) to trace
possible leaks when developing something. Since we make an intensive use
of slab mallocs, usual minimal tests with valgrind do not show leaks
otherwise.
p.
--On August 26, 2010 3:44:02 AM +0000 masarati(a)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 ;) ).
--Quanah
--
Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc
--------------------
Zimbra :: the leader in open source messaging and collaboration
Full_Name: Pierangelo Masarati
Version: HEAD
OS: irrelevant
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (129.72.165.68)
Submitted by: ando
I've just committed (to contrib/slapd-modules/dupent/) a nearly complete support
for draft-ietf-ldapext-ldapv3-dupent-08.txt (expired) in form of an overlay.
I'm not 100% sure about the format of the control request/response values, and I
couldn't check interoperability with other software; I only tested it with
ldapsearch passing it -E '2.16.840.1.113719.1.27.101.1=:<control request
value>', so please use with care (and report).
p.
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.
p.
--On Wednesday, August 25, 2010 3:12 AM +0200 masarati(a)aero.polimi.it wrote:
>> --On Tuesday, August 24, 2010 5:47 PM -0700 Howard Chu <hyc(a)symas.com>
>> wrote:
>>
>>> quanah(a)zimbra.com wrote:
>>>> Full_Name: Quanah Gibson-Mount
>>>> Version: 2.4.23
>>>> OS: Linux 2.6
>>>> URL: ftp://ftp.openldap.org/incoming/
>>>> Submission from: (NULL) (75.111.45.108)
>>>>
>>>>
>>>> With OpenLDAP 2.4.23, new connections start numbered at 1000 instead of
>>>> at 1
>>>
>>> No. cvs log shows that this was patched about a year ago and first
>>> released in 2.4.20. Not a bug, closing this ITS.
>>
>> Connections starting at 1000 is clearly a bug, regardless of when it was
>> introduced.
>
> That was intended, to store connections as unsigned and reserve lower
> numbers for special connections (e.g. internal operations and so). I
> don't see how using an arbitrary offset in logs can be considered a bug.
> 1000 is much like 10, 1024, 666 or 0xbad.
Eh, I just need to re-write some scripts to start some things at 1000 then.
;)
--Quanah
--
Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc
--------------------
Zimbra :: the leader in open source messaging and collaboration
> --On Tuesday, August 24, 2010 5:47 PM -0700 Howard Chu <hyc(a)symas.com>
> wrote:
>
>> quanah(a)zimbra.com wrote:
>>> Full_Name: Quanah Gibson-Mount
>>> Version: 2.4.23
>>> OS: Linux 2.6
>>> URL: ftp://ftp.openldap.org/incoming/
>>> Submission from: (NULL) (75.111.45.108)
>>>
>>>
>>> With OpenLDAP 2.4.23, new connections start numbered at 1000 instead of
>>> at 1
>>
>> No. cvs log shows that this was patched about a year ago and first
>> released in 2.4.20. Not a bug, closing this ITS.
>
> Connections starting at 1000 is clearly a bug, regardless of when it was
> introduced.
That was intended, to store connections as unsigned and reserve lower
numbers for special connections (e.g. internal operations and so). I
don't see how using an arbitrary offset in logs can be considered a bug.
1000 is much like 10, 1024, 666 or 0xbad.
p.
--On Tuesday, August 24, 2010 5:47 PM -0700 Howard Chu <hyc(a)symas.com>
wrote:
> quanah(a)zimbra.com wrote:
>> Full_Name: Quanah Gibson-Mount
>> Version: 2.4.23
>> OS: Linux 2.6
>> URL: ftp://ftp.openldap.org/incoming/
>> Submission from: (NULL) (75.111.45.108)
>>
>>
>> With OpenLDAP 2.4.23, new connections start numbered at 1000 instead of
>> at 1
>
> No. cvs log shows that this was patched about a year ago and first
> released in 2.4.20. Not a bug, closing this ITS.
Connections starting at 1000 is clearly a bug, regardless of when it was
introduced.
--Quanah
--
Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc
--------------------
Zimbra :: the leader in open source messaging and collaboration
quanah(a)zimbra.com wrote:
> Full_Name: Quanah Gibson-Mount
> Version: 2.4.23
> OS: Linux 2.6
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (75.111.45.108)
>
>
> With OpenLDAP 2.4.23, new connections start numbered at 1000 instead of at 1
No. cvs log shows that this was patched about a year ago and first released in
2.4.20. Not a bug, closing this ITS.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/