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

Re: (ITS#3546) Sync rep provider and server crash on SIGTERM



Well, this code is likely to be the cause, but we'll have to find 
another way to fix it because removing this code causes the provider to 
leak resources when persistent sessions are closed. (ITS#3448)

m.d.t.evans@qmul.ac.uk wrote:

>Complete guesswork on my part... undoing a change made in 1.295 seems to
>fix this behaviour.
>
>bash-3.00$ diff -u connection.c.0 connection.c
>--- connection.c.0      2005-01-20 17:01:06.000000000 +0000
>+++ connection.c        2005-02-17 10:15:14.578895942 +0000
>@@ -772,17 +772,10 @@
> {
>        /* c_mutex must be locked by caller */
>
>-       Operation *o, *next, op = {0};
>-       SlapReply rs = {0};
>+       Operation *o;
>
>-       op.o_conn = c;
>-       op.o_connid = c->c_connid;
>-       op.o_tag = LDAP_REQ_ABANDON;
>-       for ( o = LDAP_STAILQ_FIRST( &c->c_ops ); o; o=next ) {
>-               next = LDAP_STAILQ_NEXT( o, o_next );
>-               op.orn_msgid = o->o_msgid;
>+       LDAP_STAILQ_FOREACH(o, &c->c_ops, o_next) {
>                o->o_abandon = 1;
>-               fe_op_abandon( &op, &rs );
>        }
>
>        /* remove pending operations */
>
>
>I've also found that it seems to fix provider core dumps that happen
>when the following search is performed:
>
>openldap/bin/ldapsearch -H ldap://localhost:11389 -b"<base>" -E sync=rp
>
>The dumps do not happen when a sync=ro search is done.
>
>Cheers,
>Martin.
>
>  
>


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