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

Re: (ITS#5077) syncrepl.add_cmp() infinite loop on swapped values

On Aug 10, 2007, at 2:16 PM, Howard Chu wrote:

> donn@u.washington.edu wrote:
>> Full_Name: Donn Cave
>> Version: 2.4.4
>> OS: Red Hat Linux
>> URL: ftp://ftp.openldap.org/incoming/
>> Submission from: (NULL) (
>> In "while" loop at 2656, I find old->a_vals are like [..., a,  
>> b, ...] and
>> new->a_vals are like [..., b, a, ...].
>> Matches are found at old [i] == new [k = j+1] and old [k = i+1] ==  
>> new [j], but
>> this just shows that neither an add nor a delete is called for,  
>> and the loop end
>> is reached without having incremented i or j.
>> Actual attribute values I'm looking at right now in the debugger are
>> eduPersonAffiliation:  old [ member, alum, employee, faculty ],  
>> new [ member,
>> alum, faculty, employee ].  I built the replica from a slapcat  
>> dump on the idle
>> master, started the slapd syncrepl client and applied a lot of normal
>> modifications to the master, until it hit the infinite loop.  It  
>> has been a
>> recurrent problem.
> Now fixed in HEAD, please test.

Aug 10 15:06:55 rufus03 slapd[31488]: null_callback : error code 0x14
Aug 10 15:06:55 rufus03 slapd[31488]: syncrepl_entry: rid=101  
be_modify (20)
Aug 10 15:06:55 rufus03 slapd[31488]: syncrepl_entry: rid=101  
be_modify failed (20)

I could put some more research into this, but tell me if this
doesn't make sense.  Suppose this mysteriously swapped order:

Your fix increments the first list's index, so next iteration it's

which is fine, but next iteration is

"a" looks new at this point, and I try to add it, but it isn't new -
we just forgot that it was in "old" - and I get error 0x14

	Donn Cave, donn@u.washington.edu