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

Re: Slapd (OpenLDAP v2.3.11) Hangs Using 100% CPU Upon Start Up



On Tuesday 15 November 2005 19:57, Quanah Gibson-Mount wrote:
> --On Tuesday, November 15, 2005 9:54 AM -0800 Rik Herrin
>
> <rikherrin@yahoo.com> wrote:
> > Aaron, Quanah,
> >      Thanks for your input.  It turned out to be a bdb issue.  However, I
> > was under the assumption that OpenLDAP v2.3.x automatically ran
> > db_recover by putting it in /etc/init.d/ldap2.3.   When I ran slapcat2.3
> > to see if the DB was okay (I know that there are other ways, but
> > slapcat2.3 was the quickest thing since I thought that db_recover had
> > already been run), it seemed to work and then it told me that it was
> > trying to fix the database because it wasn't in a good state. CPU
> > Utilization went up to 100% and stracing it showed that it was in an
> > infinite loop of sched_yield() = 0 as well
>
> OpenLDAP 2.3 *automatically* recovers the database.

I've also seen the odd occasion where automatic recovery by slapd did not 
succeed. That is why I have kept the "recover" option in the init script. It 
could have been triggered by the fact that there is no way to specify a 
timeout to the killproc() function in /etc/init.d/functions (and so I may 
move away from using killproc, but ideally killproc should be fixed since 
other daemons also take more than the 4 seconds killproc gives after a -TERM 
before it sends -KILL).

> By running db_recover 
> manually in addition to the slapd startup doing it, you are likely
> corrupting your database.

No, in older 2.3.x releases removing the alock file as all that was necessary 
if database recovery had been run, but it is now safe (since 2.3.6 I think).

>
> > Quanah:
> >      I set the cachesize to 6000 as it will likely grow.  Are there any
> > bad side effects?  I thought that it was better to have it larger than
> > the number of entries than just stick to the exact number of entries.
> >      Finally, I'd love to use Buchan's BDB build.  But it wasn't included
> > with the Mandriva packages that he posted.  Is it posted elsewhere?
>
> Sadly, I don't know a whole lot about Buchan's builds, other than they are
> quite superior to what RedHat ships.  The thing RedHat's BDB build would be
> missing is the OL related BDB patch shipped with 2.3.11.  However, it won't
> be necessary with 2.3.12 anymore, so that is only a short term problem
> anyhow.

When built on any platform that isn't guaranteed of having a suiteable DB4.2 
package, my OpenLDAP packages build an internal copy of DB4.2.52.4 with the 
required patch, with different soname and symbol names, so that it is 
guaranteed to work. Since I build these packages on RHEL3/RHEL2.1 (and 
Mandriva 10.0, 10.1, etc), this will stay even for 2.3.12 (but probably be 
disabled for RHEL4 builds after some testing).

Either way, having RH's db4.2 packages installed or not currently makes no 
difference, when they are required, well, they'll be required by the package 
(and suitable db4-utils).

Regards,
Buchan

-- 
Buchan Milne
ISP Systems Specialist
B.Eng,RHCE(803004789010797),LPIC-2(LPI000074592)

Attachment: pgpviQ88m0rM7.pgp
Description: PGP signature