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

Re: (ITS#7432) slapd crashes when removing members from a large group

hyc@symas.com wrote:
marvin.mundry@uni-hamburg.de wrote:
Full_Name: Marvin Mundry
Version: 2.4.33
OS: Ubuntu 12.10
URL: https://idmswiki.rrz.uni-hamburg.de:8005/debug.tar.bz
Submission from: (NULL) (

Thanks for the report. The crash has been fixed in git, but your test runs
into another (known) issue in MDB.

You're working with a very large entry, which libmdb stores in overflow pages.
In the current version of libmdb, freespace management for overflow pages is
not fully implemented, so every time you update the entry libmdb will always
use new pages (instead of reusing old pages). Thus, after a few hundred
operations, your 1GB map will be exhausted.

It looks like you won't be able to use back-mdb until this feature is fully
implemented in libmdb.

So the issue is how to find a contiguous run of pages large enough to satisfy the overflow page, in the current freelist. This takes us into the realm of malloc algorithms, first-fit/best-fit/..., etc.

I think first we scan whatever freelist we have in memory, to see if a suitable run of pages is already present.

If not, and there are additional freelists still available:
  1) we could just merge all of them, and then search again
  2) merge one at a time, and search again

Leaning toward #2, I suspect we don't need to coalesce all freelists all the time.
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/