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 2011/04/17 19:57:05 UTC

[jira] [Created] (TS-742) Assert in HTTP tunnel

Assert in HTTP tunnel
---------------------

                 Key: TS-742
                 URL: https://issues.apache.org/jira/browse/TS-742
             Project: Traffic Server
          Issue Type: Bug
            Reporter: Leif Hedstrom
             Fix For: 2.1.8


While using ATS as a forward proxying, browing around a few sites (http://techcrunch.com/ and http://twitter.com), I got an assert like

{code}
(gdb) bt
#0  0x0000003f2de327f5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x0000003f2de33fd5 in abort () at abort.c:92
#2  0x00007ffff7ddc3ac in ink_die_die_die (retval=1) at ink_error.cc:43
#3  0x00007ffff7ddc47e in ink_fatal_va(int, const char *, typedef __va_list_tag __va_list_tag *) (return_code=1, 
    message_format=0x7ffff6c03450 "HttpTunnel.cc:1088: failed assert `p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection || (p->self_consumer && p->self_consumer->alive == true)`", ap=0x7ffff6c03350) at ink_error.cc:65
#4  0x00007ffff7ddc549 in ink_fatal (return_code=1, 
    message_format=0x7ffff6c03450 "HttpTunnel.cc:1088: failed assert `p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection || (p->self_consumer && p->self_consumer->alive == true)`") at ink_error.cc:73
#5  0x00007ffff7ddb366 in _ink_assert (
    a=0x691120 "p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection || (p->self_consumer && p->self_consumer->alive == true)", f=0x690ed2 "HttpTunnel.cc", l=1088) at ink_assert.cc:44
#6  0x0000000000564d4d in HttpTunnel::producer_handler (this=0x7fffede95a18, event=104, p=0x7fffede95c18) at HttpTunnel.cc:1088
#7  0x0000000000564966 in HttpTunnel::producer_run (this=0x7fffede95a18, p=0x7fffede95c18) at HttpTunnel.cc:926
#8  0x0000000000564185 in HttpTunnel::tunnel_run (this=0x7fffede95a18, p_arg=0x0) at HttpTunnel.cc:694
#9  0x000000000053548f in HttpSM::handle_api_return (this=0x7fffede93d50) at HttpSM.cc:1556
#10 0x000000000054194c in HttpSM::set_next_state (this=0x7fffede93d50) at HttpSM.cc:6510
#11 0x000000000054135a in HttpSM::call_transact_and_set_next_state (this=0x7fffede93d50, f=0) at HttpSM.cc:6332
#12 0x0000000000535384 in HttpSM::handle_api_return (this=0x7fffede93d50) at HttpSM.cc:1523
#13 0x0000000000545711 in HttpSM::do_api_callout (this=0x7fffede93d50) at HttpSM.cc:506
#14 0x0000000000535d71 in HttpSM::state_read_server_response_header (this=0x7fffede93d50, event=104, data=0x7fffdc00eb78)
    at HttpSM.cc:1833
#15 0x0000000000536fd1 in HttpSM::main_handler (this=0x7fffede93d50, event=104, data=0x7fffdc00eb78) at HttpSM.cc:2443
#16 0x00000000004d4ae0 in Continuation::handleEvent (this=0x7fffede93d50, event=104, data=0x7fffdc00eb78)
    at ../iocore/eventsystem/I_Continuation.h:146
#17 0x0000000000650571 in read_signal_and_update (event=104, vc=0x7fffdc00e9b0) at UnixNetVConnection.cc:136
#18 0x0000000000650723 in read_signal_done (event=104, nh=0x7ffff6d0b628, vc=0x7fffdc00e9b0) at UnixNetVConnection.cc:166
#19 0x0000000000650cc4 in read_from_net (nh=0x7ffff6d0b628, vc=0x7fffdc00e9b0, thread=0x7ffff6d0a010) at UnixNetVConnection.cc:289
#20 0x0000000000652aa9 in UnixNetVConnection::net_read_io (this=0x7fffdc00e9b0, nh=0x7ffff6d0b628, lthread=0x7ffff6d0a010)
    at UnixNetVConnection.cc:790
