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

slapd crashes: debugging indexes?



I just upgraded to 2.0.7 (backend Berkeley DB 3.1) on RHLinux6.0 and am
having all sorts of trouble.

An example: after creating a new entry with a PerLDAP script (in production
for years against 1.2.x versions of OpenLDAP), the following search will
crash slapd every time (apparently while reading uid.dbb):

           ldapsearch "(&(objectclass=posixaccount)(user=jlerman))"

but if I reverse the attributes (below), the search completes fine every
time.

            ldapsearch "(&(uid=jlerman)(objectclass=posixaccount))"

There may be something wrong with the PerLDAP script because if I dump the
entry and re-add it using "ldapadd", the problem goes away.  How do I debug
something like this?
--
Carrie Coy

from slapd.conf:
index           givenname,mail,sn,cn,ou,uid        pres,eq,sub
index           objectclass,uidnumber,memberuid,gidnumber   eq
index           memberofgroup                          eq

strace output from crashed slapd:

conn=0 op=1 SRCH base="o=Vermont Department of Corrections, c=US" scope=2
filte
="(&(objectClass=posixaccount)(uid=jlerman))"
=> ldbm_back_search
dn2entry_r: dn: "O=VERMONT DEPARTMENT OF CORRECTIONS,C=US"
=> dn2id( "O=VERMONT DEPARTMENT OF CORRECTIONS,C=US" )
=> ldbm_cache_open( "/usr/local/etc/openldap/data/dn2id.dbb", 7, 600 )
<= ldbm_cache_open (opened 0)
<= dn2id 1
=> id2entry_r( 1 )
=> ldbm_cache_open( "/usr/local/etc/openldap/data/id2entry.dbb", 7, 600 )
<= ldbm_cache_open (opened 1)
=> str2entry
<= str2entry(o=Vermont Department of Corrections, c=US) -> -1 (0x8128ac8)
<= id2entry_r( 1 ) 0x8128ac8 (disk)
search_candidates: base="O=VERMONT DEPARTMENT OF CORRECTIONS,C=US" s=2 d=0
=> filter_candidates
=> list_candidates 0xa0
=> filter_candidates
=> dn2idl( "@O=VERMONT DEPARTMENT OF CORRECTIONS,C=US" )
=> ldbm_cache_open( "/usr/local/etc/openldap/data/dn2id.dbb", 7, 600 )
<= ldbm_cache_open (cache 0)
<= idl_fetch 1672 ids (1672 max)
<= filter_candidates 1672
=> filter_candidates
=> list_candidates 0xa1
=> filter_candidates
=> equality_candidates
=> ldbm_cache_open( "/usr/local/etc/openldap/data/nextid.dbb", 7, 600 )
<= ldbm_cache_open (opened 2)
=> ldbm_cache_open( "/usr/local/etc/openldap/data/objectClass.dbb", 16,
600 )
<= ldbm_cache_open (opened 3)
=> key_read
<= index_read 0 candidates
<= equality_candidates NULL
<= equality_candidates 0
<= filter_candidates 0
=> filter_candidates
=> list_candidates 0xa0
=> filter_candidates
=> equality_candidates
=> ldbm_cache_open( "/usr/local/etc/openldap/data/objectClass.dbb", 16,
600 )
<= ldbm_cache_open (cache 3)
=> key_read
<= idl_fetch 1886 ids (1886 max)
<= index_read 1886 candidates
<= equality_candidates 1886
<= filter_candidates 1886
=> filter_candidates
=> equality_candidates
=> ldbm_cache_open( "/usr/local/etc/openldap/data/uid.dbb", 16, 600 )
<= ldbm_cache_open (opened 4)
=> key_read
<= index_read 4 candidates
<= equality_candidates 4
<= filter_candidates 4
<= list_candidates 8
<= filter_candidates 8
<= list_candidates 8
<= filter_candidates 8
 <unfinished ...>
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++