Skip to content

Conversation

@bryancall
Copy link
Contributor

@bryancall bryancall commented Jan 12, 2023

When testing 9.2.0 RC0 I ran into an issue with the regression tests (-R 3 -r SDK_API_HttpParentProxySet_Fail) crashing with the debug build. I tracked down the commit that caused the issue to be #7976.

s->current.state changed from being CONNECTION_CLOSED to BAD_INCOMING_RESPONSE and the debug assert doesn't handle that condition.

Regression test before #7976
+++++++++ Incoming O.S. Response +++++++++

-- State Machine Id: 0
HTTP/1.0 0

[Jan 11 18:05:57.124] [ET_NET 14] DEBUG: <HttpTransact.cc:3499 (HandleResponse)> (http_seq) [0] [HttpTransact::HandleResponse] Response not valid
[Jan 11 18:05:57.124] [ET_NET 14] DEBUG: <HttpTransact.cc:3634 (handle_response_from_parent)> (http_trans) [0] [handle_response_from_parent] (hrfp)
[Jan 11 18:05:57.124] [ET_NET 14] DEBUG: <HttpTransact.cc:3667 (handle_response_from_parent)> (http_trans) [0] [hrfp] connection not alive
[Jan 11 18:05:57.124] [ET_NET 14] DEBUG: <HttpTransact.cc:3680 (handle_response_from_parent)> (http_trans) [0] [0] failed to connect to parent 127.0.0.1
[Jan 11 18:05:57.124] [ET_NET 14] DEBUG: <HttpTransact.cc:3706 (handle_response_from_parent)> (http_trans) [0] [handle_response_from_parent] 1 per parent attempts exhausted
[Jan 11 18:05:57.124] [ET_NET 14] DEBUG: <HttpTransact.cc:260 (nextParent)> (parent_down) [0] sm_id[0] connection to parent 127.0.0.1 failed, conn_state: CONNECTION_CLOSED, request to origin: trafficserver.apache.org
[Jan 11 18:05:57.124] [ET_NET 14] DEBUG: <ParentSelection.cc:176 (nextParent)> (parent_select) ParentConfigParams::nextParent(): parent_table: 0x1d1ee50, result->rec: 0xeeeeffff
[Jan 11 18:05:57.124] [ET_NET 14] DEBUG: <ParentSelection.cc:188 (nextParent)> (parent_select) Retry result for trafficserver.apache.org was PARENT_SPECIFIED
[Jan 11 18:05:57.124] [ET_NET 14] DEBUG: <HttpTransactHeaders.cc:1147 (add_server_header_to_response)> (http_trans) Adding Server: ATS/10.0.0

Regression test after #7976

+++++++++ Incoming O.S. Response +++++++++
-- State Machine Id: 0
HTTP/1.0 0

[Jan 11 17:53:32.904] [ET_NET 11] DEBUG: <HttpTransact.cc:359 (is_response_valid)> (http_trans) [0] Response Error: Missing status code
[Jan 11 17:53:32.904] [ET_NET 11] DEBUG: <HttpTransact.cc:3434 (HandleResponse)> (http_seq) [0] Response not valid
[Jan 11 17:53:32.904] [ET_NET 11] DEBUG: <HttpTransact.cc:3569 (handle_response_from_parent)> (http_trans) [0] (hrfp)
Fatal: ../../../proxy/http/HttpTransact.cc:313: failed assertion `(s->current.state == CONNECTION_ERROR) || (s->current.state == OPEN_RAW_ERROR) || (s->current.state == PARSE_ERROR) || (s->current.state == CONNECTION_CLOSED) || (s->current.state == INACTIVE_TIMEOUT) || (s->current.state == ACTIVE_TIMEOUT) || s->current.state == OUTBOUND_CONGESTION`

Regression test after this change

+++++++++ Incoming O.S. Response +++++++++
-- State Machine Id: 0
HTTP/1.0 0

