Issue 6491 - LDAP Error code 80 - Dn index delete failed
Summary: LDAP Error code 80 - Dn index delete failed
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.21
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-16 20:31 UTC by robert.hanson@calabrio.com
Modified: 2014-08-01 21:03 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description robert.hanson@calabrio.com 2010-03-16 20:31:13 UTC
Full_Name: Robert Hanson
Version: 2.4.21
OS: RedHat 4.7
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (74.203.208.250)


1) start with an empty database; use slapadd to add a large (3 MB) database.  2)
Use ldapbrowser to delete nearly all the nodes.  After this process, I get to a
point where a subnode can't be deleted; I see the message "12:00:27 PM: Failed
to delete entry ou=Agents, lcc=Call Center 1, ou=Company, o=Spanlink
Communications
Reason: [LDAP: error code 80 - DN index delete failed]
12:15:19 PM: Failed to delete entry ou=Agents, lcc=Call Center 1, ou=Company,
o=Spanlink Communications
Reason: [LDAP: error code 80 - DN index delete failed]" in the ldapbrowser
window.

Steps to reproduce: (on redhat linux; I think any linux will do)
1) build bdb 4.8.26 from the distro; build openldap 2.4.21 from the distro.
2) copy built slapd to an appropriate place.  link it to slapadd.
3) FTP: ftp.calabrio.com, user openldap, pass *a68pcJH  (Account is scheduled to
close 3/23/2010; let me know if you need the file uploaded again).  unzip the
file, it contains the slapcat.out; a blank database (in a subfolder), and a
slapd.conf file.
4) Edit the slapd.conf file as needed to point to the directory where you put
the database. 

That was the setup, now here are the steps to reproduce the problem:

5) use slapadd -c -f slapd.conf -l slapcat.out to create the database.
6) start slapd (using slapd -d 1 -f slapd.conf)
7) use ldapbrowser to delete the "lcc=call center 1" node.

It takes a long time, but eventually you'll see it fail while trying to delete
the "agents" node.
Comment 1 Quanah Gibson-Mount 2010-03-18 01:05:57 UTC
--On Tuesday, March 16, 2010 8:31 PM +0000 robert.hanson@calabrio.com wrote:

> Full_Name: Robert Hanson
> Version: 2.4.21
> OS: RedHat 4.7
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (74.203.208.250)
>
>
> 1) start with an empty database; use slapadd to add a large (3 MB)
> database.  2) Use ldapbrowser to delete nearly all the nodes.  After this
> process, I get to a point where a subnode can't be deleted; I see the
> message "12:00:27 PM: Failed to delete entry ou=Agents, lcc=Call Center
> 1, ou=Company, o=Spanlink Communications
> Reason: [LDAP: error code 80 - DN index delete failed]
> 12:15:19 PM: Failed to delete entry ou=Agents, lcc=Call Center 1,
> ou=Company, o=Spanlink Communications
> Reason: [LDAP: error code 80 - DN index delete failed]" in the ldapbrowser
> window.
>
> Steps to reproduce: (on redhat linux; I think any linux will do)
> 1) build bdb 4.8.26 from the distro; build openldap 2.4.21 from the
> distro. 2) copy built slapd to an appropriate place.  link it to slapadd.
> 3) FTP: ftp.calabrio.com, user openldap, pass *a68pcJH  (Account is
> scheduled to close 3/23/2010; let me know if you need the file uploaded
> again).  unzip the file, it contains the slapcat.out; a blank database
> (in a subfolder), and a slapd.conf file.
> 4) Edit the slapd.conf file as needed to point to the directory where you
> put the database.
>
> That was the setup, now here are the steps to reproduce the problem:
>
> 5) use slapadd -c -f slapd.conf -l slapcat.out to create the database.
> 6) start slapd (using slapd -d 1 -f slapd.conf)
> 7) use ldapbrowser to delete the "lcc=call center 1" node.
>
> It takes a long time, but eventually you'll see it fail while trying to
> delete the "agents" node.
>

Do you see this problem using BDB 4.7.25+patches instead of BDB 4.8?

--Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc
--------------------
Zimbra ::  the leader in open source messaging and collaboration

Comment 2 ando@openldap.org 2010-04-17 08:33:16 UTC
changed state Open to Feedback
Comment 3 ando@openldap.org 2010-04-17 22:24:46 UTC
> Full_Name: Robert Hanson
> Version: 2.4.21
> OS: RedHat 4.7
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (74.203.208.250)
>
>
> 1) start with an empty database; use slapadd to add a large (3 MB)
> database.  2)
> Use ldapbrowser to delete nearly all the nodes.  After this process, I get
> to a
> point where a subnode can't be deleted; I see the message "12:00:27 PM:
> Failed
> to delete entry ou=Agents, lcc=Call Center 1, ou=Company, o=Spanlink
> Communications
> Reason: [LDAP: error code 80 - DN index delete failed]
> 12:15:19 PM: Failed to delete entry ou=Agents, lcc=Call Center 1,
> ou=Company,
> o=Spanlink Communications
> Reason: [LDAP: error code 80 - DN index delete failed]" in the ldapbrowser
> window.
>
> Steps to reproduce: (on redhat linux; I think any linux will do)
> 1) build bdb 4.8.26 from the distro; build openldap 2.4.21 from the
> distro.
> 2) copy built slapd to an appropriate place.  link it to slapadd.
> 3) FTP: ftp.calabrio.com, user openldap, pass *a68pcJH  (Account is
> scheduled to
> close 3/23/2010; let me know if you need the file uploaded again).  unzip
> the
> file, it contains the slapcat.out; a blank database (in a subfolder), and
> a
> slapd.conf file.
> 4) Edit the slapd.conf file as needed to point to the directory where you
> put
> the database.
>
> That was the setup, now here are the steps to reproduce the problem:
>
> 5) use slapadd -c -f slapd.conf -l slapcat.out to create the database.
> 6) start slapd (using slapd -d 1 -f slapd.conf)
> 7) use ldapbrowser to delete the "lcc=call center 1" node.
>
> It takes a long time, but eventually you'll see it fail while trying to
> delete
> the "agents" node.

Can you reproduce with -dtrace?  It'll generate a large log file, please
only post the part related to the failure.

p.

Comment 4 ando@openldap.org 2010-07-22 08:20:28 UTC
changed notes
changed state Feedback to Closed
Comment 5 Peter Mogensen 2011-03-07 13:15:48 UTC
I see this symptom too with both these versions:

OpenLDAP 2.4.21, BDB 4.8.26
OpenLDAP 2.4.23, BDB 4.8.30

ldapdelete -r failes with:

ldap_delete: Other (e.g., implementation specific) error (80)
         additional info: DN index delete failed

I've copied the database files to a similar machine for debugging.

Here's the output for slapd -d1 when doing so:
=============================================================
do_bind: SASL/EXTERNAL bind: dn="cn=config" sasl_ssf=0
send_ldap_response: msgid=1 tag=97 err=0
ber_flush2: 14 bytes to sd 11
<== slap_sasl_bind: rc=0
connection_get(11): got connid=1001
connection_read(11): checking for input on id=1001
ber_get_next
ber_get_next: tag 0x30 len 86 contents:
op tag 0x63, time 1299502775
ber_get_next
conn=1001 op=1 do_search
ber_scanf fmt ({miiiib) ber:
 >>> dnPrettyNormal: <o=xxx,dc=example,dc=com>
<<< dnPrettyNormal: <o=xxx,dc=example,dc=com>, <o=xxx,dc=example,dc=com>
ber_scanf fmt (m) ber:
ber_scanf fmt ({M}}) ber:
=> bdb_search
bdb_dn2entry("o=xxx,dc=example,dc=com")
search_candidates: base="o=xxx,dc=example,dc=com" (0x0025d3ca) scope=1
=> bdb_dn2idl("o=xxx,dc=example,dc=com")
<= bdb_dn2idl: get failed: DB_NOTFOUND: No matching key/data pair found 
(-30988)
bdb_search_candidates: failed (rc=-30988)
bdb_search: no candidates
send_ldap_result: conn=1001 op=1 p=3
send_ldap_response: msgid=2 tag=101 err=0
ber_flush2: 14 bytes to sd 11
connection_get(11): got connid=1001
connection_read(11): checking for input on id=1001
ber_get_next
ber_get_next: tag 0x30 len 49 contents:
op tag 0x4a, time 1299502775
ber_get_next
conn=1001 op=2 do_delete
ber_scanf fmt (m) ber:
 >>> dnPrettyNormal: <o=xxx,dc=example,dc=com>
<<< dnPrettyNormal: <o=xxx,dc=example,dc=com>, <o=xxx,dc=example,dc=com>
bdb_dn2entry("o=xxx,dc=example,dc=com")
bdb_dn2entry("o=xxx,dc=example,dc=com")
bdb_entry_get: rc=0
bdb_dn2entry("o=xxx,dc=example,dc=com")
=> bdb_dn2id_delete 0x25d3ca: "o=xxx,dc=example,dc=com"
=> bdb_idl_delete_key: c_get lo failed: DB_BUFFER_SMALL: User memory too 
small for return value (-30999)
=> bdb_dn2id_delete 0x25d3ca: subtree (o=xxx,dc=example,dc=com) delete 
failed: -30999
<= bdb_dn2id_delete 0x25d3ca: -30999
<=- bdb_delete: dn2id failed: DB_BUFFER_SMALL: User memory too small for 
return value (-30999)
send_ldap_result: conn=1001 op=2 p=3
send_ldap_response: msgid=3 tag=107 err=80
ber_flush2: 36 bytes to sd 11
connection_get(11): got connid=1001
connection_read(11): checking for input on id=1001
ber_get_next
ber_get_next: tag 0x30 len 5 contents:
op tag 0x42, time 1299502775
ber_get_next
ber_get_next on fd 11 failed errno=0 (Success)
conn=1001 op=3 do_unbind
connection_get(11): got connid=1001
connection_get(11): got connid=1001
connection_close: conn=1001 sd=11
=============================================================================

Doing an ldapsearch for the entry takes some time, but does finish.
Looking at the -d1 output there's a lot of "bdb_search: <number> scope 
not okay" messages.

There's about 5 million objects in the database. I only know of this one 
object on this server which has this problem. I have another server with 
another object with the same problem. Other objects can be deleted just 
fine.
Looking at the slapcat output, there's only the base "o=xxx" object. 
There's no subordinate objects to this object.

/Peter

Comment 6 OpenLDAP project 2014-08-01 21:03:44 UTC
no feedback