#21 0x000000000064d7ed in NetHandler::mainNetEvent (this=0x7ffff6d0b628, event=5, e=0xefa6a0) at UnixNet.cc:399
#22 0x00000000004d4ae0 in Continuation::handleEvent (this=0x7ffff6d0b628, event=5, data=0xefa6a0)
    at ../iocore/eventsystem/I_Continuation.h:146
#23 0x000000000066e8f8 in EThread::process_event (this=0x7ffff6d0a010, e=0xefa6a0, calling_code=5) at UnixEThread.cc:140
#24 0x000000000066eeb5 in EThread::execute (this=0x7ffff6d0a010) at UnixEThread.cc:262
#25 0x000000000066da68 in spawn_thread_internal (a=0xeed0f0) at Thread.cc:85
#26 0x0000003f2e6068e0 in start_thread (arg=0x7ffff6c08710) at pthread_create.c:297
#27 0x0000003f2dee0c9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#28 0x0000000000000000 in ?? ()
{code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (TS-742) Assert in HTTP tunnel

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13020838#comment-13020838 ] 

Leif Hedstrom commented on TS-742:
----------------------------------

The assert is

{code}
  ink_assert(p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection ||
             (p->self_consumer && p->self_consumer->alive == true));
{code}

where the following values are set

(gdb) print p->alive
$8 = false
(gdb) print event
$9 = 104
(gdb) print HTTP_TUNNEL_EVENT_PRECOMPLETE
$10 = 2302
(gdb) print sm->enable_redirection
$11 = false
(gdb) print p->self_consumer
$12 = (HttpTunnelConsumer *) 0x0





> Assert in HTTP tunnel
> ---------------------
>
>                 Key: TS-742
>                 URL: https://issues.apache.org/jira/browse/TS-742
>             Project: Traffic Server
>          Issue Type: Bug
>            Reporter: Leif Hedstrom
>             Fix For: 2.1.8
>
>
> While using ATS as a forward proxying, browing around a few sites (http://techcrunch.com/ and http://twitter.com), I got an assert like
> {code}
> (gdb) bt
> #0  0x0000003f2de327f5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1  0x0000003f2de33fd5 in abort () at abort.c:92
> #2  0x00007ffff7ddc3ac in ink_die_die_die (retval=1) at ink_error.cc:43
> #3  0x00007ffff7ddc47e in ink_fatal_va(int, const char *, typedef __va_list_tag __va_list_tag *) (return_code=1, 
>     message_format=0x7ffff6c03450 "HttpTunnel.cc:1088: failed assert `p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection || (p->self_consumer && p->self_consumer->alive == true)`", ap=0x7ffff6c03350) at ink_error.cc:65
> #4  0x00007ffff7ddc549 in ink_fatal (return_code=1, 
>     message_format=0x7ffff6c03450 "HttpTunnel.cc:1088: failed assert `p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection || (p->self_consumer && p->self_consumer->alive == true)`") at ink_error.cc:73
> #5  0x00007ffff7ddb366 in _ink_assert (
>     a=0x691120 "p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection || (p->self_consumer && p->self_consumer->alive == true)", f=0x690ed2 "HttpTunnel.cc", l=1088) at ink_assert.cc:44
> #6  0x0000000000564d4d in HttpTunnel::producer_handler (this=0x7fffede95a18, event=104, p=0x7fffede95c18) at HttpTunnel.cc:1088
> #7  0x0000000000564966 in HttpTunnel::producer_run (this=0x7fffede95a18, p=0x7fffede95c18) at HttpTunnel.cc:926
> #8  0x0000000000564185 in HttpTunnel::tunnel_run (this=0x7fffede95a18, p_arg=0x0) at HttpTunnel.cc:694
> #9  0x000000000053548f in HttpSM::handle_api_return (this=0x7fffede93d50) at HttpSM.cc:1556
> #10 0x000000000054194c in HttpSM::set_next_state (this=0x7fffede93d50) at HttpSM.cc:6510
> #11 0x000000000054135a in HttpSM::call_transact_and_set_next_state (this=0x7fffede93d50, f=0) at HttpSM.cc:6332
> #12 0x0000000000535384 in HttpSM::handle_api_return (this=0x7fffede93d50) at HttpSM.cc:1523
> #13 0x0000000000545711 in HttpSM::do_api_callout (this=0x7fffede93d50) at HttpSM.cc:506
> #14 0x0000000000535d71 in HttpSM::state_read_server_response_header (this=0x7fffede93d50, event=104, data=0x7fffdc00eb78)
>     at HttpSM.cc:1833
> #15 0x0000000000536fd1 in HttpSM::main_handler (this=0x7fffede93d50, event=104, data=0x7fffdc00eb78) at HttpSM.cc:2443
> #16 0x00000000004d4ae0 in Continuation::handleEvent (this=0x7fffede93d50, event=104, data=0x7fffdc00eb78)
>     at ../iocore/eventsystem/I_Continuation.h:146
> #17 0x0000000000650571 in read_signal_and_update (event=104, vc=0x7fffdc00e9b0) at UnixNetVConnection.cc:136
> #18 0x0000000000650723 in read_signal_done (event=104, nh=0x7ffff6d0b628, vc=0x7fffdc00e9b0) at UnixNetVConnection.cc:166
> #19 0x0000000000650cc4 in read_from_net (nh=0x7ffff6d0b628, vc=0x7fffdc00e9b0, thread=0x7ffff6d0a010) at UnixNetVConnection.cc:289
> #20 0x0000000000652aa9 in UnixNetVConnection::net_read_io (this=0x7fffdc00e9b0, nh=0x7ffff6d0b628, lthread=0x7ffff6d0a010)
>     at UnixNetVConnection.cc:790
> #21 0x000000000064d7ed in NetHandler::mainNetEvent (this=0x7ffff6d0b628, event=5, e=0xefa6a0) at UnixNet.cc:399
> #22 0x00000000004d4ae0 in Continuation::handleEvent (this=0x7ffff6d0b628, event=5, data=0xefa6a0)
>     at ../iocore/eventsystem/I_Continuation.h:146
> #23 0x000000000066e8f8 in EThread::process_event (this=0x7ffff6d0a010, e=0xefa6a0, calling_code=5) at UnixEThread.cc:140
> #24 0x000000000066eeb5 in EThread::execute (this=0x7ffff6d0a010) at UnixEThread.cc:262
> #25 0x000000000066da68 in spawn_thread_internal (a=0xeed0f0) at Thread.cc:85
> #26 0x0000003f2e6068e0 in start_thread (arg=0x7ffff6c08710) at pthread_create.c:297
> #27 0x0000003f2dee0c9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
> #28 0x0000000000000000 in ?? ()
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (TS-742) Assert in HTTP tunnel

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13020890#comment-13020890 ] 

Leif Hedstrom commented on TS-742:
----------------------------------

The event (104) is VC_EVENT_EOS.

> Assert in HTTP tunnel
> ---------------------
>
>                 Key: TS-742
>                 URL: https://issues.apache.org/jira/browse/TS-742
>             Project: Traffic Server
>          Issue Type: Bug
>            Reporter: Leif Hedstrom
>             Fix For: 2.1.8
>
>
> While using ATS as a forward proxying, browing around a few sites (http://techcrunch.com/ and http://twitter.com), I got an assert like
> {code}
> (gdb) bt
> #0  0x0000003f2de327f5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1  0x0000003f2de33fd5 in abort () at abort.c:92
> #2  0x00007ffff7ddc3ac in ink_die_die_die (retval=1) at ink_error.cc:43
> #3  0x00007ffff7ddc47e in ink_fatal_va(int, const char *, typedef __va_list_tag __va_list_tag *) (return_code=1, 
>     message_format=0x7ffff6c03450 "HttpTunnel.cc:1088: failed assert `p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection || (p->self_consumer && p->self_consumer->alive == true)`", ap=0x7ffff6c03350) at ink_error.cc:65
> #4  0x00007ffff7ddc549 in ink_fatal (return_code=1, 
>     message_format=0x7ffff6c03450 "HttpTunnel.cc:1088: failed assert `p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection || (p->self_consumer && p->self_consumer->alive == true)`") at ink_error.cc:73
> #5  0x00007ffff7ddb366 in _ink_assert (
>     a=0x691120 "p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection || (p->self_consumer && p->self_consumer->alive == true)", f=0x690ed2 "HttpTunnel.cc", l=1088) at ink_assert.cc:44
> #6  0x0000000000564d4d in HttpTunnel::producer_handler (this=0x7fffede95a18, event=104, p=0x7fffede95c18) at HttpTunnel.cc:1088
> #7  0x0000000000564966 in HttpTunnel::producer_run (this=0x7fffede95a18, p=0x7fffede95c18) at HttpTunnel.cc:926
> #8  0x0000000000564185 in HttpTunnel::tunnel_run (this=0x7fffede95a18, p_arg=0x0) at HttpTunnel.cc:694
> #9  0x000000000053548f in HttpSM::handle_api_return (this=0x7fffede93d50) at HttpSM.cc:1556
> #10 0x000000000054194c in HttpSM::set_next_state (this=0x7fffede93d50) at HttpSM.cc:6510
> #11 0x000000000054135a in HttpSM::call_transact_and_set_next_state (this=0x7fffede93d50, f=0) at HttpSM.cc:6332
> #12 0x0000000000535384 in HttpSM::handle_api_return (this=0x7fffede93d50) at HttpSM.cc:1523
> #13 0x0000000000545711 in HttpSM::do_api_callout (this=0x7fffede93d50) at HttpSM.cc:506
> #14 0x0000000000535d71 in HttpSM::state_read_server_response_header (this=0x7fffede93d50, event=104, data=0x7fffdc00eb78)
>     at HttpSM.cc:1833
> #15 0x0000000000536fd1 in HttpSM::main_handler (this=0x7fffede93d50, event=104, data=0x7fffdc00eb78) at HttpSM.cc:2443
> #16 0x00000000004d4ae0 in Continuation::handleEvent (this=0x7fffede93d50, event=104, data=0x7fffdc00eb78)
>     at ../iocore/eventsystem/I_Continuation.h:146
> #17 0x0000000000650571 in read_signal_and_update (event=104, vc=0x7fffdc00e9b0) at UnixNetVConnection.cc:136
> #18 0x0000000000650723 in read_signal_done (event=104, nh=0x7ffff6d0b628, vc=0x7fffdc00e9b0) at UnixNetVConnection.cc:166
> #19 0x0000000000650cc4 in read_from_net (nh=0x7ffff6d0b628, vc=0x7fffdc00e9b0, thread=0x7ffff6d0a010) at UnixNetVConnection.cc:289
> #20 0x0000000000652aa9 in UnixNetVConnection::net_read_io (this=0x7fffdc00e9b0, nh=0x7ffff6d0b628, lthread=0x7ffff6d0a010)
>     at UnixNetVConnection.cc:790
> #21 0x000000000064d7ed in NetHandler::mainNetEvent (this=0x7ffff6d0b628, event=5, e=0xefa6a0) at UnixNet.cc:399
> #22 0x00000000004d4ae0 in Continuation::handleEvent (this=0x7ffff6d0b628, event=5, data=0xefa6a0)
>     at ../iocore/eventsystem/I_Continuation.h:146
> #23 0x000000000066e8f8 in EThread::process_event (this=0x7ffff6d0a010, e=0xefa6a0, calling_code=5) at UnixEThread.cc:140
> #24 0x000000000066eeb5 in EThread::execute (this=0x7ffff6d0a010) at UnixEThread.cc:262
> #25 0x000000000066da68 in spawn_thread_internal (a=0xeed0f0) at Thread.cc:85
> #26 0x0000003f2e6068e0 in start_thread (arg=0x7ffff6c08710) at pthread_create.c:297
> #27 0x0000003f2dee0c9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
> #28 0x0000000000000000 in ?? ()
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (TS-742) Assert in HTTP tunnel

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom resolved TS-742.
------------------------------

    Resolution: Fixed

