https://bugs.openldap.org/show_bug.cgi?id=9803
--- Comment #2 from jengelh@inai.de jengelh@inai.de --- I have reproduced it with the current master, 73e882c87ff7a9e822b2ccc737faeb91250f345f. (Considering that io.c did not really change since 2.4.46, this was expected.)
#0 0x00007ffff4d2b18b in raise () from /lib64/libc.so.6 #1 0x00007ffff4d2c585 in abort () from /lib64/libc.so.6 #2 0x00007ffff4d2385a in __assert_fail_base () from /lib64/libc.so.6 #3 0x00007ffff4d238d2 in __assert_fail () from /lib64/libc.so.6 #4 0x00007ffff3a72551 in ber_get_next (sb=0x7fff60006d50, len=len@entry=0x7fffc71330b8, ber=ber@entry=0x7fff8c004bf0) at io.c:517 #5 0x00007ffff3c8f6d1 in try_read1msg (result=0x7fffc7133250, lc=0x7fff60032750, all=1, msgid=6, ld=0x7fff60032110) at result.c:499 #6 wait4msg (result=0x7fffc7133250, timeout=<optimized out>, all=1, msgid=<optimized out>, ld=0x7fff60032110) at result.c:369 #7 ldap_result (ld=ld@entry=0x7fff60032110, msgid=<optimized out>, all=all@entry=1, timeout=timeout@entry=0x0, result=result@entry=0x7fffc7133250) at result.c:120 #8 0x00007ffff3c97d48 in ldap_sasl_bind_s (ld=0x7fff60032110, dn=<optimized out>, mechanism=0x0, cred=<optimized out>, sctrls=<optimized out>, cctrls=<optimized out>, servercredp=0x0) at sasl.c:210
What I happen to observe now is that this is the second ldap_sasl_bind_s on an LDAP connection in a row; the first attempt ended with LDAP_LOCAL_ERROR.