You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Leif Hedstrom (JIRA)" <ji...@apache.org> on 2016/09/02 21:58:20 UTC

[jira] [Comment Edited] (TS-4814) Crash in SSLNetVConnection::do_io_close

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

Leif Hedstrom edited comment on TS-4814 at 9/2/16 9:57 PM:
-----------------------------------------------------------

*this in frame 7:

{code}
$17 = {<UnixNetVConnection> = {<NetVConnection> = {<VConnection> = {<Continuation> = {<force_VFPT_to_top> = {
            _vptr.force_VFPT_to_top = 0xc21658 <vtable for SSLNetVConnection+16>},
          handler = (int (Continuation::*)(Continuation * const, int,
    void *)) 0xa3c49a <UnixNetVConnection::mainEvent(int, Event*)>,
          handler_name = 0xc2ffe0 "(NetVConnHandler)&UnixNetVConnection::mainEvent", mutex = {m_ptr = 0x60c000407d40},
          link = {<SLink<Continuation>> = {next = 0x0}, prev = 0x61800005fc80}, control_flags = {raw_flags = 0}}, lerrno = 0},
      options = {ip_proto = NetVCOptions::USE_TCP, ip_family = 2, local_ip = {_family = 0, _addr = {_ip4 = 0, _ip6 = {__in6_u = {
                __u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}},
            _byte = '\000' <repeats 15 times>, _u32 = {0, 0, 0, 0}, _u64 = {0, 0}}}, local_port = 0,
        addr_binding = NetVCOptions::ANY_ADDR, f_blocking = false, f_blocking_connect = false, socks_support = 0 '\000',
        socks_version = 0 '\000', socket_recv_bufsize = 0, socket_send_bufsize = 0, sockopt_flags = 0, packet_mark = 0,
        packet_tos = 0, etype = 0, sni_servername = {<ats_scoped_resource<detail::SCOPED_MALLOC_TRAITS<char> >> = {
            _r = 0x0}, <No data fields>}}, socks_addr = {type = 0 '\000', addr = {ipv4 = "\000\000\000", buf = 0x0}},
      attributes = 4, thread = 0x2ae82b12d800, local_addr = {sa = {sa_family = 2,
          sa_data = "\001\273h\357\217\020\000\000\000\000\000\000\000"}, sin = {sin_family = 2, sin_port = 47873, sin_addr = {
            s_addr = 277868392}, sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 2, sin6_port = 47873,
          sin6_flowinfo = 277868392, sin6_addr = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0,
                0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}}, remote_addr = {sa = {sa_family = 2,
          sa_data = "\366J˅\252\237\000\000\000\000\000\000\000"}, sin = {sin_family = 2, sin_port = 19190, sin_addr = {
            s_addr = 2678752715}, sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 2, sin6_port = 19190,
          sin6_flowinfo = 2678752715, sin6_addr = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0,
                0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}}, got_local_addr = true, got_remote_addr = true,
      is_internal_request = false, is_transparent = false, write_buffer_empty_event = 0}, action_ = {
      _vptr.Action = 0xa97040 <vtable for Action+16>, continuation = 0x0, mutex = {m_ptr = 0x0}, cancelled = 0}, closed = 0,
    read = {enabled = 0, vio = {_cont = 0x6190000de880, nbytes = 9223372036854775807, ndone = 0, op = 1, buffer = {name = 0x0,
          mbuf = 0x611000a94100, entry = 0x0}, vc_server = 0x618000057080, mutex = {m_ptr = 0x60c000407d40}},
      ready_link = {<SLink<UnixNetVConnection>> = {next = 0x0}, prev = 0x0}, enable_link = {next = 0x0}, in_enabled_list = 0,
      triggered = 0}, write = {enabled = 0, vio = {_cont = 0x0, nbytes = 0, ndone = 0, op = 2, buffer = {name = 0x0,
          mbuf = 0x611000a2ea80, entry = 0x611000a2eac0}, vc_server = 0x618000057080, mutex = {m_ptr = 0x60c000407d40}},
      ready_link = {<SLink<UnixNetVConnection>> = {next = 0x0}, prev = 0x0}, enable_link = {next = 0x0}, in_enabled_list = 0,
      triggered = 1}, cop_link = {<SLink<UnixNetVConnection>> = {next = 0x0}, prev = 0x0},
    keep_alive_queue_link = {<SLink<UnixNetVConnection>> = {next = 0x0}, prev = 0x61800005fc80},
    active_queue_link = {<SLink<UnixNetVConnection>> = {next = 0x0}, prev = 0x0}, inactivity_timeout_in = 300000000000,
    active_timeout_in = 0, next_inactivity_timeout_at = 1472850939322871213, next_activity_timeout_at = 0, ep = {fd = 56,
      event_loop = 0x2ae82bdbc800, type = 2, data = {c = 0x618000057080, vc = 0x618000057080, dnscon = 0x618000057080, na =
    0x618000057080, uc = 0x618000057080}}, nh = 0x2ae82b131490, id = 603, server_addr = {sa = {sa_family = 2,
        sa_data = "\366J˅\252\237\000\000\000\000\000\000\000"}, sin = {sin_family = 2, sin_port = 19190, sin_addr = {
          s_addr = 2678752715}, sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 2, sin6_port = 19190,
        sin6_flowinfo = 2678752715, sin6_addr = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0,
              0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}}, {flags = 0, f = {got_local_addr = 0,
        shutdown = 0}}, con = {_vptr.Connection = 0xc15330 <vtable for Connection+16>, fd = 56, addr = {sa = {sa_family = 2,
          sa_data = "\366J˅\252\237\000\000\000\000\000\000\000"}, sin = {sin_family = 2, sin_port = 19190, sin_addr = {
            s_addr = 2678752715}, sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 2, sin6_port = 19190,
          sin6_flowinfo = 2678752715, sin6_addr = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0,
                0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}}, is_bound = false, is_connected = false,
      sock_type = 0}, recursion = 1, submit_time = 1472850638882911098, oob_ptr = 0x0, from_accept_thread = false,
    origin_trace = false, origin_trace_addr = 0x0, origin_trace_port = 0}, ssl = 0x6180000c7c80, sslHandshakeBeginTime = 0,
---Type <return> to continue, or q <return> to quit---
  sslLastWriteTime = 0, sslTotalBytesSent = 3819, hookOpRequested = TS_SSL_HOOK_OP_DEFAULT, sslHandShakeComplete = true,
  sslClientConnection = false, sslClientRenegotiationAbort = false, sslSessionCacheHit = false, handShakeBuffer = 0x0,
  handShakeHolder = 0x0, handShakeReader = 0x0, handShakeBioStored = 0, transparentPassThrough = false, curHook = 0x0,
  sslPreAcceptHookState = SSLNetVConnection::SSL_HOOKS_DONE, sslHandshakeHookState = SSLNetVConnection::HANDSHAKE_HOOKS_DONE,
  npnSet = 0x60c00000ee58, npnEndpoint = 0x0, sessionAcceptPtr = 0x0, sslTrace = false}
{code}


