You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Bryan Call (JIRA)" <ji...@apache.org> on 2012/11/30 19:35:58 UTC

[jira] [Comment Edited] (TS-1598) Coring in SSL

    [ https://issues.apache.org/jira/browse/TS-1598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507515#comment-13507515 ] 

Bryan Call edited comment on TS-1598 at 11/30/12 6:34 PM:
----------------------------------------------------------

so the line that starts this mess is SSLNetVConnection.cc:135:

    while (block_write_avail > 0) {
      int rres = SSL_read(sslvc->ssl, b->end() + offset, (int)block_write_avail);   <--- this line

(gdb) info locals
rres = <value optimized out>
offset = <value optimized out>
s = 0x2b1f3c633350
sslvc = 0x2b1f3c633250
buf = @0x2b1f3c633378
bytes_read = 0
block_write_avail = 47430144907985  <--- if that is the number of bytes that seem crazy high
__func__ = "ssl_read_from_net"
b = 0x2b1f6b16f9b0
event = <value optimized out>
sslErr = 0


(gdb) p *b
$19 = {<RefCountObj> = {<ForceVFPTToTop> = {_vptr.ForceVFPTToTop = 0x6a41b0}, 
    m_refcount = 1}, _start = 0x0, _end = 0x0, 
  _buf_end = 0x2b2330f05ad1 "\272j", 
  _location = 0x6bcaa8 "memory/IOBuffer/HttpClientSession.cc:235", data = {
    m_ptr = 0x2b2088e31e00}, next = {m_ptr = 0x0}}

(gdb) p *sslvc->ssl
$20 = {version = 769, type = 8192, method = 0x3f96455840, 
  rbio = 0x2b1fbceed1c0, wbio = 0x2b1fbceed1c0, bbio = 0x0, rwstate = 1, 
  in_handshake = 0, handshake_func = 0x3f9621cd30 <ssl3_accept>, server = 1, 
  new_session = 0, quiet_shutdown = 1, shutdown = 0, state = 3, rstate = 240, 
  init_buf = 0x0, init_msg = 0x2b235cf40a34, init_num = 0, init_off = 0, 
  packet = 0x2b1f78d17d23 "\027\003\001\b\t<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<A:propfind xmlns:A=\"DAV:\">\n  <A:prop>\n    <A:add-member/>\n    <C:allowed-sharing-modes xmlns:C=\"http://calendarserver.org/ns/\"/>\n    <F:bulk-requests xmlns"..., packet_length = 0, s2 = 0x0, s3 = 0x2b1fbd066760, d1 = 0x0, 
  read_ahead = 0, msg_callback = 0, msg_callback_arg = 0x0, hit = 0, 
  param = 0x2b1fbd066720, cipher_list = 0x0, cipher_list_by_id = 0x0, 
  mac_flags = 0, enc_read_ctx = 0x2b1f81c70020, read_hash = 0x2b1f81c700d0, 
  expand = 0x0, enc_write_ctx = 0x2b1fbed76d90, write_hash = 0x2b1fbed76e40, 
  compress = 0x0, cert = 0x2b1fbd066640, sid_ctx_length = 0, 
  sid_ctx = '\000' <repeats 31 times>, session = 0x2b1fbd066e80, 
  generate_session_id = 0, verify_mode = 0, verify_callback = 0, 
  info_callback = 0, error = 0, error_code = 0, kssl_ctx = 0x2b1fbceed240, 
  psk_client_callback = 0, psk_server_callback = 0, ctx = 0x1916080, 
  debug = 0, verify_result = 0, ex_data = {sk = 0x2b1fbceed670, dummy = 0}, 
  client_CA = 0x0, references = 1, options = 4194308, mode = 0, 
  max_cert_list = 102400, first_packet = 0, client_version = 769, 
  max_send_fragment = 16384, tlsext_debug_cb = 0, tlsext_debug_arg = 0x0, 
  tlsext_hostname = 0x0, servername_done = 0, tlsext_status_type = -1, 
  tlsext_status_expected = 0, tlsext_ocsp_ids = 0x0, tlsext_ocsp_exts = 0x0, 
  tlsext_ocsp_resp = 0x0, tlsext_ocsp_resplen = -1, 
  tlsext_ticket_expected = 0, tlsext_opaque_prf_input = 0x0, 
  tlsext_opaque_prf_input_len = 0, tlsext_session_ticket = 0x0, 
  tls_session_ticket_ext_cb = 0, tls_session_ticket_ext_cb_arg = 0x0, 
  tls_session_secret_cb = 0, tls_session_secret_cb_arg = 0x0, 
  initial_ctx = 0x1916080}
                
      was (Author: bcall):
    so the line that starts this mess is SSLNetVConnection.cc:135:

    while (block_write_avail > 0) {
      int rres = SSL_read(sslvc->ssl, b->end() + offset, (int)block_write_avail);   <--- this line

(gdb) info locals
rres = <value optimized out>
offset = <value optimized out>
s = 0x2b1f3c633350
sslvc = 0x2b1f3c633250
buf = @0x2b1f3c633378
bytes_read = 0
block_write_avail = 47430144907985  <--- if that is the number of blocks that seem crazy high
__func__ = "ssl_read_from_net"
b = 0x2b1f6b16f9b0
event = <value optimized out>
sslErr = 0


(gdb) p *b
$19 = {<RefCountObj> = {<ForceVFPTToTop> = {_vptr.ForceVFPTToTop = 0x6a41b0}, 
    m_refcount = 1}, _start = 0x0, _end = 0x0, 
  _buf_end = 0x2b2330f05ad1 "\272j", 
  _location = 0x6bcaa8 "memory/IOBuffer/HttpClientSession.cc:235", data = {
    m_ptr = 0x2b2088e31e00}, next = {m_ptr = 0x0}}

(gdb) p *sslvc->ssl
$20 = {version = 769, type = 8192, method = 0x3f96455840, 
  rbio = 0x2b1fbceed1c0, wbio = 0x2b1fbceed1c0, bbio = 0x0, rwstate = 1, 
  in_handshake = 0, handshake_func = 0x3f9621cd30 <ssl3_accept>, server = 1, 
  new_session = 0, quiet_shutdown = 1, shutdown = 0, state = 3, rstate = 240, 
  init_buf = 0x0, init_msg = 0x2b235cf40a34, init_num = 0, init_off = 0, 
  packet = 0x2b1f78d17d23 "\027\003\001\b\t<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<A:propfind xmlns:A=\"DAV:\">\n  <A:prop>\n    <A:add-member/>\n    <C:allowed-sharing-modes xmlns:C=\"http://calendarserver.org/ns/\"/>\n    <F:bulk-requests xmlns"..., packet_length = 0, s2 = 0x0, s3 = 0x2b1fbd066760, d1 = 0x0, 
  read_ahead = 0, msg_callback = 0, msg_callback_arg = 0x0, hit = 0, 
  param = 0x2b1fbd066720, cipher_list = 0x0, cipher_list_by_id = 0x0, 
  mac_flags = 0, enc_read_ctx = 0x2b1f81c70020, read_hash = 0x2b1f81c700d0, 
  expand = 0x0, enc_write_ctx = 0x2b1fbed76d90, write_hash = 0x2b1fbed76e40, 
  compress = 0x0, cert = 0x2b1fbd066640, sid_ctx_length = 0, 
  sid_ctx = '\000' <repeats 31 times>, session = 0x2b1fbd066e80, 
  generate_session_id = 0, verify_mode = 0, verify_callback = 0, 
  info_callback = 0, error = 0, error_code = 0, kssl_ctx = 0x2b1fbceed240, 
  psk_client_callback = 0, psk_server_callback = 0, ctx = 0x1916080, 
  debug = 0, verify_result = 0, ex_data = {sk = 0x2b1fbceed670, dummy = 0}, 
  client_CA = 0x0, references = 1, options = 4194308, mode = 0, 
  max_cert_list = 102400, first_packet = 0, client_version = 769, 
  max_send_fragment = 16384, tlsext_debug_cb = 0, tlsext_debug_arg = 0x0, 
  tlsext_hostname = 0x0, servername_done = 0, tlsext_status_type = -1, 
  tlsext_status_expected = 0, tlsext_ocsp_ids = 0x0, tlsext_ocsp_exts = 0x0, 
  tlsext_ocsp_resp = 0x0, tlsext_ocsp_resplen = -1, 
  tlsext_ticket_expected = 0, tlsext_opaque_prf_input = 0x0, 
  tlsext_opaque_prf_input_len = 0, tlsext_session_ticket = 0x0, 
  tls_session_ticket_ext_cb = 0, tls_session_ticket_ext_cb_arg = 0x0, 
  tls_session_secret_cb = 0, tls_session_secret_cb_arg = 0x0, 
  initial_ctx = 0x1916080}
                  
> Coring in SSL
> -------------
>
>                 Key: TS-1598
>                 URL: https://issues.apache.org/jira/browse/TS-1598
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: SSL
>    Affects Versions: 3.2.0
>         Environment: RHEL6.2 64bit
>            Reporter: Abhishek Nayani
>
> (gdb) bt
> #0  0x000000390ac88c5b in memcpy () from /lib64/libc.so.6
> #1  0x0000003f962264ce in ssl3_read_bytes () from /usr/lib64/libssl.so.10
> #2  0x0000003f96222270 in ?? () from /usr/lib64/libssl.so.10
> #3  0x000000000066eaf7 in ssl_read_from_net (nh=<value optimized out>, vc=0x2ada4437e0a0, lthread=0x2ada11ff2010, ret=@0x2ada174e5c10) at SSLNetVConnection.cc:135
> #4  0x000000000066f3b0 in SSLNetVConnection::net_read_io (this=0x2ada4437e0a0, nh=0x2ada11ff51e8, lthread=0x2ada11ff2010) at SSLNetVConnection.cc:288
> #5  0x0000000000676fb2 in NetHandler::mainNetEvent (this=0x2ada11ff51e8, event=<value optimized out>, e=<value optimized out>) at UnixNet.cc:381
> #6  0x00000000006a0ba4 in handleEvent (this=0x2ada11ff2010, e=0x24fdfc0, calling_code=5) at I_Continuation.h:146
> #7  EThread::process_event (this=0x2ada11ff2010, e=0x24fdfc0, calling_code=5) at UnixEThread.cc:142
> #8  0x00000000006a16f3 in EThread::execute (this=0x2ada11ff2010) at UnixEThread.cc:264
> #9  0x000000000069fae2 in spawn_thread_internal (a=0x268f1a0) at Thread.cc:88
> #10 0x000000390b007851 in start_thread () from /lib64/libpthread.so.0
> #11 0x000000390ace76dd in clone () from /lib64/libc.so.6

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira