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

Re: slapd crash in back-bdb/ctxcsn.c (ITS#3301)



On Wednesday 25 August 2004 14:54, rhafer@suse.de wrote:
> On Wednesday 25 August 2004 14:01, hyc@symas.com wrote:
> > This is now patched in HEAD, please test.
>
> Works now. Thanks for the fast response.

I spoke to soon. I now get "ldap_add: No such object (32)"
when trying to add the initial entries to the database. Sample LDIF:

dn: o=customers
objectClass: top
objectClass: organization
o: customers

dn: ou=container1,o=customers
objectClass: top
objectClass: organizationalunit
ou: container1

dn: ou=Accounting,ou=container1,o=customers
objectClass: top
objectClass: organizationalunit
ou: Accounting

Seem that dn2entry in ctxcsn.c returns DB_NOTFOUND in this case. Changing the 
switch statement to

	switch( rc ) {
	case 0:
        case DB_NOTFOUND :
		break;
	case DB_LOCK_DEADLOCK:
	case DB_LOCK_NOTGRANTED:
		return BDB_CSN_RETRY;
	default:
		return BDB_CSN_ABORT;
	}

fixed the problem for me.

-- 
Ralf