and *ssl:

{code}
$19 = {version = 771, type = 8192, method = 0x2ae824fd20a0 <TLSv1_2_server_method_data.16131>, rbio = 0x60b000175330,
  wbio = 0x60b000175070, bbio = 0x0, rwstate = 2, in_handshake = 0, handshake_func = 0x2ae824d86f20 <ssl3_accept>, server = 1,
  new_session = 0, quiet_shutdown = 0, shutdown = 3, state = 3, rstate = 240, init_buf = 0x0, init_msg = 0x62a001e5a204,
  init_num = 0, init_off = 0, packet = 0x62d00111c403 "\025\003\003", packet_length = 0, s2 = 0x0, s3 = 0x61a000005a80,
  d1 = 0x0, read_ahead = 0, msg_callback = 0x0, msg_callback_arg = 0x0, hit = 0, param = 0x606000017420, cipher_list = 0x0,
  cipher_list_by_id = 0x0, mac_flags = 0, enc_read_ctx = 0x60f000059320, read_hash = 0x60400000add0, expand = 0x0,
  enc_write_ctx = 0x60f000059230, write_hash = 0x60400000ad50, compress = 0x0, cert = 0x617000071580, sid_ctx_length = 32,
  sid_ctx = "mm\032\377\313i\374l\022\263\267M\377TfQ\252\217\256\204\242\rÚ\211=*(\357\375\347G", session = 0x61300004b440,
  generate_session_id = 0x0, verify_mode = 0, verify_callback = 0x0, info_callback = 0x0, error = 0, error_code = 0,
  psk_client_callback = 0x0, psk_server_callback = 0x0, ctx = 0x61800000e880, debug = 0, verify_result = 0, ex_data = {
    sk = 0x60300016cc30, dummy = 0}, client_CA = 0x0, references = 1, options = 2203782143, mode = 16, max_cert_list = 102400,
  first_packet = 0, client_version = 771, max_send_fragment = 16384, tlsext_debug_cb = 0x0, 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_ecpointformatlist_length = 0, tlsext_ecpointformatlist = 0x0, tlsext_ellipticcurvelist_length = 0,
  tlsext_ellipticcurvelist = 0x0, tlsext_opaque_prf_input = 0x0, tlsext_opaque_prf_input_len = 0, tlsext_session_ticket = 0x0,
  tls_session_ticket_ext_cb = 0x0, tls_session_ticket_ext_cb_arg = 0x0, tls_session_secret_cb = 0x0,
  tls_session_secret_cb_arg = 0x0, initial_ctx = 0x61800000e880, next_proto_negotiated = 0x0,
  next_proto_negotiated_len = 0 '\000', srtp_profiles = 0x0, srtp_profile = 0x0, tlsext_heartbeat = 0, tlsext_hb_pending = 0,
  tlsext_hb_seq = 0, renegotiate = 0, srp_ctx = {SRP_cb_arg = 0x0, TLS_ext_srp_username_callback = 0x0,
    SRP_verify_param_callback = 0x0, SRP_give_srp_client_pwd_callback = 0x0, login = 0x0, N = 0x0, g = 0x0, s = 0x0, B = 0x0,
    A = 0x0, a = 0x0, b = 0x0, v = 0x0, info = 0x0, strength = 1024, srp_Mask = 0}, alpn_client_proto_list = 0x0,
  alpn_client_proto_list_len = 0}
{code}


