[Pkg-openldap-devel] Bug#696563: Bug#696563: slapd not ready when start script exits, plase add sleep in starting script

Steve Langasek vorlon at debian.org
Fri Dec 28 01:14:39 UTC 2012


On Sun, Dec 23, 2012 at 12:09:08PM -0800, Quanah Gibson-Mount wrote:
> --On Saturday, December 22, 2012 3:54 PM -0800 Steve Langasek
> <vorlon at debian.org> wrote:

> >This is absolutely not an acceptable fix for this bug.  A 'sleep' only
> >reduces the frequency of a race, it does not eliminate it.  We need to
> >find out why the parent slapd process is again exiting before it's ready
> >to listen for connections - this is a regression, for a bug that was very
> >specifically supposed to have been fixed upstream in 2.4.28.  See bug
> ># 589915 for the history.

> >The source files that were being patched for this haven't changed upstream
> >since 2.4.28, so I'm not sure what will have gone wrong.

> I suggest reading followup #2 in
> <http://www.openldap.org/its/index.cgi/?findid=6848>, the upstream
> ITS dealing with this.  It is specifically noted that on a heavily
> loaded system, this can still occur.

<sigh>

> The real solution is to switch to back-mdb from back-bdb/hdb, which
> doesn't have the heavy startup load that BDB based backends do.

No, the *real* solution is to have a properly sequenced daemon startup.

 1) listen on the sockets
 2) exit the parent process, detaching from the terminal
 3) properly handle all connections made after 2)

This is Daemon Design 101.  Why is slapd *not* starting the listener thread
before detaching?  Am I missing some reason this is a problem?

Of course, improving slapd's overall efficiency is a good thing, but a
faster startup time here only masks the bug, it doesn't eliminate it.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-openldap-devel/attachments/20121227/2323a93b/attachment.pgp>


More information about the Pkg-openldap-devel mailing list