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

Re: (ITS#7919) slapd would not start with back-ldap database



quanah@zimbra.com wrote:
> --On Wednesday, August 13, 2014 8:27 AM +0000 dieter@dkluenter.de wrote:
>
>> Sorry, it is back-ldap with pcache and it seems to be a pcache
>> problem. When disabling pcache, slapd runs fine.
>
> a) Confirm you still see this issue with current RE24 if you want it fixed
> in the 2.4 series, as in general we're planning on 2.4.40 to be the final
> release for 2.4
>
> b) If you are able to reproduce this with current RE24, please provide an
> example configuration that causes the issue.  test020 passes w/o issue.

The example config is invalid.

###
include         schema/core.schema
include         schema/cosine.schema
include         schema/inetorgperson.schema
#
modulepath  ../servers/slapd/overlays
moduleload  pcache.la

database        ldap
uri     ldap://example.com
suffix          dc=example,dc=com
rootdn          dc=example,dc=com
rootpw          xxx

overlay pcache
directory /tmp/testr/db.1.a
pcache mdb 50000 2 500 3600
pcacheAttrset 0 mail uid
pcacheAttrset 1 cn telephoneNumber
pcachePersist TRUE
pcacheTemplate (mail=)  0 10800 7200
pcacheTemplate (uid=) 1 10800 7200
index objectclass pres
index mail,uid,telephoneNumber pres,eq

database monitor
###

"directory" is not a valid config keyword for the pcache overlay. It is a 
valid keyword for back-mdb, but here it was given before the "pcache mdb..." 
line so slapd doesn't yet know that back-mdb will be used. The slapo-pcache(5) 
manpage clearly states what directives are valid.

Personally I'd be fine with leaving this to SEGV as it does. Catching user 
errors doesn't help much in the long run; either way slapd will fail to start 
so there's no difference either way.

But in this case, the SEGV is now prevented in git master.

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