---------- Forwarded message ----------
From: Stuart Henderson <email@example.com>
Date: Mon, Jan 14, 2013 at 8:47 PM
Subject: Re: adding support to mdb
To: Friedrich Locke <firstname.lastname@example.org
On 2013/01/14 19:18, Friedrich Locke wrote:
> Hi folks,
> this is my first message to this list. I am writing because i am in need to
> use openldap from ports.
> Initially i tried openldap with support to BDB, but it is buggy.
> I was suggest to try mdb, but openldap's Makefile have the --disable-mdb
> Since i do need to get a directory service and have no knownledge on
> openldap internals, i come to you
> in order to suggest how could i help in order to get mdb supported by
> OpenBSD Ports OpenLDAP.
> Thank you a lot for your time and cooperation.
> Best regards,
So this is a memory-mapped database; there have been problems with these in
the past (e.g. in Cyrus imapd and Dovecot) but I am not sure of all the
details. The port diff is easy enough but I would really like some advice
from someone who is knowledgeable about the mmap issues as to whether or
not it's safe to use this on OpenBSD.
A bit more info from slides at http://www.openldap.org/pub/hyc/mdm-slides.pdf
-- -- -- -- --
* Uses a read-only memory map
* Protects the database structure from corruption due to stray writes
* Any attempts to write to the map will cause a SEGV, allowing
immediate identification of software bugs
* There's no point in making the pages writable anyway, since only
existing pages may be written. Growing the database requires file
ops (write, ftruncate) so for uniformity, file ops are also used for
-- -- -- -- --
I *think* the problems were only with mmap writes, if this is correct
then they seem to be sidestepping the problems by doing this.
BTW I'm using OpenLDAP 2.4 with BDB here and haven't noticed issues
however it is not under extreme load..