You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/01/19 00:52:48 UTC

[GitHub] [trafficserver] masaori335 opened a new pull request #7432: Fix stall on outbound TLS handshake

masaori335 opened a new pull request #7432:
URL: https://github.com/apache/trafficserver/pull/7432


   I observed outbound TLS handshake is stalled on mater and 9.0.x (almost always on my local box). 
   
   When the stall happened, `SSLNetVConnection::sslClientHandShakeEvent()` was called twice but nothing happened after that until inactive timeout kicks in. 
   
   ## ATS Debug Log
   ```
   [Jan 19 09:43:42.921] [ET_NET 4] DEBUG: <HttpSM.cc:1773 (state_http_server_open)> (http) [0] [&HttpSM::state_http_server_open, NET_EVENT_OPEN/TS_EVENT_NET_CONNECT]
   [Jan 19 09:43:42.923] [ET_NET 4] DEBUG: <Http1ServerSession.cc:81 (new_connection)> (http_ss) [0] session born, netvc 0x94d8b00
   [Jan 19 09:43:42.923] [ET_NET 4] DEBUG: <HttpSM.cc:1824 (state_http_server_open)> (http) [0] setting handler for TCP handshake
   [Jan 19 09:43:42.924] [ET_NET 4] DEBUG: <SSLNetVConnection.cc:1138 (sslStartHandShake)> (ssl) using SNI name 'localhost' for client handshake
   [Jan 19 09:43:42.924] [ET_NET 4] DEBUG: <SSLNetVConnection.cc:1418 (sslClientHandShakeEvent)> (ssl) Initialize outbound connect curHook from NULL
   [Jan 19 09:43:42.924] [ET_NET 4] DEBUG: <SSLNetVConnection.cc:1461 (sslClientHandShakeEvent)> (ssl.error) SSL_ERROR_WANT_READ
   [Jan 19 09:43:42.924] [ET_NET 4] DEBUG: <SSLNetVConnection.cc:1418 (sslClientHandShakeEvent)> (ssl) Initialize outbound connect curHook from NULL
   [Jan 19 09:43:42.924] [ET_NET 4] DEBUG: <SSLNetVConnection.cc:1461 (sslClientHandShakeEvent)> (ssl.error) SSL_ERROR_WANT_READ
   ```
   
   ## Wireshark
   ```
   29	8.599979	127.0.0.1	56211	127.0.0.1	8443	573	Client Hello
   31	8.601103	127.0.0.1	8443	127.0.0.1	56211	1458	Server Hello, Change Cipher Spec, Application Data, Application Data, Application Data, Application Data
   ```
   
   # Route Cause
   It looks like `a2d15151a5c1a69a3826e086ac497a94a4bfa7ea` made the read operation for TLS handshake disabled.
   
   https://github.com/apache/trafficserver/commit/a2d15151a5c1a69a3826e086ac497a94a4bfa7ea#diff-85a75d910dc93751ef5d568fc20fc73b01bfadac58844e88c7b8e68cedda0f0bL580-R584


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] masaori335 commented on pull request #7432: Fix stall on outbound TLS handshake

Posted by GitBox <gi...@apache.org>.
masaori335 commented on pull request #7432:
URL: https://github.com/apache/trafficserver/pull/7432#issuecomment-763232941


   We don't see the stall if the second `SSLNetVConnection::sslClientHandShakeEvent()` call from `write_to_net_io()` success. Definiately, it's race with Server Hello from origin server.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] masaori335 merged pull request #7432: Fix stall on outbound TLS handshake

Posted by GitBox <gi...@apache.org>.
masaori335 merged pull request #7432:
URL: https://github.com/apache/trafficserver/pull/7432


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] zwoop commented on pull request #7432: Fix stall on outbound TLS handshake

Posted by GitBox <gi...@apache.org>.
zwoop commented on pull request #7432:
URL: https://github.com/apache/trafficserver/pull/7432#issuecomment-763759731


   Cherry-picked to v9.0.x branch.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org