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

Re: slapd crash report (ITS#357)

>X-Sender: guru@localhost
>Date: Wed, 17 Nov 1999 14:00:51 -0800
>From: "Kurt D. Zeilenga" <kurt@boolean.net>
>Cc: openldap-its@OpenLDAP.org
>At 04:24 PM 11/5/99 GMT, wowa@jetinf.com wrote:
>>Full_Name: Vladimir V. Tsichevski
>>Version: 1.2.7 and more recent
>>OS: SPARC Solaris 2.6
>>URL: ftp://ftp.openldap.org/incoming/
>>Submission from: (NULL) (
>>(gdb) where
>>#0  index_change_values (be=0x5f380, type=0x458128 "uid", vals=0x0, id=10, op=0)
>>at index.c:305
>Line #305 of index.c (as released with 1.2.7) is:
>        Debug( LDAP_DEBUG_ANY,
>               "<= index_change_values (couldn't open(%s%s),md=%s)\n",
>               at_cn,  
>               LDBM_SUFFIX,   
>               ((mode==LDBM_WRCREAT)?"LDBM_WRCREAT":"LDBM_WRITER") );
>I would suspect that problem is that at_cn is NULL.  Can you
>verify with the debugger.
>Kurt D. Zeilenga		<kurt@boolean.net>
>Net Boolean Incorporated	<http://www.boolean.net/>

No, the problem is in NULL value of 'vals' argument of
index_change_values. It is used without checking (line 305):

	for ( i = 0; vals[i] != NULL; i++ ) {

as for at_cn value, it was not used in the debug statement you've
mentioned, since the index file was opened successfully.

I cannot fix the problem by myself, cause probably the big part of program
should be redesigned. If we want to remove the whole attribute, which
values are indexed, then we need to remove index entries BEFORE we know the keys.