was (Author: zwoop):
*this in frame 7:

{code}
$17 = {<UnixNetVConnection> = {<NetVConnection> = {<VConnection> = {<Continuation> = {<force_VFPT_to_top> = {
            _vptr.force_VFPT_to_top = 0xc21658 <vtable for SSLNetVConnection+16>},
          handler = (int (Continuation::*)(Continuation * const, int,
    void *)) 0xa3c49a <UnixNetVConnection::mainEvent(int, Event*)>,
          handler_name = 0xc2ffe0 "(NetVConnHandler)&UnixNetVConnection::mainEvent", mutex = {m_ptr = 0x60c000407d40},
          link = {<SLink<Continuation>> = {next = 0x0}, prev = 0x61800005fc80}, control_flags = {raw_flags = 0}}, lerrno = 0},
      options = {ip_proto = NetVCOptions::USE_TCP, ip_family = 2, local_ip = {_family = 0, _addr = {_ip4 = 0, _ip6 = {__in6_u = {
                __u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}},
            _byte = '\000' <repeats 15 times>, _u32 = {0, 0, 0, 0}, _u64 = {0, 0}}}, local_port = 0,
        addr_binding = NetVCOptions::ANY_ADDR, f_blocking = false, f_blocking_connect = false, socks_support = 0 '\000',
        socks_version = 0 '\000', socket_recv_bufsize = 0, socket_send_bufsize = 0, sockopt_flags = 0, packet_mark = 0,
        packet_tos = 0, etype = 0, sni_servername = {<ats_scoped_resource<detail::SCOPED_MALLOC_TRAITS<char> >> = {
            _r = 0x0}, <No data fields>}}, socks_addr = {type = 0 '\000', addr = {ipv4 = "\000\000\000", buf = 0x0}},
      attributes = 4, thread = 0x2ae82b12d800, local_addr = {sa = {sa_family = 2,
          sa_data = "\001\273h\357\217\020\000\000\000\000\000\000\000"}, sin = {sin_family = 2, sin_port = 47873, sin_addr = {
            s_addr = 277868392}, sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 2, sin6_port = 47873,
          sin6_flowinfo = 277868392, sin6_addr = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0,
                0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}}, remote_addr = {sa = {sa_family = 2,
          sa_data = "\366J˅\252\237\000\000\000\000\000\000\000"}, sin = {sin_family = 2, sin_port = 19190, sin_addr = {
            s_addr = 2678752715}, sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 2, sin6_port = 19190,
          sin6_flowinfo = 2678752715, sin6_addr = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0,
                0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}}, got_local_addr = true, got_remote_addr = true,
      is_internal_request = false, is_transparent = false, write_buffer_empty_event = 0}, action_ = {
      _vptr.Action = 0xa97040 <vtable for Action+16>, continuation = 0x0, mutex = {m_ptr = 0x0}, cancelled = 0}, closed = 0,
    read = {enabled = 0, vio = {_cont = 0x6190000de880, nbytes = 9223372036854775807, ndone = 0, op = 1, buffer = {name = 0x0,
          mbuf = 0x611000a94100, entry = 0x0}, vc_server = 0x618000057080, mutex = {m_ptr = 0x60c000407d40}},
      ready_link = {<SLink<UnixNetVConnection>> = {next = 0x0}, prev = 0x0}, enable_link = {next = 0x0}, in_enabled_list = 0,
      triggered = 0}, write = {enabled = 0, vio = {_cont = 0x0, nbytes = 0, ndone = 0, op = 2, buffer = {name = 0x0,
          mbuf = 0x611000a2ea80, entry = 0x611000a2eac0}, vc_server = 0x618000057080, mutex = {m_ptr = 0x60c000407d40}},
      ready_link = {<SLink<UnixNetVConnection>> = {next = 0x0}, prev = 0x0}, enable_link = {next = 0x0}, in_enabled_list = 0,
      triggered = 1}, cop_link = {<SLink<UnixNetVConnection>> = {next = 0x0}, prev = 0x0},
    keep_alive_queue_link = {<SLink<UnixNetVConnection>> = {next = 0x0}, prev = 0x61800005fc80},
    active_queue_link = {<SLink<UnixNetVConnection>> = {next = 0x0}, prev = 0x0}, inactivity_timeout_in = 300000000000,
    active_timeout_in = 0, next_inactivity_timeout_at = 1472850939322871213, next_activity_timeout_at = 0, ep = {fd = 56,
      event_loop = 0x2ae82bdbc800, type = 2, data = {c = 0x618000057080, vc = 0x618000057080, dnscon = 0x618000057080, na =
    0x618000057080, uc = 0x618000057080}}, nh = 0x2ae82b131490, id = 603, server_addr = {sa = {sa_family = 2,
        sa_data = "\366J˅\252\237\000\000\000\000\000\000\000"}, sin = {sin_family = 2, sin_port = 19190, sin_addr = {
          s_addr = 2678752715}, sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 2, sin6_port = 19190,
        sin6_flowinfo = 2678752715, sin6_addr = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0,
              0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}}, {flags = 0, f = {got_local_addr = 0,
        shutdown = 0}}, con = {_vptr.Connection = 0xc15330 <vtable for Connection+16>, fd = 56, addr = {sa = {sa_family = 2,
          sa_data = "\366J˅\252\237\000\000\000\000\000\000\000"}, sin = {sin_family = 2, sin_port = 19190, sin_addr = {
            s_addr = 2678752715}, sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 2, sin6_port = 19190,
          sin6_flowinfo = 2678752715, sin6_addr = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0,
                0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}}, is_bound = false, is_connected = false,
      sock_type = 0}, recursion = 1, submit_time = 1472850638882911098, oob_ptr = 0x0, from_accept_thread = false,
    origin_trace = false, origin_trace_addr = 0x0, origin_trace_port = 0}, ssl = 0x6180000c7c80, sslHandshakeBeginTime = 0,
---Type <return> to continue, or q <return> to quit---
  sslLastWriteTime = 0, sslTotalBytesSent = 3819, hookOpRequested = TS_SSL_HOOK_OP_DEFAULT, sslHandShakeComplete = true,
  sslClientConnection = false, sslClientRenegotiationAbort = false, sslSessionCacheHit = false, handShakeBuffer = 0x0,
  handShakeHolder = 0x0, handShakeReader = 0x0, handShakeBioStored = 0, transparentPassThrough = false, curHook = 0x0,
  sslPreAcceptHookState = SSLNetVConnection::SSL_HOOKS_DONE, sslHandshakeHookState = SSLNetVConnection::HANDSHAKE_HOOKS_DONE,
  npnSet = 0x60c00000ee58, npnEndpoint = 0x0, sessionAcceptPtr = 0x0, sslTrace = false}
{code}


