[python-ldap] [BUG, PATCH] Recursive locking problem when using TLS with reconnect

Philipp Hahn hahn at univention.de
Mon Sep 8 10:38:42 CEST 2014


Hello,

On 08.09.2014 09:14, Michael Ströder wrote:
> Philipp Hahn wrote:
>> After updating python-ldap from 2.3.11 to 2.4.10 one of our tests
>> testing the reconnect behavior in obscure cases starts failing: the test
>> just hangs.
>> The problem also exists with 2.4.13.
>>
>> I think this is related to the change in 2.4.9
>> "ldapobject.ReconnectLDAPObject.reconnect() now does kind of an internal
>> locking to pause other threads while reconnecting  is pending."
> 
> This was fixed in 2.4.14. Upgrading to 2.4.15 is a good idea.

For me it is NOT fixed in 2.4.15:

curl -s
'https://pypi.python.org/packages/source/p/python-ldap/python-ldap-2.4.15.tar.gz#md5=f12183c87579631584c4bbe2d85ad0d9'
| tar xfzO - python-ldap-2.4.15/Lib/ldap/ldapobject.py | grep -A3 -B3 -n
-F '.start_tls_s('
784-          self._restore_options()
785-          # StartTLS extended operation in case this was called before
786-          if self._start_tls:
787:            self.start_tls_s()
788-          # Repeat last simple or SASL bind
789-          self._apply_last_bind()
790-        except (ldap.SERVER_DOWN,ldap.TIMEOUT),e:

Philipp


More information about the python-ldap mailing list