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

unexpected exit when freeing handle (2) (ITS#1689)



Full_Name: Virginie Seltrecht
Version: 2.0.23
OS: Solaris 2.6
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (195.101.121.1)


This problem follows ITS#1442. Here is a brief summary of the context :

I'm using the OpenLDAP C API to connect my client program to LDAP servers. TLS
connections are used. When my program receives a LDAP_SERVER_DOWN error as
result of a search request (when the server is stopped for instance), I try to
free the handle on the broken connection : the program exits systematically
without a core.

This is the same behaviour as in ITS#1442 excepts that the program doesn't exit
exactly at the same place. Here is what I get with my debugger :

1) if I use ldap_ld_free() with version 2.0.23 :
 
Program received signal SIGPIPE, Broken pipe.
0xef7c3200 in ?? ()
(gdb) where
#0  0xef7c3200 in ?? ()
#1  0xef7c2fe8 in ?? ()
#2  0xef769c28 in _PROCEDURE_LINKAGE_TABLE_ ()
#3  0xef758cd0 in sb_rdahead_close (sbiod=0x5503c0) at sockbuf.c:684
#4  0xef758304 in ber_int_sb_close (sb=0x54e4b0) at sockbuf.c:364
#5  0xef757968 in ber_sockbuf_free (sb=0x54e4b0) at sockbuf.c:61
#6  0xef781d9c in ldap_ld_free (ld=0x54f928, close=0, sctrls=0x0, cctrls=0x0) at
unbind.c:153

2) if I use ldap_unbind_s with version 2.0.23 :

Program received signal SIGPIPE, Broken pipe.
0xef5f81f0 in getrn ()
(gdb) where
#0  0xef5f81f0 in getrn ()
#1  0xef5f805c in lh_retrieve ()
#2  0xef5fa208 in ERR_get_state ()
#3  0xef5fac9c in get_error_values ()
#4  0xef5fa73c in ERR_peek_error ()
#5  0xef714300 in SSL_get_error ()
#6  0xef791c7c in sb_tls_write (sbiod=0x5511f8, buf=0xffffffff, len=7) at
tls.c:459
#7  0xef759264 in sb_debug_write (sbiod=0x5510d8, buf=0x56f9f8, len=7) at
sockbuf.c:838
#8  0xef758658 in ber_int_sb_write (sb=0x54e448, buf=0x56f9f8, len=7) at
sockbuf.c:428
#9  0xef755aa0 in ber_flush (sb=0x54e448, ber=0x56fde8, freeit=1) at io.c:229
#10 0xef781ea4 in ldap_send_unbind (ld=0x54f8c0, sb=0x54e448, sctrls=0x0,
cctrls=0x0) at unbind.c:204
#11 0xef7882cc in ldap_free_connection (ld=0x54f8c0, lc=0x552f88, force=5568704,
unbind=1) at request.c:389
#12 0xef781c9c in ldap_ld_free (ld=0x54f8c0, close=1, sctrls=0x0, cctrls=0x0) at
unbind.c:81
#13 0xef781be8 in ldap_unbind_ext (ld=0x54f8c0, sctrls=0x0, cctrls=0x0) at
unbind.c:43
#14 0xef781dc0 in ldap_unbind_s (ld=0x54f8c0) at unbind.c:163


3) when I use ldap_unbind_s with version 2.0.19

Program received signal SIGPIPE, Broken pipe.
0xef3882c4 in getpid ()
(gdb) where
#0  0xef3882c4 in getpid ()
#1  0xef5b4e20 in CRYPTO_thread_id ()
#2  0xef5fa1bc in ERR_get_state ()
#3  0xef5fac9c in get_error_values ()
#4  0xef5fa73c in ERR_peek_error ()
#5  0xef714300 in SSL_get_error ()
#6  0xef791afc in sb_tls_write (sbiod=0x5511f8, buf=0xffffffff, len=7) at
tls.c:434
#7  0xef759264 in sb_debug_write (sbiod=0x5510d8, buf=0x56f9f8, len=7) at
sockbuf.c:838
#8  0xef758658 in ber_int_sb_write (sb=0x54e448, buf=0x56f9f8, len=7) at
sockbuf.c:428
#9  0xef755aa0 in ber_flush (sb=0x54e448, ber=0x56fde8, freeit=1) at io.c:229
#10 0xef781e84 in ldap_send_unbind (ld=0x54f8c0, sb=0x54e448, sctrls=0x0,
cctrls=0x0) at unbind.c:206
#11 0xef7882ac in ldap_free_connection (ld=0x54f8c0, lc=0x552f88, force=5568704,
unbind=1) at request.c:389
#12 0xef781c7c in ldap_ld_free (ld=0x54f8c0, close=1, sctrls=0x0, cctrls=0x0) at
unbind.c:81
#13 0xef781bc8 in ldap_unbind_ext (ld=0x54f8c0, sctrls=0x0, cctrls=0x0) at
unbind.c:43
#14 0xef781da0 in ldap_unbind_s (ld=0x54f8c0) at unbind.c:165