> Assert in HTTP tunnel
> ---------------------
>
>                 Key: TS-742
>                 URL: https://issues.apache.org/jira/browse/TS-742
>             Project: Traffic Server
>          Issue Type: Bug
>            Reporter: Leif Hedstrom
>             Fix For: 2.1.8
>
>
> While using ATS as a forward proxying, browing around a few sites (http://techcrunch.com/ and http://twitter.com), I got an assert like
> {code}
> (gdb) bt
> #0  0x0000003f2de327f5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1  0x0000003f2de33fd5 in abort () at abort.c:92
> #2  0x00007ffff7ddc3ac in ink_die_die_die (retval=1) at ink_error.cc:43
> #3  0x00007ffff7ddc47e in ink_fatal_va(int, const char *, typedef __va_list_tag __va_list_tag *) (return_code=1, 
>     message_format=0x7ffff6c03450 "HttpTunnel.cc:1088: failed assert `p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection || (p->self_consumer && p->self_consumer->alive == true)`", ap=0x7ffff6c03350) at ink_error.cc:65
> #4  0x00007ffff7ddc549 in ink_fatal (return_code=1, 
>     message_format=0x7ffff6c03450 "HttpTunnel.cc:1088: failed assert `p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection || (p->self_consumer && p->self_consumer->alive == true)`") at ink_error.cc:73
> #5  0x00007ffff7ddb366 in _ink_assert (
>     a=0x691120 "p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection || (p->self_consumer && p->self_consumer->alive == true)", f=0x690ed2 "HttpTunnel.cc", l=1088) at ink_assert.cc:44
> #6  0x0000000000564d4d in HttpTunnel::producer_handler (this=0x7fffede95a18, event=104, p=0x7fffede95c18) at HttpTunnel.cc:1088
> #7  0x0000000000564966 in HttpTunnel::producer_run (this=0x7fffede95a18, p=0x7fffede95c18) at HttpTunnel.cc:926
> #8  0x0000000000564185 in HttpTunnel::tunnel_run (this=0x7fffede95a18, p_arg=0x0) at HttpTunnel.cc:694
> #9  0x000000000053548f in HttpSM::handle_api_return (this=0x7fffede93d50) at HttpSM.cc:1556
> #10 0x000000000054194c in HttpSM::set_next_state (this=0x7fffede93d50) at HttpSM.cc:6510
> #11 0x000000000054135a in HttpSM::call_transact_and_set_next_state (this=0x7fffede93d50, f=0) at HttpSM.cc:6332
> #12 0x0000000000535384 in HttpSM::handle_api_return (this=0x7fffede93d50) at HttpSM.cc:1523
> #13 0x0000000000545711 in HttpSM::do_api_callout (this=0x7fffede93d50) at HttpSM.cc:506
> #14 0x0000000000535d71 in HttpSM::state_read_server_response_header (this=0x7fffede93d50, event=104, data=0x7fffdc00eb78)
>     at HttpSM.cc:1833
> #15 0x0000000000536fd1 in HttpSM::main_handler (this=0x7fffede93d50, event=104, data=0x7fffdc00eb78) at HttpSM.cc:2443
> #16 0x00000000004d4ae0 in Continuation::handleEvent (this=0x7fffede93d50, event=104, data=0x7fffdc00eb78)
>     at ../iocore/eventsystem/I_Continuation.h:146
> #17 0x0000000000650571 in read_signal_and_update (event=104, vc=0x7fffdc00e9b0) at UnixNetVConnection.cc:136
> #18 0x0000000000650723 in read_signal_done (event=104, nh=0x7ffff6d0b628, vc=0x7fffdc00e9b0) at UnixNetVConnection.cc:166
> #19 0x0000000000650cc4 in read_from_net (nh=0x7ffff6d0b628, vc=0x7fffdc00e9b0, thread=0x7ffff6d0a010) at UnixNetVConnection.cc:289
> #20 0x0000000000652aa9 in UnixNetVConnection::net_read_io (this=0x7fffdc00e9b0, nh=0x7ffff6d0b628, lthread=0x7ffff6d0a010)
>     at UnixNetVConnection.cc:790
> #21 0x000000000064d7ed in NetHandler::mainNetEvent (this=0x7ffff6d0b628, event=5, e=0xefa6a0) at UnixNet.cc:399
> #22 0x00000000004d4ae0 in Continuation::handleEvent (this=0x7ffff6d0b628, event=5, data=0xefa6a0)
>     at ../iocore/eventsystem/I_Continuation.h:146
> #23 0x000000000066e8f8 in EThread::process_event (this=0x7ffff6d0a010, e=0xefa6a0, calling_code=5) at UnixEThread.cc:140
> #24 0x000000000066eeb5 in EThread::execute (this=0x7ffff6d0a010) at UnixEThread.cc:262
> #25 0x000000000066da68 in spawn_thread_internal (a=0xeed0f0) at Thread.cc:85
> #26 0x0000003f2e6068e0 in start_thread (arg=0x7ffff6c08710) at pthread_create.c:297
> #27 0x0000003f2dee0c9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
> #28 0x0000000000000000 in ?? ()
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (TS-742) Assert in HTTP tunnel

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13020893#comment-13020893 ] 

