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

Re: slapd hangs up and uses 100% CPU (v2.1.12 release)



An update:

I have just traced the problem back to usage of PhP .... shell ldapadd and
ldapdelete seem to work.

The PhP release is 4.3.0.

I know that this is not an PhP list, but I suspect the problem lies
somewhere between those two, and a server should not really hang up if
client missbehaves. So I will let you know how I can reproduce this, below
is a script will hang up my LDAP server, from 10 times I tried it "worked"
(hanged up the server) 10 times :).

<?php

$ldap_server            = "** censored **";
$ldap_port              = 389;
$ldap_login       	= "** censored **";
$ldap_pwd		= "** censored **";

$ds=ldap_connect($ldap_server, $ldap_port);
$r=ldap_bind($ds,$ldap_login,$ldap_pwd);

$object_dn =
"cn=managers,ou=codeangels.com,ou=Mail,ou=ITAccounts,o=Codeangels,c=CH";

$result = ldap_delete($ds, $object_dn);

ldap_close($ds);

echo "DONE";

?>

The wierd thing again is that will only happen with some DNs, others seem
to produce no problems. Any ideas ??

Regards, Kirill

> Greetings,
>
> We have a problem with slapd hanging up and using 100% CPU time on our
> machine when we try to do operations on a tree, it happens in random
> places but we could find one where it happens every time, when we try to
> delete a certain object in the tree. We can repro the problem as many
> times as we wish. Unfortunately the slapd has to be killed by kill -9
> and this corrupts our databases, so we have to reload a directory
> (PITA).
>
> Thus two questions: Why is this stuff happening ? and is there a way to
> run a consistency check on BDB databases, thus not requiering the full
> reload ?
>
> Here are release infos, configs and debug output:
>
> Releases:
> -----------------------------------------
> Openldap v2.1.12 release
> Bdb libraries 4.1.24
> Solaris 9 Sparc with latest patch cluster
>
> HW:
> -----------------------------------------
> Sun Netra T1125 with 1 Gig RAM.
>
>
> DB_CONFIG
> -------------------------------
> set_lg_bsize 2097152
> set_cachesize 0 209715200 2
>
>
> slapd.conf:
> --------------------------------------------------------------
> include                 /etc/openldap/schema/core.schema
> include                 /etc/openldap/schema/cosine.schema
> include                 /etc/openldap/schema/nis.schema
> include                 /etc/openldap/schema/qmail.schema
> include                 /etc/openldap/schema/inetorgperson.schema
> include                 /etc/openldap/schema/qmailControl.schema
> pidfile                 /var/run/slapd.pid
> argsfile                /var/run/slapd.args
> disallow                bind_anon
> allow                   bind_v2
>
> database                bdb
> suffix                  "o=Codeangels, c=CH"
> directory               /export/ldap-databases/codeangels
> rootdn                  ** censored **
> rootpw                  ** censored **
> index                   cn,sn,uid pres,eq,approx,sub
> index                   objectClass eq
> ... snip ....
>
> Debug:
> ---------------- snip -------------------
> => access_allowed: write access granted by write(=wrscx)
> ====> bdb_unlocked_cache_return_entry_r( 526 ): returned (0)
> bdb_dn2entry_rw("cn=managers,ou=codeangels.com,ou=mail,ou=itaccounts,o=codeangels,c=ch")
> => bdb_dn2id_matched(
> "cn=managers,ou=codeangels.com,ou=mail,ou=itaccounts,o=codeangels,c=ch"
> ) ====>
> bdb_cache_find_entry_dn2id("cn=managers,ou=codeangels.com,ou=mail,ou=itaccounts,o=codeangels,c=ch"):
> 542 (1 tries)
> bdb_cache_entry_db_lock: entry
> cn=managers,ou=codeangels.com,ou=mail,ou=itaccounts,o=codeangels,c=ch,
> rw 1, rc -30995 ====> bdb_cache_find_entry_id( 542 ): 542 (busy) 2
> locker = -2147483031
> bdb_cache_entry_db_lock: entry
> cn=managers,ou=codeangels.com,ou=mail,ou=itaccounts,o=codeangels,c=ch,
> rw 1, rc -30995 ====> bdb_cache_find_entry_id( 542 ): 542 (busy) 2
> locker = -2147483031
> bdb_cache_entry_db_lock: entry
> cn=managers,ou=codeangels.com,ou=mail,ou=itaccounts,o=codeangels,c=ch,
> rw 1, rc -30995 ====> bdb_cache_find_entry_id( 542 ): 542 (busy) 2
> locker = -2147483031
> .... repeat above 2 lines until killed ....
> ---------------- snip -------------------
>
> ---
> Kirill Ponazdyr
> Technical Director
> Codeangels Solutions
> Tel: +41 (0)43 844 90 10
> Fax: +41 (0)43 844 90 12