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

Re: (ITS#6798) Mutex starvation on two-level referral for SASL connection



sgallagh@redhat.com wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 01/19/2011 11:39 AM, masarati@aero.polimi.it wrote:
>>> Full_Name: Stephen Gallagher
>>> Version: 2.4.21-0ubuntu5.2
>>
>> I think this issue report is obsoleted by ITS#6510 (released with OL
>> 2.4.22), which prevents binds from returning referrals.  Please upgrade
>> and re-check.
>
> Upgraded to 2.4.23 and the same behavior occurs. I note in issue 6510
> that it was suggested that nested mutexes could be used to resolve this.
> Perhaps we should revisit that.

No. Nested mutexes are non-portable, and as already discussed in #6510, it is 
incorrect to process referrals returned in response to Bind requests.

> As you can see from our backtrace, this is actually occurring during the
> processing of ldap_result(). We're handling a rebind as ldap_result
> travels through a series of referrals.

Most likely your server is not using an actual Bind Response tag in its 
response message. It would be good if you could run this using a debug build 
(no optimization, full debug symbols present) and examine the tag that was 
parsed from the referral result.

Looks like libldap needs to be changed to actually record the tag of the 
outgoing requests. (It ought to do so anyway, and probably should return a 
ProtocolError result if it receives a response message whose tag doesn't match 
its request type.)

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/