Leif Hedstrom commented on TS-742:
----------------------------------

I'm positive the "problem" occurs because of this:

{code}
  // Handle chunking/dechunking/chunked-passthrough if necessary.
  if (p->do_chunking) {
    event = producer_handler_dechunked(event, p);

    // If we were in PRECOMPLETE when this function was called
    // and we are doing chuncking, then we just wrote the last
    // chunk in the the function call above.  We are done with the
    // tunnel.
    if (event == HTTP_TUNNEL_EVENT_PRECOMPLETE) {
      event = VC_EVENT_EOS;
    }
  } else if (p->do_dechunking || p->do_chunked_passthru) {
    event = producer_handler_chunked(event, p);
  }
{code}


I.e. we move from event HTTP_TUNNEL_EVENT_PRECOMPLETE to VC_EVENT_EOS, and somehow I think that happens when we're in an unhappy state (or, the assert is just plain wrong).

> Assert in HTTP tunnel
> ---------------------
>
>                 Key: TS-742
>                 URL: https://issues.apache.org/jira/browse/TS-742
>             Project: Traffic Server
>          Issue Type: Bug
>            Reporter: Leif Hedstrom
>             Fix For: 2.1.8
>
>
> While using ATS as a forward proxying, browing around a few sites (http://techcrunch.com/ and http://twitter.com), I got an assert like
> {code}
> (gdb) bt
> #0  0x0000003f2de327f5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1  0x0000003f2de33fd5 in abort () at abort.c:92
> #2  0x00007ffff7ddc3ac in ink_die_die_die (retval=1) at ink_error.cc:43
> #3  0x00007ffff7ddc47e in ink_fatal_va(int, const char *, typedef __va_list_tag __va_list_tag *) (return_code=1, 
>     message_format=0x7ffff6c03450 "HttpTunnel.cc:1088: failed assert `p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection || (p->self_consumer && p->self_consumer->alive == true)`", ap=0x7ffff6c03350) at ink_error.cc:65
> #4  0x00007ffff7ddc549 in ink_fatal (return_code=1, 
>     message_format=0x7ffff6c03450 "HttpTunnel.cc:1088: failed assert `p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection || (p->self_consumer && p->self_consumer->alive == true)`") at ink_error.cc:73
> #5  0x00007ffff7ddb366 in _ink_assert (
>     a=0x691120 "p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection || (p->self_consumer && p->self_consumer->alive == true)", f=0x690ed2 "HttpTunnel.cc", l=1088) at ink_assert.cc:44
> #6  0x0000000000564d4d in HttpTunnel::producer_handler (this=0x7fffede95a18, event=104, p=0x7fffede95c18) at HttpTunnel.cc:1088
> #7  0x0000000000564966 in HttpTunnel::producer_run (this=0x7fffede95a18, p=0x7fffede95c18) at HttpTunnel.cc:926
> #8  0x0000000000564185 in HttpTunnel::tunnel_run (this=0x7fffede95a18, p_arg=0x0) at HttpTunnel.cc:694
> #9  0x000000000053548f in HttpSM::handle_api_return (this=0x7fffede93d50) at HttpSM.cc:1556
> #10 0x000000000054194c in HttpSM::set_next_state (this=0x7fffede93d50) at HttpSM.cc:6510
> #11 0x000000000054135a in HttpSM::call_transact_and_set_next_state (this=0x7fffede93d50, f=0) at HttpSM.cc:6332
> #12 0x0000000000535384 in HttpSM::handle_api_return (this=0x7fffede93d50) at HttpSM.cc:1523
> #13 0x0000000000545711 in HttpSM::do_api_callout (this=0x7fffede93d50) at HttpSM.cc:506
> #14 0x0000000000535d71 in HttpSM::state_read_server_response_header (this=0x7fffede93d50, event=104, data=0x7fffdc00eb78)
>     at HttpSM.cc:1833
> #15 0x0000000000536fd1 in HttpSM::main_handler (this=0x7fffede93d50, event=104, data=0x7fffdc00eb78) at HttpSM.cc:2443
> #16 0x00000000004d4ae0 in Continuation::handleEvent (this=0x7fffede93d50, event=104, data=0x7fffdc00eb78)
>     at ../iocore/eventsystem/I_Continuation.h:146
> #17 0x0000000000650571 in read_signal_and_update (event=104, vc=0x7fffdc00e9b0) at UnixNetVConnection.cc:136
> #18 0x0000000000650723 in read_signal_done (event=104, nh=0x7ffff6d0b628, vc=0x7fffdc00e9b0) at UnixNetVConnection.cc:166
> #19 0x0000000000650cc4 in read_from_net (nh=0x7ffff6d0b628, vc=0x7fffdc00e9b0, thread=0x7ffff6d0a010) at UnixNetVConnection.cc:289
> #20 0x0000000000652aa9 in UnixNetVConnection::net_read_io (this=0x7fffdc00e9b0, nh=0x7ffff6d0b628, lthread=0x7ffff6d0a010)
>     at UnixNetVConnection.cc:790
> #21 0x000000000064d7ed in NetHandler::mainNetEvent (this=0x7ffff6d0b628, event=5, e=0xefa6a0) at UnixNet.cc:399
> #22 0x00000000004d4ae0 in Continuation::handleEvent (this=0x7ffff6d0b628, event=5, data=0xefa6a0)
>     at ../iocore/eventsystem/I_Continuation.h:146
> #23 0x000000000066e8f8 in EThread::process_event (this=0x7ffff6d0a010, e=0xefa6a0, calling_code=5) at UnixEThread.cc:140
> #24 0x000000000066eeb5 in EThread::execute (this=0x7ffff6d0a010) at UnixEThread.cc:262
> #25 0x000000000066da68 in spawn_thread_internal (a=0xeed0f0) at Thread.cc:85
> #26 0x0000003f2e6068e0 in start_thread (arg=0x7ffff6c08710) at pthread_create.c:297
> #27 0x0000003f2dee0c9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
> #28 0x0000000000000000 in ?? ()
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (TS-742) Assert in HTTP tunnel

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13020891#comment-13020891 ] 

