[Date Prev][Date Next]
BUG: Unclean shutdown on SIGTERM (ITS#1227)
Full_Name: Henning Brauer
OS: OpenBSD 2.9
Submission from: (NULL) (184.108.40.206)
Excerpt from a discussion on the qmail-ldap list:
From: Henning Brauer <firstname.lastname@example.org>
Subject: Re: slapd start/stop
Date: Mon, 9 Jul 2001 19:48:33 +0200
On Mon, Jul 09, 2001 at 05:16:14PM -0000, pop corn wrote:
> I already did a "man svc". Here are two quotes:
> From the OpenLDAP 2.0 Administrator's Guide at:
> http://www.openldap.org/doc/admin/runningslapd.html#Stopping slapd
> 6.3. Stopping slapd
> To kill off slapd safely, you should give a command like this
> kill -INT `cat /usr/local/var/slapd.pid`
> where /usr/local/var is determined by configure.
> Killing slapd by a more drastic method may cause information loss or
> database corruption.
This is a dramatic design failure in OpenLDAP. What happens on system
shutdown? Right, all processes get a TERM signal.
I haven't read these statements until today, but it may explain OpenLDAPs poor
behaviour (meaning database not beeing writeable any longer) twice a year or
so. Who files a bug report?
Oh, I hear you saying: just use kill -INT blabla in your
/etc/rc.d/rc.2/slapd or whatever it is. But Note that this is SysV specific,
and there are non-SysV unices around (all BSDs for example), and this is a
Good Thing (tm). I really don't like this SysV init style, but I'll stop my
Nontheless, instead of working around this OpenLDAP bug in daemontools fix
> I am not trying to argue with you, I am only trying to understand exactly
> how to stop slapd because of the warning from the OpenLDAP Administrator's
> Guide above: "Killing slapd by a more drastic method may cause information
> loss or database corruption.".
There is one problem I see about twice a year, OpenLDAP can no longer make
updates. erasing a reinitializing the database fixes this. (btw, OpenLDAP
1.2.11). BUT this is in no way related to killing the process. In production
usage there is no reason to stop and restart slapd or to stop it at all. So
it only gets killed on reboots, and OpenBSD machines don't boot that often
This behaviour is an OpenLDAP bug.