> Crash in SSLNetVConnection::do_io_close
> ---------------------------------------
>
>                 Key: TS-4814
>                 URL: https://issues.apache.org/jira/browse/TS-4814
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Network, SSL
>            Reporter: Leif Hedstrom
>            Priority: Critical
>             Fix For: 7.0.0
>
>
> Seeing this on latest master, running on docs:
> {code}
> #0  0x00002b411eeff1cd in write () at ../sysdeps/unix/syscall-template.S:81
> #1  0x00002b411be4860c in __interceptor_write (fd=66, ptr=0x6290000a0203, count=<optimized out>)
>     at ../../../../libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:453
> #2  0x00002b411deaa826 in fd_write () from /opt/openssl/lib/libcrypto.so.1.0.0
> #3  0x00002b411dea91ab in BIO_write () from /opt/openssl/lib/libcrypto.so.1.0.0
> #4  0x00002b411db50142 in ssl3_write_pending () from /opt/openssl/lib/libssl.so.1.0.0
> #5  0x00002b411db52a70 in ssl3_dispatch_alert () from /opt/openssl/lib/libssl.so.1.0.0
> #6  0x00002b411db4df92 in ssl3_shutdown () from /opt/openssl/lib/libssl.so.1.0.0
> #7  0x0000000000a003a2 in SSLNetVConnection::do_io_close (this=0x61800003b880, lerrno=-1) at SSLNetVConnection.cc:837
> #8  0x000000000066bb4a in Http1ClientSession::do_io_close (this=0x619000029980, alerrno=-1) at Http1ClientSession.cc:303
> #9  0x000000000066c7d3 in Http1ClientSession::state_keep_alive (this=0x619000029980, event=104, data=0x61800003b9a0)
>     at Http1ClientSession.cc:415
> #10 0x000000000053a621 in Continuation::handleEvent (this=0x619000029980, event=104, data=0x61800003b9a0)
>     at ../iocore/eventsystem/I_Continuation.h:153
> #11 0x0000000000a34eab in read_signal_and_update (event=104, vc=0x61800003b880) at UnixNetVConnection.cc:153
> #12 0x0000000000a35594 in read_signal_done (event=104, nh=0x2b4123c27490, vc=0x61800003b880) at UnixNetVConnection.cc:214
> #13 0x0000000000a3b72e in UnixNetVConnection::readSignalDone (this=0x61800003b880, event=104, nh=0x2b4123c27490)
>     at UnixNetVConnection.cc:1030
> #14 0x00000000009fe003 in SSLNetVConnection::net_read_io (this=0x61800003b880, nh=0x2b4123c27490, lthread=0x2b4123c23800)
>     at SSLNetVConnection.cc:620
> #15 0x0000000000a227e9 in NetHandler::mainNetEvent (this=0x2b4123c27490, event=5, e=0x60900000d040) at UnixNet.cc:527
> #16 0x000000000053a621 in Continuation::handleEvent (this=0x2b4123c27490, event=5, data=0x60900000d040)
>     at ../iocore/eventsystem/I_Continuation.h:153
> #17 0x0000000000a809fb in EThread::process_event (this=0x2b4123c23800, e=0x60900000d040, calling_code=5) at UnixEThread.cc:146
> #18 0x0000000000a8183b in EThread::execute (this=0x2b4123c23800) at UnixEThread.cc:273
> #19 0x0000000000a7f407 in spawn_thread_internal (a=0x604000018890) at Thread.cc:84
> #20 0x00002b411eef8dc5 in start_thread (arg=0x2b4124431700) at pthread_create.c:308
> #21 0x00002b411f920ced in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)