On Mon, Sep 08, 2014 at 11:45:59AM -0700, Norm Green wrote: > Were are occasionally seeing hangs when establishing an SSL connection with > OpenSSL 1.0.1i. This connection uses SRP and both the server and the client > sockets are in blocking mode (thus the hang). > > Is there anything I can do to debug this problem?
A recording (PCAP network capture) of the handshake in question up to the point at which the server and client deadlock, each waiting for the other to say something, would be useful. > Client side: > > gdb) where > #0 0x00007f91e412dd2d in read () from /lib/x86_64-linux-gnu/libpthread.so.0 > #1 0x00007f91b3749423 in sock_read (b=0x2585720, out=0x2580093 > "\025\003\002", outl=5) > at bss_sock.c:142 > #2 0x00007f91b3716c5c in BIO_read (b=0x2585720, out=0x2580093, outl=5) at > bio_lib.c:212 > #3 0x00007f91b380cc77 in ssl3_read_n (s=0x260bed0, n=5, max=5, extend=0) at > s3_pkt.c:240 > #4 0x00007f91b380cec3 in ssl3_get_record (s=0x260bed0) at s3_pkt.c:317 > #5 0x00007f91b380e43d in ssl3_read_bytes (s=0x260bed0, type=22, > buf=0x2614360 "\024", > len=4, peek=0) at s3_pkt.c:1024 > #6 0x00007f91b37fde3d in ssl3_get_message (s=0x260bed0, st1=4576, stn=4577, > mt=-1, > max=16384, ok=0x7fff4461ed00) at s3_both.c:457 > #7 0x00007f91b3804979 in ssl3_get_new_session_ticket (s=0x260bed0) at > s3_clnt.c:2060 > #8 0x00007f91b3800e12 in ssl3_connect (s=0x260bed0) at s3_clnt.c:545 Printing the SSL state could also be useful here in frame #8: print *s > #9 0x00007f91b383407e in SSL_connect (s=0x260bed0) at ssl_lib.c:949 > #10 0x00007f91b240230d in GsSslState::SSL_connect (this=0x7f91b2e6b740 > <SslState>, > ssl=0x260bed0) at /export/ghana1/users/bretlb/trunk/src/sslsocket.c:518 > > > Server Side > > (gdb) where > #0 0x00007f669ae5ad2d in read () from /lib/x86_64-linux-gnu/libpthread.so.0 > #1 0x00007f666a475423 in sock_read (b=0x1082990, out=0x1088473 > "\026\003\002", outl=5) > at bss_sock.c:142 > #2 0x00007f666a442c5c in BIO_read (b=0x1082990, out=0x1088473, outl=5) at > bio_lib.c:212 > #3 0x00007f666a538c77 in ssl3_read_n (s=0x1082180, n=5, max=5, extend=0) at > s3_pkt.c:240 > #4 0x00007f666a538ec3 in ssl3_get_record (s=0x1082180) at s3_pkt.c:317 > #5 0x00007f666a53a43d in ssl3_read_bytes (s=0x1082180, type=22, > buf=0x1082f2c > "\243Lk\327u\f\352\372\037\301\315\353\325\322\377\304\034\343\275?b-\030\f\314\371l\320Z\237\315!\223\336\v\266\355\027\271\063c\033\331R\255C\237", > <incomplete sequence \330>..., len=12735, peek=0) at s3_pkt.c:1024 > #6 0x00007f666a52a18d in ssl3_get_message (s=0x1082180, st1=8608, stn=8609, > mt=-1, > max=16384, ok=0x7fff4d35eb50) at s3_both.c:538 > #7 0x00007f666a5416ae in ssl3_get_cert_verify (s=0x1082180) at > s3_srvr.c:2926 Also print the server SSL structure. The server seems to be expecting a client certificate perhaps? I would not expect a client certificate with SRP. What is the agreed cipher suite? A PCAP with all previous messages would be most useful. > #8 0x00007f666a53c7e9 in ssl3_accept (s=0x1082180) at s3_srvr.c:680 > #9 0x00007f666a560042 in SSL_accept (s=0x1082180) at ssl_lib.c:940 > #10 0x00007f669731b0fb in GsSslState::SSL_accept (this=0x7f669800fd20 > <SslState>, > ssl=0x1082180) at /export/ghana1/users/bretlb/trunk/src/sslsocket.c:528 -- Viktor. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org