Hi,

We have an LDAP client that calls into OpenSSL libraries to talk to a secure 
LDAP server. If for any reason we lose connection to the LDAP server, the LDAP 
handle is freed. As part of ldap_unbind(LDAP *ld), the ssl3_shutdown() is 
called, which calls "read" and hangs.

The stack is as follows:

(gdb) bt 15
#0  0x000000080166935c in read () at read.S:2
#1  0x00000008014748f0 in __read (fd=49, buf=0x803293003, nbytes=5) at 
src/freebsd-c/lib/libthr/thread/thr_syscalls.c:384
#2  0x0000000802c715d2 in sb_stream_read (sbiod=0x805664850, buf=0x803293003, 
len=5) at src/openldap/libraries/liblber/sockbuf.c:493
#3  0x0000000802c7207e in sb_debug_read (sbiod=0x805664970, buf=0x803293003, 
len=5) at src /openldap/libraries/liblber/sockbuf.c:827
#4  0x0000000802356971 in tlso_bio_read (b=0x803205320, buf=0x803293003 
"\027\003\001", len=5) at tls_o.c:687
#5  0x000000080252c2df in BIO_read () from /usr/lib/libcrypto.so.1.0.0
#6  0x0000000802eb9f01 in ssl3_read_n () from /usr/lib/libssl.so.1.0.0
#7  0x0000000802eba3ce in ssl3_read_bytes () from /usr/lib/libssl.so.1.0.0
#8  0x0000000802eb67ac in ssl3_shutdown () from /usr/lib/libssl.so.1.0.0
#9  0x0000000802356cf6 in tlso_sb_close (sbiod=0x8056649d0) at tls_o.c:808
#10 0x0000000802c71253 in ber_int_sb_close (sb=0x80329e0d0) at 
src/openldap/libraries/liblber/sockbuf.c:383
#11 0x000000080233d625 in ldap_free_connection (ld=0x80323f800, lc=0x803205240, 
force=1, unbind=1) at request.c:769

If anyone has seen a similar problem and know any fix, please let me know what 
needs to be done, appreciate any help. I have posted this to OpenLDAP, but did 
not have much luck.

Thanks
R.K. Aditham

Reply via email to