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

Re: ITS#1570 slapd crashes during search query

Hi Howard,

thanks for looking into this. I will test your patch. 

One another note, when we were trying to get closer to
the cause of the problem, we have definitely seen duplicate
ids occurring in ID_BLOCKs. Unfortunately, the error is
not simple to reproduce, since it manifests itself only
when used candidates ID_BLOCK size of the search terms 
is close to the allocated size.

I have not spent too much time trying to figure out
what causes the duplicates (i.e. whether it is really in
the idl_xxx algorithms or if this is a result
of "lower level" problems). Is there any recipe known
how we could get a better analysis (debug macros etc.)?
Would an ldif-dump of a database showing this problem help?


On Friday, 29. March 2002 10:15, you wrote:
> The code for idl_intersection may not be optimal but it looks OK to me. I
> don't see how it would insert duplicates into the result unless one of its
> input arrays already had duplicates, which should never happen. Am I going
> blind?
> Nevertheless, this simple patch may help to avoid dups:
>                  if ( ID_BLOCK_ID(b, bi) == ID_BLOCK_ID(a, ai) ) {
>                          ID_BLOCK_ID(n, ni++) = ID_BLOCK_ID(a, ai);
> +                        bi++;
>                  }
>   -- Howard Chu
>   Chief Architect, Symas Corp.       Director, Highland Sun
>   http://www.symas.com               http://highlandsun.com/hyc
>   Symas: Premier OpenSource Development and Support