Bug 35841 - Fix python-ldap-2.4.15 + patch
Fix python-ldap-2.4.15 + patch
Product: UCS
Classification: Unclassified
Component: LDAP
UCS 4.0
All Linux
: P5 normal (vote)
: UCS 4.0
Assigned To: Philipp Hahn
Felix Botner
: interim-2
Depends on:
Blocks: 35741 35852
  Show dependency treegraph
Reported: 2014-09-08 13:54 CEST by Philipp Hahn
Modified: 2014-11-26 06:55 CET (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:

Fix python-ldap recursive locking (514 bytes, text/plain)
2014-09-08 13:54 CEST, Philipp Hahn

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2014-09-08 13:54:35 CEST
Created attachment 6101 [details]
Fix python-ldap recursive locking

+++ This bug was initially created as a clone of Bug #35741 comment 6 +++
python-ldap_2.4.9 broke it:
* ldapobject.ReconnectLDAPObject.reconnect() now does kind of
  an internal locking to pause other threads while reconnecting
  is pending.

UCS-4.0 uses 2.4.10, which is the latest version in Debian.
Debian-RFP 2.4.15: <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742487>

May-be fixed by 2.4.13:
* ldapobject.ReconnectLDAPObject now uses internal class-wide
  lock for serializing reconnects
* Method signature of ReconnectLDAPObject.reconnect() changed to be able
  to call it with separate retry_max and retry_delay values

See <https://mail.python.org/pipermail/python-ldap/2013q3/003265.html> for a patch; this alone does not seem to fix the bug.

A quick test with a self-compiled 2.4.15 also failed: The process is then multi-threaded and hangs in some lock.

The thread links to <https://bugs.launchpad.net/ldapuserfolder/+bug/650371>.

The attach patch fixed the dead-lock. It was sent upstream, but not yet accepted as the upstream other claims the bug should be fixed with 2.4.14 already, but isn't with my test of 2.4.15.
Comment 1 Philipp Hahn univentionstaff 2014-09-10 09:14:04 CEST
Patch was accepted upstream: <http://python-ldap.cvs.sourceforge.net/viewvc/python-ldap/python-ldap/Lib/ldap/ldapobject.py?r1=1.139&r2=1.141>

Patch sent also to Debian: <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=742487>

Package: python-ldap
Version: 2.4.15-
Branch: ucs_4.0-0

No change log entry added, as python-ldap was updated to 2.4.10 with Debian-Wheezy anyway.
Comment 2 Philipp Hahn univentionstaff 2014-09-10 14:45:04 CEST
Michael Stöder just released 2.4.16 with my patch included and asks to update to that version:

Package: python-ldap
Version: 2.4.16-
Branch: ucs_4.0-0
Comment 3 Felix Botner univentionstaff 2014-10-02 15:29:05 CEST
OK - python-ldap 2.4.16 in UCS 4.0
OK - patch is upstream
OK - 25reconnect_uldap
OK - Changelog
Comment 4 Stefan Gohmann univentionstaff 2014-11-26 06:55:46 CET
UCS 4.0-0 has been released:

If this error occurs again, please use "Clone This Bug".