Anope Bug Tracker - Anope Stable (2.0.x series)
View Issue Details
0001623Anope Stable (2.0.x series)[All Projects] Generalpublic2014-11-28 03:012015-03-12 14:43
0001623: random crash on ldap authentication

I am using anope's ldap authentication module to integrate services with ldap user accounts.
However, I see the following problems:
Sometimes when giving an incorrect password the log says "protocol error" although that may be some configuration problem,
And also there is a more serious problem that if I try to quickly identify/logout/identify, although it usually works, it will completely crash anope after 2 or 3 tries, not sure if doing it slower changes things.
1. Configure anope to use ldap authentication.
2. Login to your account, see it succeeded.
3. Try to quickly log out and back in, after few successful logins there will be a crash without anything interesting in logs.
It is anope-2.0.1 compiled without debug info, debug logging is also disabled at the moment.
No tags attached.
Issue History
2014-11-28 03:01webczatNew Issue
2014-11-28 07:54DukePyrolatorNote Added: 0006675
2014-11-28 07:55DukePyrolatorNote Edited: 0006675bug_revision_view_page.php?bugnote_id=6675#r168
2014-11-28 07:56DukePyrolatorNote Edited: 0006675bug_revision_view_page.php?bugnote_id=6675#r169
2014-11-28 14:33webczatNote Added: 0006676
2014-11-29 09:24webczatNote Added: 0006678
2014-11-30 19:20AdamNote Added: 0006679
2014-12-02 01:24webczatNote Added: 0006681
2015-03-12 14:43AdamNote Added: 0006721
2015-03-12 14:43AdamStatusnew => resolved
2015-03-12 14:43AdamResolutionopen => fixed
2015-03-12 14:43AdamAssigned To => Adam

2015-03-12 14:43   
Reopen if still an issue post fb17bc85ead8c1be6ebe1561f77865f083fdc000
2014-12-02 01:24   
I believe that linking with ldap_r solves the problem, at least when testing logout/login I didn't crash services as before.
2014-11-30 19:20   
Try changing m_ldap to link to ldap_r not ldap.
2014-11-29 09:24   
I attach valgrind and gdb's bt full output, I don't have them in any other form so giving links to pastebin:
bt full: [^]
valgrind: [^]
2014-11-28 14:33   
Honestly, unless I am wrong, I am using openldap 2.4.40 manually compiled and put to /usr/local, ldd says m_ldap links to this one.
2014-11-28 07:54   
(edited on: 2014-11-28 07:56)
Are you using debian? I had the same bug on my debian box.
The debugger said its a bug in the ldap library.
After installing the library from the bug was gone.

I think this also fixed the protocol error log message.