Leif Hedstrom commented on TS-742:
----------------------------------

Also, I should point out that this obviously only triggers in a debug build (since it's an assert). In a release build, it seems to function without problems (but, I obviously don't know for sure if there are other issues that are unseen).

> Assert in HTTP tunnel
> ---------------------
>
>                 Key: TS-742
>                 URL: https://issues.apache.org/jira/browse/TS-742
>             Project: Traffic Server
>          Issue Type: Bug
>            Reporter: Leif Hedstrom
>             Fix For: 2.1.8
>
>
> While using ATS as a forward proxying, browing around a few sites (http://techcrunch.com/ and http://twitter.com), I got an assert like
> {code}
> (gdb) bt
> #0  0x0000003f2de327f5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #1  0x0000003f2de33fd5 in abort () at abort.c:92
> #2  0x00007ffff7ddc3ac in ink_die_die_die (retval=1) at ink_error.cc:43
> #3  0x00007ffff7ddc47e in ink_fatal_va(int, const char *, typedef __va_list_tag __va_list_tag *) (return_code=1, 
>     message_format=0x7ffff6c03450 "HttpTunnel.cc:1088: failed assert `p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection || (p->self_consumer && p->self_consumer->alive == true)`", ap=0x7ffff6c03350) at ink_error.cc:65
> #4  0x00007ffff7ddc549 in ink_fatal (return_code=1, 
>     message_format=0x7ffff6c03450 "HttpTunnel.cc:1088: failed assert `p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection || (p->self_consumer && p->self_consumer->alive == true)`") at ink_error.cc:73
> #5  0x00007ffff7ddb366 in _ink_assert (
>     a=0x691120 "p->alive == true || event == HTTP_TUNNEL_EVENT_PRECOMPLETE || sm->enable_redirection || (p->self_consumer && p->self_consumer->alive == true)", f=0x690ed2 "HttpTunnel.cc", l=1088) at ink_assert.cc:44
> #6  0x0000000000564d4d in HttpTunnel::producer_handler (this=0x7fffede95a18, event=104, p=0x7fffede95c18) at HttpTunnel.cc:1088
> #7  0x0000000000564966 in HttpTunnel::producer_run (this=0x7fffede95a18, p=0x7fffede95c18) at HttpTunnel.cc:926
> #8  0x0000000000564185 in HttpTunnel::tunnel_run (this=0x7fffede95a18, p_arg=0x0) at HttpTunnel.cc:694
> #9  0x000000000053548f in HttpSM::handle_api_return (this=0x7fffede93d50) at HttpSM.cc:1556
> #10 0x000000000054194c in HttpSM::set_next_state (this=0x7fffede93d50) at HttpSM.cc:6510
> #11 0x000000000054135a in HttpSM::call_transact_and_set_next_state (this=0x7fffede93d50, f=0) at HttpSM.cc:6332
> #12 0x0000000000535384 in HttpSM::handle_api_return (this=0x7fffede93d50) at HttpSM.cc:1523
> #13 0x0000000000545711 in HttpSM::do_api_callout (this=0x7fffede93d50) at HttpSM.cc:506
> #14 0x0000000000535d71 in HttpSM::state_read_server_response_header (this=0x7fffede93d50, event=104, data=0x7fffdc00eb78)
>     at HttpSM.cc:1833
> #15 0x0000000000536fd1 in HttpSM::main_handler (this=0x7fffede93d50, event=104, data=0x7fffdc00eb78) at HttpSM.cc:2443
> #16 0x00000000004d4ae0 in Continuation::handleEvent (this=0x7fffede93d50, event=104, data=0x7fffdc00eb78)
>     at ../iocore/eventsystem/I_Continuation.h:146
> #17 0x0000000000650571 in read_signal_and_update (event=104, vc=0x7fffdc00e9b0) at UnixNetVConnection.cc:136
> #18 0x0000000000650723 in read_signal_done (event=104, nh=0x7ffff6d0b628, vc=0x7fffdc00e9b0) at UnixNetVConnection.cc:166
> #19 0x0000000000650cc4 in read_from_net (nh=0x7ffff6d0b628, vc=0x7fffdc00e9b0, thread=0x7ffff6d0a010) at UnixNetVConnection.cc:289
> #20 0x0000000000652aa9 in UnixNetVConnection::net_read_io (this=0x7fffdc00e9b0, nh=0x7ffff6d0b628, lthread=0x7ffff6d0a010)
>     at UnixNetVConnection.cc:790
> #21 0x000000000064d7ed in NetHandler::mainNetEvent (this=0x7ffff6d0b628, event=5, e=0xefa6a0) at UnixNet.cc:399
> #22 0x00000000004d4ae0 in Continuation::handleEvent (this=0x7ffff6d0b628, event=5, data=0xefa6a0)
>     at ../iocore/eventsystem/I_Continuation.h:146
> #23 0x000000000066e8f8 in EThread::process_event (this=0x7ffff6d0a010, e=0xefa6a0, calling_code=5) at UnixEThread.cc:140
> #24 0x000000000066eeb5 in EThread::execute (this=0x7ffff6d0a010) at UnixEThread.cc:262
> #25 0x000000000066da68 in spawn_thread_internal (a=0xeed0f0) at Thread.cc:85
> #26 0x0000003f2e6068e0 in start_thread (arg=0x7ffff6c08710) at pthread_create.c:297
> #27 0x0000003f2dee0c9d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
> #28 0x0000000000000000 in ?? ()
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira