Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-5046

SEGV HttpSM::tunnel_handler_server(int event, HttpTunnelProducer *p)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 6.2.1
    • HTTP, Network
    • None

    Description

      one of servers running 6.2.x (729c60b) got a SIGSEGV

      (gdb) thread 42
      [Switching to thread 42 (Thread 0x2aaab460d700 (LWP 4145))]
      #0  0x00002aaaad6bd37d in __libc_waitpid (pid=<optimized out>, stat_loc=<optimized out>, options=<optimized out>) at ../sysdeps/unix/sysv/linux/waitpid.c:41
      41	../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.
      (gdb) bt
      #0  0x00002aaaad6bd37d in __libc_waitpid (pid=<optimized out>, stat_loc=<optimized out>, options=<optimized out>) at ../sysdeps/unix/sysv/linux/waitpid.c:41
      #1  0x00002aaaaab81ec7 in crash_logger_invoke (signo=11, info=0x2aaab460bcf0, ctx=0x2aaab460bbc0) at Crash.cc:164
      #2  <signal handler called>
      #3  0x00002aaaaac83358 in HttpSM::tunnel_handler_server (this=0x2ab9b4efac00, event=<optimized out>, p=<optimized out>) at HttpSM.cc:3108
      #4  0x00002aaaaace1d72 in HttpTunnel::producer_handler (this=this@entry=0x2ab9b4efbf28, event=102, event@entry=100, p=p@entry=0x2ab9b4efc128) at HttpTunnel.cc:1240
      #5  0x00002aaaaace3343 in HttpTunnel::producer_run (this=this@entry=0x2ab9b4efbf28, p=p@entry=0x2ab9b4efc128) at HttpTunnel.cc:1020
      #6  0x00002aaaaace3d71 in HttpTunnel::tunnel_run (this=0x2ab9b4efbf28, p_arg=0x2ab9b4efc128) at HttpTunnel.cc:787
      #7  0x00002aaaaac96f8b in HttpSM::state_api_callout (this=this@entry=0x2ab9b4efac00, event=event@entry=60000, data=data@entry=0x0) at HttpSM.cc:1534
      #8  0x00002aaaaac9e0d3 in HttpSM::state_api_callback (this=this@entry=0x2ab9b4efac00, event=event@entry=60000, data=data@entry=0x0) at HttpSM.cc:1331
      #9  0x00002aaaaabad6ad in TSHttpTxnReenable (txnp=0x2ab9b4efac00, event=TS_EVENT_HTTP_CONTINUE) at InkAPI.cc:5652
      #10 0x00002aaabe845c05 in XInjectResponseHeaders (event=<optimized out>, edata=0x2ab9b4efac00) at xdebug.cc:295
      #11 0x00002aaaaab98c04 in INKContInternal::handle_event (this=0x2aaab6bf9dc0, event=60007, edata=0x2ab9b4efac00) at InkAPI.cc:1006
      #12 0x00002aaaaac96d10 in HttpSM::state_api_callout (this=this@entry=0x2ab9b4efac00, event=event@entry=60000, data=data@entry=0x0) at HttpSM.cc:1452
      #13 0x00002aaaaac9e0d3 in HttpSM::state_api_callback (this=this@entry=0x2ab9b4efac00, event=event@entry=60000, data=data@entry=0x0) at HttpSM.cc:1331
      #14 0x00002aaaaabad6ad in TSHttpTxnReenable (txnp=0x2ab9b4efac00, event=TS_EVENT_HTTP_CONTINUE) at InkAPI.cc:5652
      #15 0x00002aaabe01ea45 in cont_rewrite_headers (contp=0x2aaab6bf9ee0, event=<optimized out>, edata=0x2ab9b4efac00) at header_rewrite.cc:307
      #16 0x00002aaaaab98c04 in INKContInternal::handle_event (this=0x2aaab6bf9ee0, event=60007, edata=0x2ab9b4efac00) at InkAPI.cc:1006
      #17 0x00002aaaaac96d10 in HttpSM::state_api_callout (this=0x2ab9b4efac00, event=<optimized out>, data=<optimized out>) at HttpSM.cc:1452
      #18 0x00002aaaaac9c910 in HttpSM::set_next_state (this=0x2ab9b4efac00) at HttpSM.cc:7296
      #19 0x00002aaaaac96f8b in HttpSM::state_api_callout (this=this@entry=0x2ab9b4efac00, event=event@entry=60000, data=data@entry=0x0) at HttpSM.cc:1534
      #20 0x00002aaaaac9e0d3 in HttpSM::state_api_callback (this=this@entry=0x2ab9b4efac00, event=event@entry=60000, data=data@entry=0x0) at HttpSM.cc:1331
      #21 0x00002aaaaabad6ad in TSHttpTxnReenable (txnp=0x2ab9b4efac00, event=TS_EVENT_HTTP_CONTINUE) at InkAPI.cc:5652
      #22 0x00002aaabf4038d5 in cont_handle_response (contp=<optimized out>, event=<optimized out>, edata=0x2ab9b4efac00) at background_fetch.cc:544
      #23 0x00002aaaaab98c04 in INKContInternal::handle_event (this=0x2aaab6bf9d00, event=60006, edata=0x2ab9b4efac00) at InkAPI.cc:1006
      #24 0x00002aaaaac96d10 in HttpSM::state_api_callout (this=this@entry=0x2ab9b4efac00, event=event@entry=60000, data=data@entry=0x0) at HttpSM.cc:1452
      #25 0x00002aaaaac9e0d3 in HttpSM::state_api_callback (this=this@entry=0x2ab9b4efac00, event=event@entry=60000, data=data@entry=0x0) at HttpSM.cc:1331
      #26 0x00002aaaaabad6ad in TSHttpTxnReenable (txnp=0x2ab9b4efac00, event=TS_EVENT_HTTP_CONTINUE) at InkAPI.cc:5652
      #27 0x00002aaabe01ea45 in cont_rewrite_headers (contp=0x2aaab6bf9ee0, event=<optimized out>, edata=0x2ab9b4efac00) at header_rewrite.cc:307
      #28 0x00002aaaaab98c04 in INKContInternal::handle_event (this=0x2aaab6bf9ee0, event=60006, edata=0x2ab9b4efac00) at InkAPI.cc:1006
      #29 0x00002aaaaac96d10 in HttpSM::state_api_callout (this=0x2ab9b4efac00, event=<optimized out>, data=<optimized out>) at HttpSM.cc:1452
      #30 0x00002aaaaac97b6f in HttpSM::state_read_server_response_header (this=0x2ab9b4efac00, event=100, data=0x2aaaf59b3a98) at HttpSM.cc:1953
      #31 0x00002aaaaac9e2bd in HttpSM::main_handler (this=0x2ab9b4efac00, event=100, data=0x2aaaf59b3a98) at HttpSM.cc:2658
      #32 0x00002aaaaae6956b in Continuation::handleEvent (data=0x2aaaf59b3a98, event=100, this=<optimized out>) at ../../iocore/eventsystem/I_Continuation.h:153
      #33 read_signal_and_update (vc=0x2aaaf59b3980, vc@entry=0x1, event=event@entry=100) at UnixNetVConnection.cc:148
      #34 UnixNetVConnection::readSignalAndUpdate (this=this@entry=0x2aaaf59b3980, event=event@entry=100) at UnixNetVConnection.cc:1030
      #35 0x00002aaaaae48cb3 in SSLNetVConnection::net_read_io (this=0x2aaaf59b3980, nh=0x2aaab3009cc0, lthread=0x2aaab3006000) at SSLNetVConnection.cc:598
      #36 0x00002aaaaae56bec in NetHandler::mainNetEvent (this=0x2aaab3009cc0, event=<optimized out>, e=<optimized out>) at UnixNet.cc:513
      #37 0x00002aaaaae8e956 in Continuation::handleEvent (data=0x2aaab0bf2040, event=5, this=<optimized out>) at I_Continuation.h:153
      #38 EThread::process_event (calling_code=5, e=0x2aaab0bf2040, this=0x2aaab3006000) at UnixEThread.cc:148
      #39 EThread::execute (this=0x2aaab3006000) at UnixEThread.cc:275
      #40 0x00002aaaaae8d756 in spawn_thread_internal (a=0x2aaab0b211c0) at Thread.cc:86
      #41 0x00002aaaad6b5aa1 in start_thread (arg=0x2aaab460d700) at pthread_create.c:301
      #42 0x00002aaaae8be93d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
      

      it's from HttpSMcc:3108

      3081   if (close_connection) {
      3082     p->vc->do_io_close();
      3083     server_session = NULL; // Because p->vc == server_session
      3084     p->read_vio    = NULL;
      3085     /* TS-1424: if we're outbound transparent and using the client
      3086        source port for the outbound connection we must effectively
      3087        propagate server closes back to the client. Part of that is
      3088        disabling KeepAlive if the server closes.
      3089     */
      3090     if (ua_session && ua_session->is_outbound_transparent() && t_state.http_config_param->use_client_source_port) {
      3091       t_state.client_info.keep_alive = HTTP_NO_KEEPALIVE;
      3092     }
      3093   } else {
      3094     server_session->attach_hostname(t_state.current.server->name);
      3095     server_session->server_trans_stat--;
      3096     HTTP_DECREMENT_DYN_STAT(http_current_server_transactions_stat);
      3097
      3098     // If the option to attach the server session to the client session is set
      3099     // and if the client is still around and the client is keep-alive, attach the
      3100     // server session to so the next ka request can use it.  Server sessions will
      3101     // be placed into the shared pool if the next incoming request is for a different
      3102     // origin server
      3103     if (t_state.txn_conf->attach_server_session_to_client == 1 && ua_session && t_state.client_info.keep_alive == HTTP_KEEPALIVE) {
      3104       Debug("http", "attaching server session to the client");
      3105       ua_session->attach_server_session(server_session);
      3106     } else {
      3107       // Release the session back into the shared session pool
      3108       server_session->get_netvc()->set_inactivity_timeout(HRTIME_SECONDS(t_state.txn_conf->keep_alive_no_activity_timeout_out));
      3109       server_session->release();
      3110     }
      

      print vc_table result:

      (gdb) p vc_table
      $6 = {static vc_table_max_entries = 4, vc_table = {
      {
        vc = 0x2ae5aafe18a0,
        read_buffer = 0x0,
        write_buffer = 0x0,
        read_vio = 0x2ae5aafe1be0,
        write_vio = 0x0,
        vc_handler = (int (HttpSM::*)(HttpSM * const, int, void *)) 0x2aaaaac86640 <HttpSM::state_watch_for_client_abort(int, void*)>,
        vc_type = HTTP_UA_VC,
        eos = true,
        in_tunnel = true
      }, {
        vc = 0x2ae6503f7e80,
        read_buffer = 0x0,
        write_buffer = 0x0,
        read_vio = 0x2aaaf59b3a98, 
        write_vio = 0x2aaaf59b3b00,
        vc_handler = (int (HttpSM::*)(HttpSM * const, int, void *)) 0x2aaaaac97750 <HttpSM::state_read_server_response_header(int, void*)>,
        vc_type = HTTP_SERVER_VC,
        eos = false,
        in_tunnel = true
      }, {
        vc = 0x0,
        read_buffer = 0x0,
        write_buffer = 0x0,
        read_vio = 0x0,
        write_vio = 0x0,
        vc_handler = NULL,
        vc_type = HTTP_UNKNOWN,
        eos = false,
        in_tunnel = false
      }, {
        vc = 0x0,
        read_buffer = 0x0,
        write_buffer = 0x0,
        read_vio = 0x0,
        write_vio = 0x0,
        vc_handler = NULL,
        vc_type = HTTP_UNKNOWN,
        eos = false,
        in_tunnel = false
      }}}
      

      Attachments

        Issue Links

          Activity

            People

              msekimura Masa Sekimura
              msekimura Masa Sekimura
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m