{"action":"closed","issue":{"url":"https://api.github.com/repos/apache/trafficserver/issues/3265","repository_url":"https://api.github.com/repos/apache/trafficserver","labels_url":"https://api.github.com/repos/apache/trafficserver/issues/3265/labels{/name}","comments_url":"https://api.github.com/repos/apache/trafficserver/issues/3265/comments","events_url":"https://api.github.com/repos/apache/trafficserver/issues/3265/events","html_url":"https://github.com/apache/trafficserver/issues/3265","id":304408086,"number":3265,"title":"Crash/assert on collision between connection reattempt and returning error","user":{"login":"shinrich","id":334488,"avatar_url":"https://avatars0.githubusercontent.com/u/334488?v=4","gravatar_id":"","url":"https://api.github.com/users/shinrich","html_url":"https://github.com/shinrich","followers_url":"https://api.github.com/users/shinrich/followers","following_url":"https://api.github.com/users/shinrich/following{/other_user}","gists_url":"https://api.github.com/users/shinrich/gists{/gist_id}","starred_url":"https://api.github.com/users/shinrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shinrich/subscriptions","organizations_url":"https://api.github.com/users/shinrich/orgs","repos_url":"https://api.github.com/users/shinrich/repos","events_url":"https://api.github.com/users/shinrich/events{/privacy}","received_events_url":"https://api.github.com/users/shinrich/received_events","type":"User","site_admin":false},"labels":[{"id":551674414,"url":"https://api.github.com/repos/apache/trafficserver/labels/Crash","name":"Crash","color":"bfdadc","default":false},{"id":374862708,"url":"https://api.github.com/repos/apache/trafficserver/labels/HTTP","name":"HTTP","color":"1d76db","default":false}],"state":"closed","locked":false,"assignee":{"login":"shinrich","id":334488,"avatar_url":"https://avatars0.githubusercontent.com/u/334488?v=4","gravatar_id":"","url":"https://api.github.com/users/shinrich","html_url":"https://github.com/shinrich","followers_url":"https://api.github.com/users/shinrich/followers","following_url":"https://api.github.com/users/shinrich/following{/other_user}","gists_url":"https://api.github.com/users/shinrich/gists{/gist_id}","starred_url":"https://api.github.com/users/shinrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shinrich/subscriptions","organizations_url":"https://api.github.com/users/shinrich/orgs","repos_url":"https://api.github.com/users/shinrich/repos","events_url":"https://api.github.com/users/shinrich/events{/privacy}","received_events_url":"https://api.github.com/users/shinrich/received_events","type":"User","site_admin":false},"assignees":[{"login":"shinrich","id":334488,"avatar_url":"https://avatars0.githubusercontent.com/u/334488?v=4","gravatar_id":"","url":"https://api.github.com/users/shinrich","html_url":"https://github.com/shinrich","followers_url":"https://api.github.com/users/shinrich/followers","following_url":"https://api.github.com/users/shinrich/following{/other_user}","gists_url":"https://api.github.com/users/shinrich/gists{/gist_id}","starred_url":"https://api.github.com/users/shinrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shinrich/subscriptions","organizations_url":"https://api.github.com/users/shinrich/orgs","repos_url":"https://api.github.com/users/shinrich/repos","events_url":"https://api.github.com/users/shinrich/events{/privacy}","received_events_url":"https://api.github.com/users/shinrich/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/apache/trafficserver/milestones/16","html_url":"https://github.com/apache/trafficserver/milestone/16","labels_url":"https://api.github.com/repos/apache/trafficserver/milestones/16/labels","id":3016365,"number":16,"title":"7.1.3","description":"","creator":{"login":"zwoop","id":202131,"avatar_url":"https://avatars1.githubusercontent.com/u/202131?v=4","gravatar_id":"","url":"https://api.github.com/users/zwoop","html_url":"https://github.com/zwoop","followers_url":"https://api.github.com/users/zwoop/followers","following_url":"https://api.github.com/users/zwoop/following{/other_user}","gists_url":"https://api.github.com/users/zwoop/gists{/gist_id}","starred_url":"https://api.github.com/users/zwoop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zwoop/subscriptions","organizations_url":"https://api.github.com/users/zwoop/orgs","repos_url":"https://api.github.com/users/zwoop/repos","events_url":"https://api.github.com/users/zwoop/events{/privacy}","received_events_url":"https://api.github.com/users/zwoop/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":62,"state":"open","created_at":"2018-01-06T05:07:24Z","updated_at":"2018-03-14T21:09:58Z","due_on":"2018-03-15T07:00:00Z","closed_at":null},"comments":2,"created_at":"2018-03-12T15:01:07Z","updated_at":"2018-03-14T21:09:58Z","closed_at":"2018-03-14T21:09:58Z","author_association":"MEMBER","body":"We have seen this crash on our earlier 7.1.1-based build, but looking at the code in the area, I think this is likely an issue for 7.1.2 as well. \r\n\r\nLooking at history and the milestones, it appears that the SM machine made an attempt to connect to origin.  It connects but the origin sends an EOS.  The state machine sets up a tunnel to return an error message, but it incorrectly continues on with connection reattempts.\r\n\r\nI think the problem is in HttpSM::state_read_servrer_resposne_header in the VC_EVENT_EOS csae.  We carefully detect that 0 bytes have been written and set up an error response and return so we don't accidentally process this as a HTTP 0.9 response.  I assume this path doesn't appropriately set enough state to stop the connection retries.  Since we no longer support 0.9, we don't need this check and can let the logic pass through.  Later, we set the state to PARSE_RESULT_ERROR if we parse a 0.9 response on the not first response on a connection.  We could change that to return PARSE_RESULT_ERROR for all responses on a connection.  Then it will go through the normal error case which should stop any connection retries.\r\n\r\n```\r\n[ 0  ] libc-2.12.so       raise                                      ( :undefined                ) \r\n[ 1  ] libc-2.12.so       __GI_abort                                 ( :undefined                ) \r\n[ 2  ] libtsutil.so.7     ink_abort                                  ( ink_error.cc:99           ) \r\n[ 3  ] libtsutil.so.7     _ink_assert                                ( ink_assert.cc:37          ) \r\n[ 4  ] traffic_server     HttpSM::state_http_server_open(int, void*) ( HttpSM.cc:1928            ) \r\n[ 5  ] traffic_server     HttpSM::main_handler(int, void*)           ( HttpSM.cc:2797            ) \r\n[ 6  ] traffic_server     Continuation::handleEvent(int, void*)      ( I_Continuation.h:153      ) \r\n[ 7  ] traffic_server     HttpTunnel::main_handler(int, void*)       ( HttpTunnel.cc:1648        ) \r\n[ 8  ] traffic_server     Continuation::handleEvent(int, void*)      ( I_Continuation.h:153      ) \r\n[ 9  ] traffic_server     write_signal_and_update                    ( UnixNetVConnection.cc:175 ) \r\n[ 10 ] traffic_server     write_signal_done                          ( UnixNetVConnection.cc:217 ) \r\n[ 11 ] traffic_server     write_to_net_io                            ( UnixNetVConnection.cc:564 ) \r\n[ 12 ] traffic_server     write_to_net                               ( UnixNetVConnection.cc:416 ) \r\n[ 13 ] traffic_server     NetHandler::waitForActivity(long)          ( UnixNet.cc:514            ) \r\n[ 14 ] traffic_server     EThread::execute_regular()                 ( UnixEThread.cc:232        ) \r\n[ 15 ] traffic_server     EThread::execute()                         ( UnixEThread.cc:262        ) \r\n[ 16 ] traffic_server     spawn_thread_internal                      ( Thread.cc:85              ) \r\n[ 17 ] libpthread-2.12.so start_thread                               ( :undefined                )\r\n```"}}
{"actor":{"display_login":"shinrich"}}