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

Re: 2.3.39 slapadd hangs



Brian Biggs wrote:
Thank you for your responses. Here is more info:

Did I delete the DB first? Yes.

I realize that the DB doesn't need to be reloaded for an upgrade from
2.3.38 to 2.3.39, but I'm working in a devel environment (so I don't
screw up production) and I needed to load the latest DB dump from
production into devel.

The slapadd command I'm using:
slapadd -w -b dc=sonoma,dc=edu -f /etc/openldap/ssu-slapd.conf -v -c -d
-1 -l dump.ldif

Sounds like you ran into ITS#5225. Strange, it looks like the bug was introduced in 2.3.38 in the patch for ITS#5087. Funny that you didn't run into it on 2.3.38, or that no one else reported it. There's a fix for this in CVS that will be released in 2.4.7. This is the fix for 2.3.39:


Index: tools.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-bdb/tools.c,v
retrieving revision 1.72.2.17
diff -u -w -r1.72.2.17 tools.c
--- tools.c     11 Aug 2007 00:32:20 -0000      1.72.2.17
+++ tools.c     28 Nov 2007 20:04:46 -0000
@@ -664,6 +664,10 @@
                (long) e->e_id, e->e_dn, 0 );

        if (! (slapMode & SLAP_TOOL_QUICK)) {
+               if( cursor ) {
+                       cursor->c_close( cursor );
+                       cursor = NULL;
+               }
        rc = TXN_BEGIN( bdb->bi_dbenv, NULL, &tid,
                bdb->bi_db_opflags );
        if( rc != 0 ) {


The tail end of the out from slapadd where it hangs is:
slapadd startup: initiated.
backend_startup_one: starting "dc=sonoma,dc=edu"
bdb_db_open: dc=sonoma,dc=edu
bdb_db_open: dbenv_open(/var/lib/ldap/dc-data)
=> str2entry: "dn: dc=sonoma,dc=edu
objectClass: referral
objectClass: extensibleObject
dc: sonoma
ref: ldap://yogi.reg.sonoma.edu/o=sonoma,o=edu
ref: ldap://ldap-master.reg.sonoma.edu/o=sonoma,o=edu
"
 >>> dnPrettyNormal: <dc=sonoma,dc=edu>
<<< dnPrettyNormal: <dc=sonoma,dc=edu>, <dc=sonoma,dc=edu>
<= str2entry(dc=sonoma,dc=edu) -> 0x8da8018
oc_check_required entry (dc=sonoma,dc=edu), objectClass "referral"
oc_check_required entry (dc=sonoma,dc=edu), objectClass "extensibleObject"
=> bdb_tool_entry_put( -1, "dc=sonoma,dc=edu" )
=> bdb_dn2id("dc=sonoma,dc=edu")
<= bdb_dn2id: get failed: DB_NOTFOUND: No matching key/data pair found
(-30989)
=> bdb_dn2id_add( "dc=sonoma,dc=edu", 0x00000001 )
<= bdb_dn2id_add: 0
=> entry_encode(0x00000001): dc=sonoma,dc=edu
added: "dc=sonoma,dc=edu" (00000001)
=> bdb_dn2id("dc=sonoma,dc=edu")
<= bdb_dn2id: got id=0x00000001
entry_decode: "dc=sonoma,dc=edu"
<= entry_decode(dc=sonoma,dc=edu)
=> bdb_tool_entry_modify( 1, "dc=sonoma,dc=edu" )
=> entry_encode(0x00000001): dc=sonoma,dc=edu
(it hangs here indefinitely)

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