[Jan 11 17:54:04.784] [ET_NET 10] DEBUG: <HttpTransact.cc:359 (is_response_valid)> (http_trans) [0] Response Error: Missing status code
[Jan 11 17:54:04.784] [ET_NET 10] DEBUG: <HttpTransact.cc:3434 (HandleResponse)> (http_seq) [0] Response not valid
[Jan 11 17:54:04.784] [ET_NET 10] DEBUG: <HttpTransact.cc:3569 (handle_response_from_parent)> (http_trans) [0] (hrfp)
[Jan 11 17:54:04.784] [ET_NET 10] DEBUG: <HttpTransact.cc:3615 (handle_response_from_parent)> (http_trans) [0] [hrfp] connection not alive
[Jan 11 17:54:04.784] [ET_NET 10] DEBUG: <HttpTransact.cc:3628 (handle_response_from_parent)> (http_trans) [0] [0] failed to connect to parent 127.0.0.1
[Jan 11 17:54:04.784] [ET_NET 10] DEBUG: <HttpTransact.cc:3654 (handle_response_from_parent)> (http_trans) [0] [handle_response_from_parent] 1 per parent attempts exhausted
[Jan 11 17:54:04.784] [ET_NET 10] DEBUG: <HttpTransact.cc:278 (nextParent)> (parent_down) [0] connection to parent 127.0.0.1 failed, conn_state: BAD_INCOMING_RESPONSE, request to origin: trafficserver.apache.org
[Jan 11 17:54:04.784] [ET_NET 10] DEBUG: <ParentSelection.cc:176 (nextParent)> (parent_select) ParentConfigParams::nextParent(): parent_table: 0x223a360, result->rec: 0xeeeeffff
[Jan 11 17:54:04.784] [ET_NET 10] DEBUG: <ParentSelection.cc:188 (nextParent)> (parent_select) Retry result for trafficserver.apache.org was PARENT_SPECIFIED
[Jan 11 17:54:04.784] [ET_NET 10] DEBUG: <HttpTransact.cc:3883 (handle_server_connection_not_open)> (http_trans) [0] (hscno)
[Jan 11 17:54:04.784] [ET_NET 10] DEBUG: <HttpTransact.cc:3884 (handle_server_connection_not_open)> (http_seq) [0] Entering HttpTransact::handle_server_connection_not_open
[Jan 11 17:54:04.784] [ET_NET 10] DEBUG: <HttpSM.cc:4348 (do_hostdb_update_if_necessary)> (http) [0] server info = 127.0.0.1:3300
[Jan 11 17:54:04.784] [ET_NET 10] DEBUG: <HttpTransactHeaders.cc:1165 (add_server_header_to_response)> (http_trans) Adding Server: ATS/10.0.0

@bryancall bryancall added this to the 10.0.0 milestone Jan 12, 2023
@bryancall bryancall self-assigned this Jan 12, 2023
Copy link
Contributor

@bneradt bneradt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@bryancall bryancall merged commit f1ece83 into apache:master Jan 13, 2023
zwoop pushed a commit that referenced this pull request Jan 23, 2023
@zwoop
Copy link
Contributor

zwoop commented Jan 23, 2023

Cherry-picked to v9.1.x branch.

@zwoop zwoop modified the milestones: 10.0.0, 9.2.1 Jan 23, 2023
masaori335 pushed a commit to masaori335/trafficserver that referenced this pull request Feb 21, 2023
* asf/9.2.x:
  Updated ChangeLog
  Fixed issue with SDK_API_HttpParentProxySet_Fail regression test (apache#9300)
  Updated warning message for adding duplicated remap entries (apache#9306)
  AuTests: update to Proxy Verifier v2.6.0 (apache#9307)
  glibc 2.37 will require additional explicit defines (apache#9325)
  ppc64 stack grows down (apache#9326)
  Fixes header level for remap inspector
  Updated ChangeLog
  Bump version to v9.2.0
  Finished the 9.2.x release notes
  Checkpoint so far, on page 10 out of 24
  Update rtd-theme to the latest version (apache#9316)
  Cleanup and prepare for 9.2.x sections
  Docs: Unpin Sphinx (apache#9311)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants