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

RE: ITS#1570 slapd crashes during search query



You might try recompiling idl.c with -DLDBM_DEBUG_IDL which will insert
checks to validate the IDLs. The code will assert/abort on an invalid IDL
which should help identify the cause of the problem. It will also slow down
the performance considerably, so you won't want to leave it that way...

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

> -----Original Message-----
> From: Thomas Koch [mailto:Thomas.Koch@atlantec-es.com]
> Sent: Tuesday, April 02, 2002 12:53 AM
> To: hyc@highlandsun.com
> Cc: openldap-its@OpenLDAP.org
> Subject: 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?
>
> Thomas
>
> 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