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

Re: (ITS#4387) slapd-ldap backend leaks descriptors on closed connections on x86_64

On Fri, 2006-02-03 at 21:55 +0000, aleksander.adamowski@gmail.com wrote:
> On 2/3/06, Pierangelo Masarati <ando@sys-net.it> wrote:
> > Use idle-timeout to timeout idle connections from the proxy's side.  See
> > slapd-ldap(5) (2.3 only) for details.
> You are right, I placed idle-timeout only in one of the slapd-ldap
> backends running in the LDAP instance.
> However, do you think that it's correct for slapd-ldap backend to do
> the following:
> 1) Not get rid of descriptors for connections closed by the other side
> (CLOSE_WAIT state)
> 2) Not reuse cached connections queries, but open more and more new connections?
> In my opinion this behaviour is not correct.

I haven't noticed the behavior you describe; I don't understand how it
could happen (and I'm not 100% sure I understood what's actually
happening; that's why I didn't answer this point).

A new connection between proxy and remote server is established when no
appropriate cached connection exists or when a bind occurs on an
existing cached connection.  Cached connections are closed when the
client disconnect, except for the anonymous connection which remains
open and is shared by all anonymous clients.

Establishing a new connection when a bind occurs was a recent change
(ITS#4315, I believe); this might be causing resource "leaking" (not
really a leak; see below), because the existing cached connection is
ignored, and a new one is created.

This is not actually a leak because the connection remains accessible in
the connection tree, but it might not be intercepted by the
connection_destroy() hook; so it's only destroyed when the connection
tree is freed, i.e. at shutdown.  This is a guess, I haven't
investigated the issue deep enough yet.


Ing. Pierangelo Masarati
Responsabile Open Solution
OpenLDAP Core Team

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
Office:   +39.02.23998309          
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it