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

ldapadd failing with mdb backend



Hi,

I'm doing some testing with an mdb backend with the openldap 2.4.35, and I'm seeing an issue
where ldapadd is failing for an object which worked fine with a bdb backend.

The error from ldapadd is 

    "ldap_add: Other (e.g., implementation specific) error (80)"

and when I run slapd with "-d -1" I see the error 

    "mdb_add: dn2id_add failed: Invalid argument (22)" 

in the debug logging.

Running an unoptimized slapd under gdb I have traced the error to lines 4887-8 in mdb.c, in mdb_cursor_put:

    if (F_ISSET(mc->mc_db->md_flags, MDB_DUPSORT) && data->mv_size > MDB_MAXKEYSIZE)
        return EINVAL;

and from gdb I can see that data->mv_size = 512:

(gdb) p *data
$1 = {mv_size = 512, mv_data = 0x2f2e858}

The error appears to be related to the length of the DN of the object being added, but there are longer DNs in the directory which were loaded successfully with slapadd.

Any ideas?

Chris