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

Re: (ITS#6282) Assertion failure in openldap clients when server is frozen and limits are in place



Meh.  Looks like ITS strips the quoted-printable header.
Trying again, after editing away strings with 8-bit characters.
BTW, this was a RE24 backtrace.


Easily reproducable.

./configure --without-tls --without-cyrus-sasl --disable-slapd CFLAGS="-O0 -g"
make -s

echo TIMEOUT 1 > ldaprc

: Run a listening "server" which just sleeps
python -c 'import time; from socket import *; s = socket(AF_INET, SOCK_STREAM); s.bind(("localhost", 3890)); s.listen(5); time.sleep(9999)' &

gdb -q clients/tools/ldapsearch
(gdb) run -xh localhost:3890
ldapsearch: error.c:255: ldap_parse_result: Assertion `r != ((void *)0)' failed.

(gdb) backtrace
#0  0x00002b811748d265 in raise () from /lib64/libc.so.6
#1  0x00002b811748ed10 in abort () from /lib64/libc.so.6
#2  0x00002b81174866e6 in __assert_fail () from /lib64/libc.so.6
#3  0x0000000000413234 in ldap_parse_result (ld=0x65a7170, r=0x0, errcodep=0x7fffc814f1a8, matcheddnp=0x7fffc814f190, errmsgp=0x7fffc814f188, 
    referralsp=0x7fffc814f180, serverctrls=0x7fffc814f198, freeit=1) at error.c:255
#4  0x0000000000408cfd in tool_bind (ld=0x65a7170) at common.c:1422
#5  0x0000000000403fef in main (argc=3, argv=0x7fffc8153508) at ldapsearch.c:912
(gdb) frame 4
#4  0x0000000000408cfd in tool_bind (ld=0x65a7170) at common.c:1422
1422                    rc = ldap_parse_result( ld, result, &err, &matched, &info, &refs,
(gdb) info locals
err = 0
msgbuf = ...
info = 0x0
refs = (char **) 0x0
msgid = 1
rc = 0
result = (LDAPMessage *) 0x0
ctrls = (LDAPControl **) 0x0
matched = 0x0
sctrlsp = (LDAPControl **) 0x0
sctrls = {0x0, 0x65a7020, 0x443b26}
sctrl = {{ldctl_oid = 0xffffffff <Address 0xffffffff out of bounds>, ldctl_value = {bv_len = 0, bv_val = 0x0}, ldctl_iscritical = 0 '\0'}, {
    ldctl_oid = 0x65a7050 "ldap://localhost:3890";, ldctl_value = {bv_len = 106590352, bv_val = 0x4fc2 <Address 0x4fc2 out of bounds>}, 
    ldctl_iscritical = -43}, {ldctl_oid = 0x65a7170, ldctl_value = {bv_len = 388262848, bv_val = 0x7fffc8153420 ""}, 
    ldctl_iscritical = -110 '\222'}}
nsctrls = 0
__PRETTY_FUNCTION__ = "tool_bind"

-- 
Hallvard