[trafficserver] branch quic-latest updated (a2e788b -> 5c50ff3)
This is an automated email from the ASF dual-hosted git repository. scw00 pushed a change to branch quic-latest in repository https://gitbox.apache.org/repos/asf/trafficserver.git. from a2e788b Merge branch 'master' into quic-latest add da958f1 QUIC: add qlog support add 82b5107 make qlog configurable add a126b84 remove useless INCLUDE_YAML add 1a5669a add metrics update add 511ac7e make qlog configurable add 344ede3 Chang qlog_file configuration to qlog_dir add 5c50ff3 make compiler happy No new revisions were added by this update. Summary of changes: iocore/net/P_QUICNetVConnection.h |5 +- iocore/net/QUICNetVConnection.cc | 25 +- iocore/net/quic/Makefile.am|7 +- iocore/net/quic/QUICConfig.cc |7 + iocore/net/quic/QUICConfig.h |2 + iocore/net/quic/QUICCongestionController.h | 13 + iocore/net/quic/QUICContext.cc | 20 +- iocore/net/quic/QUICContext.h | 176 +++- iocore/net/quic/QUICFrame.cc | 16 + iocore/net/quic/QUICFrame.h|3 + iocore/net/quic/QUICFrameDispatcher.cc |7 +- iocore/net/quic/QUICFrameDispatcher.h |3 +- iocore/net/quic/QUICLossDetector.cc|3 +- iocore/net/quic/QUICLossDetector.h | 14 +- iocore/net/quic/QUICNewRenoCongestionController.cc |8 +- iocore/net/quic/QUICStreamManager.cc |2 +- iocore/net/quic/QUICStreamManager.h|4 +- iocore/net/quic/QUICTypes.cc | 27 + iocore/net/quic/QUICTypes.h|8 + iocore/net/quic/qlog/QLog.cc | 103 ++ iocore/net/quic/qlog/QLog.h| 145 +++ iocore/net/quic/qlog/QLogEvent.cc | 317 ++ iocore/net/quic/qlog/QLogEvent.h | 1013 iocore/net/quic/qlog/QLogFrame.cc | 282 ++ iocore/net/quic/qlog/QLogFrame.h | 309 ++ iocore/net/quic/qlog/QLogListener.h| 119 +++ iocore/net/quic/qlog/QLogUtils.h | 80 ++ mgmt/RecordsConfig.cc |2 + proxy/http/Makefile.am |3 +- proxy/http3/Makefile.am|3 +- src/traffic_quic/Makefile.inc |2 +- 31 files changed, 2651 insertions(+), 77 deletions(-) create mode 100644 iocore/net/quic/qlog/QLog.cc create mode 100644 iocore/net/quic/qlog/QLog.h create mode 100644 iocore/net/quic/qlog/QLogEvent.cc create mode 100644 iocore/net/quic/qlog/QLogEvent.h create mode 100644 iocore/net/quic/qlog/QLogFrame.cc create mode 100644 iocore/net/quic/qlog/QLogFrame.h create mode 100644 iocore/net/quic/qlog/QLogListener.h create mode 100644 iocore/net/quic/qlog/QLogUtils.h
[trafficserver] branch 9.0.x updated: change overridable var type for proxy.config.http.server_session_sharing.match from int to string (#6822)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 5cec370 change overridable var type for proxy.config.http.server_session_sharing.match from int to string (#6822) 5cec370 is described below commit 5cec370a69ac2636b49406f183503d106ff47e2a Author: Xin Li <33378623+whut...@users.noreply.github.com> AuthorDate: Fri Jun 12 13:10:59 2020 -0700 change overridable var type for proxy.config.http.server_session_sharing.match from int to string (#6822) Co-authored-by: xinli1 (cherry picked from commit 85d50c2d7e916e7e30c698fdb1c32b1db7779455) --- proxy/http/HttpConfig.cc | 10 ++ proxy/http/HttpConfig.h| 2 ++ src/shared/overridable_txn_vars.cc | 2 +- src/traffic_server/InkAPI.cc | 5 + 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc index ebe0886..59adba3 100644 --- a/proxy/http/HttpConfig.cc +++ b/proxy/http/HttpConfig.cc @@ -1113,6 +1113,7 @@ HttpConfig::startup() // [amc] This is a bit of a mess, need to figure out to make this cleaner. RecRegisterConfigUpdateCb("proxy.config.http.server_session_sharing.match", _server_session_sharing_cb, ); http_config_enum_mask_read("proxy.config.http.server_session_sharing.match", c.oride.server_session_sharing_match); + HttpEstablishStaticConfigStringAlloc(c.oride.server_session_sharing_match_str, "proxy.config.http.server_session_sharing.match"); http_config_enum_read("proxy.config.http.server_session_sharing.pool", SessionSharingPoolStrings, c.server_session_sharing_pool); RecRegisterConfigUpdateCb("proxy.config.http.insert_forwarded", _insert_forwarded_cb, ); @@ -1409,10 +1410,11 @@ HttpConfig::reconfigure() params->oride.flow_high_water_mark = params->oride.flow_low_water_mark = 0; } - params->oride.server_session_sharing_match = m_master.oride.server_session_sharing_match; - params->oride.server_min_keep_alive_conns = m_master.oride.server_min_keep_alive_conns; - params->server_session_sharing_pool= m_master.server_session_sharing_pool; - params->oride.keep_alive_post_out = m_master.oride.keep_alive_post_out; + params->oride.server_session_sharing_match = m_master.oride.server_session_sharing_match; + params->oride.server_session_sharing_match_str = ats_strdup(m_master.oride.server_session_sharing_match_str); + params->oride.server_min_keep_alive_conns = m_master.oride.server_min_keep_alive_conns; + params->server_session_sharing_pool= m_master.server_session_sharing_pool; + params->oride.keep_alive_post_out = m_master.oride.keep_alive_post_out; params->oride.keep_alive_no_activity_timeout_in = m_master.oride.keep_alive_no_activity_timeout_in; params->oride.keep_alive_no_activity_timeout_out = m_master.oride.keep_alive_no_activity_timeout_out; diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h index 7c6eb7a..6ee850b 100644 --- a/proxy/http/HttpConfig.h +++ b/proxy/http/HttpConfig.h @@ -469,6 +469,7 @@ struct OverridableHttpConfigParams { MgmtInt server_min_keep_alive_conns = 0; MgmtByte server_session_sharing_match = 0; + char *server_session_sharing_match_str = nullptr; MgmtByte auth_server_session_private= 1; MgmtByte fwd_proxy_auth_to_parent = 0; MgmtByte uncacheable_requests_bypass_parent = 1; @@ -853,6 +854,7 @@ inline HttpConfigParams::~HttpConfigParams() ats_free(proxy_response_via_string); ats_free(anonymize_other_header_list); ats_free(oride.body_factory_template_base); + ats_free(oride.server_session_sharing_match_str); ats_free(oride.proxy_response_server_string); ats_free(oride.global_user_agent_header); ats_free(oride.ssl_client_cert_filename); diff --git a/src/shared/overridable_txn_vars.cc b/src/shared/overridable_txn_vars.cc index c38d8d4..3be8970 100644 --- a/src/shared/overridable_txn_vars.cc +++ b/src/shared/overridable_txn_vars.cc @@ -101,7 +101,7 @@ const std::unordered_map 0) { HttpConfig::load_server_session_sharing_match(value, s->t_state.my_txn_conf().server_session_sharing_match); + s->t_state.my_txn_conf().server_session_sharing_match_str = const_cast(value); } break; case TS_CONFIG_SSL_CLIENT_VERIFY_SERVER_POLICY: @@ -8833,6 +8834,10 @@ TSHttpTxnConfigStringGet(TSHttpTxn txnp, TSOverridableConfigKey conf, const char *value = sm->t_state.txn_conf->body_factory_template_base; *length = sm->t_state.txn_conf->body_factory_template_base_len; break; + case TS_CONFIG_HTTP_SERVER_SESSION_SHARING_MATCH: +*value = sm->t_state.txn_conf->server_session_sharing_match_str; +*length = *value ? strlen(*value) : 0; +break; default: { MgmtConverter const
[trafficserver] branch 8.1.x updated: Updated ChangeLog
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 8.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.1.x by this push: new c1bbb00 Updated ChangeLog c1bbb00 is described below commit c1bbb00e862a9f90ce75f51d75a05f241e4998f4 Author: Leif Hedstrom AuthorDate: Tue Jun 16 16:00:52 2020 -0600 Updated ChangeLog --- CHANGELOG-8.1.0 | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG-8.1.0 b/CHANGELOG-8.1.0 index fc5f10a..8085dd4 100644 --- a/CHANGELOG-8.1.0 +++ b/CHANGELOG-8.1.0 @@ -187,6 +187,7 @@ Changes with Apache Traffic Server 8.1.0 #6689 - Handle immediate as inactivity timeout #6692 - Fix deprecated-copy warning in cache tool #6708 - Adding logging fields for collapsed forwarding metrics + #6711 - cache_range_request autests: make more robust and clean up. #6729 - Fix a bug that current_active_client_connections doesn't decrease #6750 - backports parent.config ignore_self_detect flag to 8.1.x #6753 - Fix HPACK Dynamic Table Cleanup
[trafficserver] branch 8.1.x updated: Updated ChangeLog
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 8.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.1.x by this push: new 84e776a Updated ChangeLog 84e776a is described below commit 84e776ab7b9a4e911b0f5038a7838e7fa1d64c76 Author: Leif Hedstrom AuthorDate: Tue Jun 16 15:57:27 2020 -0600 Updated ChangeLog --- CHANGELOG-8.1.0 | 4 1 file changed, 4 insertions(+) diff --git a/CHANGELOG-8.1.0 b/CHANGELOG-8.1.0 index 9fe6314..fc5f10a 100644 --- a/CHANGELOG-8.1.0 +++ b/CHANGELOG-8.1.0 @@ -184,6 +184,7 @@ Changes with Apache Traffic Server 8.1.0 #6676 - Fixes the 'traffic_ctl host status' for trafficserver 8.1.x #6685 - 8.1.x backport cache_range_requests autests: remove last-modified #6688 - Fixes minor memory leak in configure_net + #6689 - Handle immediate as inactivity timeout #6692 - Fix deprecated-copy warning in cache tool #6708 - Adding logging fields for collapsed forwarding metrics #6729 - Fix a bug that current_active_client_connections doesn't decrease @@ -195,5 +196,8 @@ Changes with Apache Traffic Server 8.1.0 #6786 - HPACK: send back an error to the client when the index is invalid #6802 - 8.1.x backport code and documentation for lua states configuration and stats printing #6825 - Clear handling tracked events of Http2Stream + #6848 - 8.1.x: cache_range_request: Overhaul and clean up the core autest. #6854 - Fix pointer overflow in XPACK #6862 - Fix brotli plugin + #6876 - Make Http2ClientSession inactive on EOS event + #6885 - Revert 4028 for 8.1.x branch
[trafficserver] branch 9.0.x updated: Updated ChangeLog
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 36ae8ff Updated ChangeLog 36ae8ff is described below commit 36ae8ff72f46a9e241feef441b609b6b000a115e Author: Leif Hedstrom AuthorDate: Tue Jun 16 15:55:50 2020 -0600 Updated ChangeLog --- CHANGELOG-9.0.0 | 14 ++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG-9.0.0 b/CHANGELOG-9.0.0 index 0f392dd..5e96621 100644 --- a/CHANGELOG-9.0.0 +++ b/CHANGELOG-9.0.0 @@ -787,6 +787,7 @@ Changes with Apache Traffic Server 9.0.0 #6283 - Adjust debug tag for ssl_sni_whitelist plugin to match plugin #6284 - Removes the remaining references to TSQA #6287 - Introduce NetEvent to split UnixNetVConnection and NetHandler + #6291 - Add extension ip.test.ext to Au Test, with Test method to allocate extra TCP ports. #6293 - Add invalid config warning when cache open write fail and read retry are inconsistent #6297 - Add links to RWW sections #6303 - Fixes a case where the NextHop consistent hash ring may not be completely searched. @@ -856,6 +857,7 @@ Changes with Apache Traffic Server 9.0.0 #6517 - Make traffic_ctl limp along for now with large records.snap #6519 - Adds support for configure option --enable-yaml-headers #6523 - Removes noisy log statement from xdebug + #6524 - Require 1.1.1 as minimum openssl lib version for tls_check_dual_cert_selection Au test. #6532 - Add FetchSM support to dechunking in non-streaming mode with new TS API TSFetchFlagSet #6538 - Adds partial_blind_route sni action #6542 - Rework stats over http so that it supports both a config file and the original path parameter @@ -881,6 +883,7 @@ Changes with Apache Traffic Server 9.0.0 #6608 - Fix typo in system stats, change loadavg 10min to be 15min #6613 - SNI - Tunnel: Add support to match captured group from fqdn into tunnel_route #6615 - Updated ink_rwlock to be a real reader writer lock + #6616 - Adding a log pipe buffer size configuration test #6617 - Remove configure option --max-api-stats which does not do anything. S… #6618 - Fix missing virtual destructor for PluginUserArgsMixin. #6628 - Use default rwlock attributes on initialize @@ -936,13 +939,16 @@ Changes with Apache Traffic Server 9.0.0 #6803 - fixes issue 6765, memory leak in unit test #6805 - Fix session pool to add and fetch to beginning of hash chain instead of end #6807 - Add le32toh and htole32 for macOS + #6809 - Fix assert when client aborts during backfill #6812 - Fix missing virtual destructor in TLSSessionResumptionSupport. #6813 - Adding a basic ip_allow test. #6816 - Fixes remaining memory leaks with nexthop strategy unit tests #6817 - lua plugin: fix for incorrectly injecting global plugin stats #6818 - Add CSV output as an option format for stats_over_http #6819 - regex_remap: Adjust regex recursion limit down due to crashes in testing + #6822 - change overridable var type for proxy.config.http.server_session_sharing.match from int to string #6824 - Fix test certs in client_context_dump + #6826 - Return null when do_io_write called on closed stream #6827 - Make chunked encoding test more resilient #6829 - traffic_dump: debug_tag and lock improvements #6834 - Drastically improve generator.so performance for /nocache @@ -951,4 +957,12 @@ Changes with Apache Traffic Server 9.0.0 #6839 - Issue 6838 Fixing the comparison in waited_enough (drain functionality) #6843 - Schedule Transform on the same thread as the continuation #6845 - LGTM: add header guard + #6856 - Traffic Dump: Add server response HTTP version #6861 - Fix a crash on TLS resumption + #6866 - Protect against nullptr access during SSL Callback + #6868 - avoid dynamic_cast for non_internal requests + #6872 - Track thread changes during origin connect and cache open write + #6884 - microserver error handling: SSLError check and debug. + #6891 - Make h2spec test more resiliant by extending timeout + #6892 - Fix compiler issue with ICC 19.1 + #6898 - set sni_name with remapped origin name if sni_policy is not the default value
[trafficserver] branch 9.0.x updated: avoid dynamic_cast to get Pi-tag for non_internal requests (#6868)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 736ef12 avoid dynamic_cast to get Pi-tag for non_internal requests (#6868) 736ef12 is described below commit 736ef125df037192210ac6a16e8b3f3662053ce4 Author: Sudheer Vinukonda AuthorDate: Tue Jun 9 14:28:53 2020 -0700 avoid dynamic_cast to get Pi-tag for non_internal requests (#6868) Optimization - See lots of stack traces spending cycles on dynamic_cast for every request, when in reality, it's no longer needed as Http2ClientSession which used to inherit PluginIdentity in the past is no longer doing that and the client access protocol for access logs is being extracted directly from the HttpSM context. (cherry picked from commit fd4e8186ae51582e75d8f88f71366d1150cd0d82) --- proxy/ProxyTransaction.cc | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/proxy/ProxyTransaction.cc b/proxy/ProxyTransaction.cc index 23eeb08..9be892f 100644 --- a/proxy/ProxyTransaction.cc +++ b/proxy/ProxyTransaction.cc @@ -43,10 +43,13 @@ ProxyTransaction::new_transaction(bool from_early_data) HttpTxnDebug("[%" PRId64 "] Starting transaction %d using sm [%" PRId64 "]", _proxy_ssn->connection_id(), _proxy_ssn->get_transact_count(), _sm->sm_id); - PluginIdentity *pi = dynamic_cast(this->get_netvc()); - if (pi) { -_sm->plugin_tag = pi->getPluginTag(); -_sm->plugin_id = pi->getPluginId(); + // PI tag valid only for internal requests + if (this->get_netvc()->get_is_internal_request()) { +PluginIdentity *pi = dynamic_cast(this->get_netvc()); +if (pi) { + _sm->plugin_tag = pi->getPluginTag(); + _sm->plugin_id = pi->getPluginId(); +} } this->increment_client_transactions_stat();
[trafficserver] branch 9.0.x updated: Protect against nullptr access during SSL Callback (#6866)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 62817fb Protect against nullptr access during SSL Callback (#6866) 62817fb is described below commit 62817fbb9874410ecf4aebfd524fa84770f28b3a Author: Sudheer Vinukonda AuthorDate: Tue Jun 9 14:29:17 2020 -0700 Protect against nullptr access during SSL Callback (#6866) (cherry picked from commit 079ed98632fc9e49b34efe4e38fabbdd9e2d695c) --- iocore/net/SSLClientUtils.cc | 2 +- iocore/net/SSLUtils.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/iocore/net/SSLClientUtils.cc b/iocore/net/SSLClientUtils.cc index 70f36d17..918db0a 100644 --- a/iocore/net/SSLClientUtils.cc +++ b/iocore/net/SSLClientUtils.cc @@ -53,7 +53,7 @@ verify_callback(int signature_ok, X509_STORE_CTX *ctx) // No enforcing, go away if (netvc == nullptr) { // No netvc, very bad. Go away. Things are not good. -Warning("Netvc gone by in verify_callback"); +SSLDebug("WARN, Netvc gone by in verify_callback"); return false; } else if (netvc->options.verifyServerPolicy == YamlSNIConfig::Policy::DISABLED) { return true; // Tell them that all is well diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc index 5dfcd69..9387a65 100644 --- a/iocore/net/SSLUtils.cc +++ b/iocore/net/SSLUtils.cc @@ -1019,7 +1019,7 @@ ssl_callback_info(const SSL *ssl, int where, int ret) SSLNetVConnection *netvc = SSLNetVCAccess(ssl); - if ((where & SSL_CB_ACCEPT_LOOP) && netvc->getSSLHandShakeComplete() == true && + if (netvc && (where & SSL_CB_ACCEPT_LOOP) && netvc->getSSLHandShakeComplete() == true && SSLConfigParams::ssl_allow_client_renegotiation == false) { int state = SSL_get_state(ssl);
[trafficserver] branch 9.0.x updated: Handle immediate as inactivity timeout (#6689)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 67fa91c Handle immediate as inactivity timeout (#6689) 67fa91c is described below commit 67fa91c1c01c8e81921bc292d222d7676ecb56a8 Author: Susan Hinrichs AuthorDate: Wed Jun 10 15:46:29 2020 -0500 Handle immediate as inactivity timeout (#6689) Co-authored-by: Susan Hinrichs (cherry picked from commit 35aa4cea1b94862eef33cba5b169af33bbdac3a3) --- iocore/net/UnixNetVConnection.cc | 5 + 1 file changed, 5 insertions(+) diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc index 181420e..163b58f 100644 --- a/iocore/net/UnixNetVConnection.cc +++ b/iocore/net/UnixNetVConnection.cc @@ -1126,6 +1126,11 @@ UnixNetVConnection::mainEvent(int event, Event *e) Event **signal_timeout= switch (event) { + // Treating immediate as inactivity timeout for any + // deprecated remaining immediates. The previous code was using EVENT_INTERVAL + // and EVENT_IMMEDIATE to distinguish active and inactive timeouts. + // There appears to be some stray EVENT_IMMEDIATEs floating around + case EVENT_IMMEDIATE: case VC_EVENT_INACTIVITY_TIMEOUT: signal_event = VC_EVENT_INACTIVITY_TIMEOUT; signal_timeout_at = _inactivity_timeout_at;
[trafficserver] branch 8.1.x updated: Handle immediate as inactivity timeout (#6689)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 8.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.1.x by this push: new 0edceb9 Handle immediate as inactivity timeout (#6689) 0edceb9 is described below commit 0edceb9fff5e67a60912f45ee45f673e7d1fc2b5 Author: Susan Hinrichs AuthorDate: Wed Jun 10 15:46:29 2020 -0500 Handle immediate as inactivity timeout (#6689) Co-authored-by: Susan Hinrichs (cherry picked from commit 35aa4cea1b94862eef33cba5b169af33bbdac3a3) --- iocore/net/UnixNetVConnection.cc | 5 + 1 file changed, 5 insertions(+) diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc index 67094f8..f25f9bb 100644 --- a/iocore/net/UnixNetVConnection.cc +++ b/iocore/net/UnixNetVConnection.cc @@ -1162,6 +1162,11 @@ UnixNetVConnection::mainEvent(int event, Event *e) Event **signal_timeout= switch (event) { + // Treating immediate as inactivity timeout for any + // deprecated remaining immediates. The previous code was using EVENT_INTERVAL + // and EVENT_IMMEDIATE to distinguish active and inactive timeouts. + // There appears to be some stray EVENT_IMMEDIATEs floating around + case EVENT_IMMEDIATE: case VC_EVENT_INACTIVITY_TIMEOUT: signal_event = VC_EVENT_INACTIVITY_TIMEOUT; signal_timeout_at = _inactivity_timeout_at;
[trafficserver] branch 9.0.x updated: Return null when do_io_write called on closed stream (#6826)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new db89a47 Return null when do_io_write called on closed stream (#6826) db89a47 is described below commit db89a47d92c1e5903af43dff1b1d388809abd499 Author: Susan Hinrichs AuthorDate: Wed Jun 10 16:18:12 2020 -0500 Return null when do_io_write called on closed stream (#6826) Co-authored-by: Susan Hinrichs (cherry picked from commit af9c4f39aeb40515bb42469cb0aeeb0ac27fec54) --- proxy/http/HttpTunnel.cc | 3 +++ proxy/http2/Http2Stream.cc | 8 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc index 4fbac85..1bfc10b 100644 --- a/proxy/http/HttpTunnel.cc +++ b/proxy/http/HttpTunnel.cc @@ -956,6 +956,9 @@ HttpTunnel::producer_run(HttpTunnelProducer *p) // Start the writes now that we know we will consume all the initial data c->write_vio = c->vc->do_io_write(this, c_write, c->buffer_reader); ink_assert(c_write > 0); + if (c->write_vio == nullptr) { +consumer_handler(VC_EVENT_ERROR, c); + } } } if (p->alive) { diff --git a/proxy/http2/Http2Stream.cc b/proxy/http2/Http2Stream.cc index cc40865..1996844 100644 --- a/proxy/http2/Http2Stream.cc +++ b/proxy/http2/Http2Stream.cc @@ -337,8 +337,12 @@ Http2Stream::do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *abuffe write_vio.op= VIO::WRITE; response_reader = abuffer; - update_write_request(abuffer, nbytes, false); - + if (c != nullptr && nbytes > 0 && this->is_client_state_writeable()) { +update_write_request(abuffer, nbytes, false); + } else if (!this->is_client_state_writeable()) { +// Cannot start a write on a closed stream +return nullptr; + } return _vio; }
[trafficserver] branch 9.0.x updated: Adding a log pipe buffer size test.
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new a3d9bea Adding a log pipe buffer size test. a3d9bea is described below commit a3d9bead4101f54b750d9f8c8facc76315eaf1fb Author: bneradt AuthorDate: Fri Apr 3 19:49:38 2020 + Adding a log pipe buffer size test. (cherry picked from commit 15e749ea4cf3b5e66ffd0ad53d20fa4c611e2ca5) --- proxy/logging/LogFile.cc | 10 +- src/traffic_layout/info.cc | 6 + tests/gold_tests/autest-site/when.test.ext | 36 tests/gold_tests/logging/log_pipe.test.py | 186 + .../logging/pipe_buffer_is_larger_than.py | 69 5 files changed, 302 insertions(+), 5 deletions(-) diff --git a/proxy/logging/LogFile.cc b/proxy/logging/LogFile.cc index 59c6bde..26fcca6 100644 --- a/proxy/logging/LogFile.cc +++ b/proxy/logging/LogFile.cc @@ -199,21 +199,21 @@ LogFile::open_file() if (m_pipe_buffer_size) { long pipe_size = (long)fcntl(m_fd, F_GETPIPE_SZ); if (pipe_size == -1) { -Error("get pipe size failed for pipe %s", m_name); +Error("Get pipe size failed for pipe %s: %s", m_name, strerror(errno)); } else { -Debug("log-file", "Default pipe size for pipe %s = %ld", m_name, pipe_size); +Debug("log-file", "Previous buffer size for pipe %s: %ld", m_name, pipe_size); } int ret = fcntl(m_fd, F_SETPIPE_SZ, m_pipe_buffer_size); if (ret == -1) { -Error("set pipe size failed for pipe %s", m_name); +Error("Set pipe size failed for pipe %s to size %d: %s", m_name, m_pipe_buffer_size, strerror(errno)); } pipe_size = (long)fcntl(m_fd, F_GETPIPE_SZ); if (pipe_size == -1) { -Error("get pipe size failed for pipe %s", m_name); +Error("Get pipe size after setting it failed for pipe %s: %s", m_name, strerror(errno)); } else { -Debug("log-file", "NEW pipe size for pipe %s = %ld", m_name, pipe_size); +Debug("log-file", "New buffer size for pipe %s: %ld", m_name, pipe_size); } } #endif // F_GETPIPE_SZ diff --git a/src/traffic_layout/info.cc b/src/traffic_layout/info.cc index 062aa7a..4cb6195 100644 --- a/src/traffic_layout/info.cc +++ b/src/traffic_layout/info.cc @@ -21,6 +21,7 @@ limitations under the License. */ +#include #include #include "tscore/I_Layout.h" #include "tscore/Filenames.h" @@ -88,6 +89,11 @@ produce_features(bool json) #else print_feature("TS_HAS_BROTLI", 0, json); #endif +#ifdef F_GETPIPE_SZ + print_feature("TS_HAS_PIPE_BUFFER_SIZE_CONFIG", 1, json); +#else + print_feature("TS_HAS_PIPE_BUFFER_SIZE_CONFIG", 0, json); +#endif /* F_GETPIPE_SZ */ print_feature("TS_HAS_JEMALLOC", TS_HAS_JEMALLOC, json); print_feature("TS_HAS_TCMALLOC", TS_HAS_TCMALLOC, json); print_feature("TS_HAS_IN6_IS_ADDR_UNSPECIFIED", TS_HAS_IN6_IS_ADDR_UNSPECIFIED, json); diff --git a/tests/gold_tests/autest-site/when.test.ext b/tests/gold_tests/autest-site/when.test.ext new file mode 100644 index 000..d44c9ba --- /dev/null +++ b/tests/gold_tests/autest-site/when.test.ext @@ -0,0 +1,36 @@ +''' +When extensions. +''' +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from autest.api import AddWhenFunction +import hosts.output as host + + +def FileContains(haystack, needle): +with open(haystack) as f: +result = needle in f.read() + +host.WriteDebug( +['FileExists', 'when'], +"Testing for file content '{0}' in '{1}' : {2}".format( +needle, haystack, result)) + +return result + + +AddWhenFunction(FileContains) diff --git a/tests/gold_tests/logging/log_pipe.test.py b/tests/gold_tests/logging/log_pipe.test.py new file mode 100644 index 000..cdadbd0 --- /dev/null +++ b/tests/gold_tests/logging/log_pipe.test.py @@ -0,0 +1,186 @@ +''' +''' +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +#
[trafficserver] branch 9.0.x updated: Track thread changes during origin connect and cache open write (#6872)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new d821bbe Track thread changes during origin connect and cache open write (#6872) d821bbe is described below commit d821bbebef4807c7b47661ad67f37cc7db0e3ce7 Author: Sudheer Vinukonda AuthorDate: Thu Jun 11 22:29:57 2020 -0700 Track thread changes during origin connect and cache open write (#6872) Also make adjust_thread() inline as an optimization (cherry picked from commit 59c5e25846b0dfe8720b5027fecac72af2da1545) --- proxy/ProxyTransaction.cc | 17 - proxy/ProxyTransaction.h | 17 + proxy/http/HttpConfig.cc | 6 ++ proxy/http/HttpConfig.h | 3 +++ proxy/http/HttpSM.cc | 2 ++ 5 files changed, 28 insertions(+), 17 deletions(-) diff --git a/proxy/ProxyTransaction.cc b/proxy/ProxyTransaction.cc index 8042c34..23eeb08 100644 --- a/proxy/ProxyTransaction.cc +++ b/proxy/ProxyTransaction.cc @@ -80,23 +80,6 @@ ProxyTransaction::destroy() this->mutex.clear(); } -// See if we need to schedule on the primary thread for the transaction or change the thread that is associated with the VC. -// If we reschedule, the scheduled action is returned. Otherwise, NULL is returned -Action * -ProxyTransaction::adjust_thread(Continuation *cont, int event, void *data) -{ - NetVConnection *vc = this->get_netvc(); - EThread *this_thread = this_ethread(); - if (vc && vc->thread != this_thread) { -if (vc->thread->is_event_type(ET_NET)) { - return vc->thread->schedule_imm(cont, event, data); -} else { // Not a net thread, take over this thread - vc->thread = this_thread; -} - } - return nullptr; -} - void ProxyTransaction::set_rx_error_code(ProxyError e) { diff --git a/proxy/ProxyTransaction.h b/proxy/ProxyTransaction.h index 51f35db..83a2111 100644 --- a/proxy/ProxyTransaction.h +++ b/proxy/ProxyTransaction.h @@ -221,3 +221,20 @@ ProxyTransaction::support_sni() const { return _proxy_ssn ? _proxy_ssn->support_sni() : false; } + +// See if we need to schedule on the primary thread for the transaction or change the thread that is associated with the VC. +// If we reschedule, the scheduled action is returned. Otherwise, NULL is returned +inline Action * +ProxyTransaction::adjust_thread(Continuation *cont, int event, void *data) +{ + NetVConnection *vc = this->get_netvc(); + EThread *this_thread = this_ethread(); + if (vc && vc->thread != this_thread) { +if (vc->thread->is_event_type(ET_NET)) { + return vc->thread->schedule_imm(cont, event, data); +} else { // Not a net thread, take over this thread + vc->thread = this_thread; +} + } + return nullptr; +} diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc index 0ec5251..ebe0886 100644 --- a/proxy/http/HttpConfig.cc +++ b/proxy/http/HttpConfig.cc @@ -942,6 +942,12 @@ register_stat_callbacks() (int)http_origin_connections_throttled_stat, RecRawStatSyncCount); RecRegisterRawStat(http_rsb, RECT_PROCESS, "proxy.process.http.post_body_too_large", RECD_COUNTER, RECP_PERSISTENT, (int)http_post_body_too_large, RecRawStatSyncCount); + RecRegisterRawStat(http_rsb, RECT_PROCESS, "proxy.process.http.origin.connect.adjust_thread", RECD_COUNTER, RECP_NON_PERSISTENT, + (int)http_origin_connect_adjust_thread_stat, RecRawStatSyncCount); + HTTP_CLEAR_DYN_STAT(http_origin_connect_adjust_thread_stat); + RecRegisterRawStat(http_rsb, RECT_PROCESS, "proxy.process.http.cache.open_write.adjust_thread", RECD_COUNTER, RECP_NON_PERSISTENT, + (int)http_cache_open_write_adjust_thread_stat, RecRawStatSyncCount); + HTTP_CLEAR_DYN_STAT(http_cache_open_write_adjust_thread_stat); // milestones RecRegisterRawStat(http_rsb, RECT_PROCESS, "proxy.process.http.milestone.ua_begin", RECD_COUNTER, RECP_PERSISTENT, (int)http_ua_begin_time_stat, RecRawStatSyncSum); diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h index 978775d..7c6eb7a 100644 --- a/proxy/http/HttpConfig.h +++ b/proxy/http/HttpConfig.h @@ -327,6 +327,9 @@ enum { http_origin_connections_throttled_stat, + http_origin_connect_adjust_thread_stat, + http_cache_open_write_adjust_thread_stat, + http_stat_count }; diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index 04bee2f..105180b 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -2405,6 +2405,7 @@ HttpSM::state_cache_open_write(int event, void *data) pending_action->cancel(); } if ((pending_action = ua_txn->adjust_thread(this, event, data))) { + HTTP_INCREMENT_DYN_STAT(http_cache_open_write_adjust_thread_stat); return 0; // Go away if we reschedule } } @@ -4780,6 +4781,7 @@
[trafficserver] branch 9.0.x updated: microserver error handling: SSLError check and debug. (#6884)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new fd84da8 microserver error handling: SSLError check and debug. (#6884) fd84da8 is described below commit fd84da8ea68df356069a46fdb2eb99aa6bc5923b Author: Brian Neradt AuthorDate: Fri Jun 12 11:55:50 2020 -0500 microserver error handling: SSLError check and debug. (#6884) Co-authored-by: bneradt (cherry picked from commit e219cfcf33f01d7a3ef734670b8e3fbf20f374df) --- tests/gold_tests/autest-site/microserver.test.ext | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tests/gold_tests/autest-site/microserver.test.ext b/tests/gold_tests/autest-site/microserver.test.ext index bde0005..b579136 100644 --- a/tests/gold_tests/autest-site/microserver.test.ext +++ b/tests/gold_tests/autest-site/microserver.test.ext @@ -21,6 +21,7 @@ import socket import ssl from autest.api import AddWhenFunction +import hosts.output as host from ports import get_port import trlib.ipconstants as IPConstants @@ -125,6 +126,16 @@ def uServerUpAndRunning(serverHost, port, isSsl, isIPv6, request, clientcert='', try: sock.connect((serverHost, port)) except ConnectionRefusedError: +host.WriteDebug( +['uServerUpAndRunning', 'when'], +"Connection refused: {0}:{1}".format( +serverHost, port)) +return False +except ssl.SSLError: +host.WriteDebug( +['uServerUpAndRunning', 'when'], +"SSL connection error: {0}:{1}".format( +serverHost, port)) return False sock.sendall(request.encode())
[trafficserver] branch 9.0.x updated: Traffic Dump: Add server response HTTP version (#6856)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 27fd544 Traffic Dump: Add server response HTTP version (#6856) 27fd544 is described below commit 27fd54423e40305083a3e74dd77f0e3e974be32f Author: Brian Neradt AuthorDate: Fri Jun 12 17:03:02 2020 -0500 Traffic Dump: Add server response HTTP version (#6856) Co-authored-by: bneradt (cherry picked from commit 85d28d9a9b66b9ddd9535eab1cd9c6c8eda0c8e5) --- plugins/experimental/traffic_dump/transaction_data.cc | 17 + tests/tools/lib/replay_schema.json| 7 ++- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/plugins/experimental/traffic_dump/transaction_data.cc b/plugins/experimental/traffic_dump/transaction_data.cc index 4951f2f..b87a8c6 100644 --- a/plugins/experimental/traffic_dump/transaction_data.cc +++ b/plugins/experimental/traffic_dump/transaction_data.cc @@ -118,12 +118,14 @@ TransactionData::write_message_node_no_content(TSMBuffer , TSMLoc _lo char const *cp = nullptr; TSMLoc url_loc = nullptr; + // 1. "version" + // Note that we print this for both requests and responses, so the first + // element in each has to start with a comma. + int version = TSHttpHdrVersionGet(buffer, hdr_loc); + result += R"("version":")" + std::to_string(TS_HTTP_MAJOR(version)) + "." + std::to_string(TS_HTTP_MINOR(version)) + '"'; + // Log scheme+method+request-target or status+reason based on header type if (TSHttpHdrTypeGet(buffer, hdr_loc) == TS_HTTP_TYPE_REQUEST) { -// 1. "version" -int version = TSHttpHdrVersionGet(buffer, hdr_loc); -result += R"("version":")" + std::to_string(TS_HTTP_MAJOR(version)) + "." + std::to_string(TS_HTTP_MINOR(version)) + '"'; - TSAssert(TS_SUCCESS == TSHttpHdrUrlGet(buffer, hdr_loc, _loc)); // 2. "scheme": cp = TSUrlSchemeGet(buffer, url_loc, ); @@ -156,12 +158,11 @@ TransactionData::write_message_node_no_content(TSMBuffer , TSMLoc _lo TSfree(url); TSHandleMLocRelease(buffer, hdr_loc, url_loc); } else { -// 1. "status":(string) -result += R"("status":)" + std::to_string(TSHttpHdrStatusGet(buffer, hdr_loc)); -// 2. "reason":(string) +// 2. "status":(string) +result += R"(,"status":)" + std::to_string(TSHttpHdrStatusGet(buffer, hdr_loc)); +// 3. "reason":(string) cp = TSHttpHdrReasonGet(buffer, hdr_loc, ); result += "," + traffic_dump::json_entry("reason", cp, len); -// 3. "encoding" } // "headers": [[name(string), value(string)]] diff --git a/tests/tools/lib/replay_schema.json b/tests/tools/lib/replay_schema.json index 328c13d..35906f4 100644 --- a/tests/tools/lib/replay_schema.json +++ b/tests/tools/lib/replay_schema.json @@ -157,7 +157,7 @@ "version": { "description": "HTTP version", "type": "string", - "enum": ["0.9", "1.0", "1.1"] + "enum": ["0.9", "1.0", "1.1", "2.0"] }, "scheme": { "description": "HTTP scheme (request).", @@ -187,6 +187,11 @@ "type": "object", "required": ["status"], "properties": { +"version": { + "description": "HTTP version", + "type": "string", + "enum": ["0.9", "1.0", "1.1", "2.0"] +}, "status": { "description": "Status code.", "type": "number"
[trafficserver] branch 9.0.x updated: Fix assert when client aborts during backfill (#6809)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 931bb79 Fix assert when client aborts during backfill (#6809) 931bb79 is described below commit 931bb797730219c6826ef56b577454e03e67a132 Author: Susan Hinrichs AuthorDate: Fri Jun 12 17:05:41 2020 -0500 Fix assert when client aborts during backfill (#6809) Co-authored-by: Susan Hinrichs (cherry picked from commit 34c30b1528007bef42cd8c4e26a24f3a68ec988e) --- proxy/http/Http1ClientSession.cc | 12 proxy/http/Http1ClientSession.h | 10 +- proxy/http/HttpSM.cc | 5 + 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/proxy/http/Http1ClientSession.cc b/proxy/http/Http1ClientSession.cc index 0c402bf..ae3f992 100644 --- a/proxy/http/Http1ClientSession.cc +++ b/proxy/http/Http1ClientSession.cc @@ -286,6 +286,8 @@ Http1ClientSession::do_io_close(int alerrno) _reader->consume(_reader->read_avail()); } else { read_state = HCS_CLOSED; +SET_HANDLER(::state_wait_for_sm_shutdown); +ka_vio = _vc->do_io_read(this, INT64_MAX, read_buffer); HttpSsnDebug("[%" PRId64 "] session closed", con_id); HTTP_SUM_DYN_STAT(http_transactions_per_client_con, transact_count); HTTP_DECREMENT_DYN_STAT(http_current_client_connections_stat); @@ -297,6 +299,16 @@ Http1ClientSession::do_io_close(int alerrno) } int +Http1ClientSession::state_wait_for_sm_shutdown(int event, void *data) +{ + STATE_ENTER(::state_wait_for_sm_shutdown, event, data); + ink_assert(read_state == HCS_CLOSED); + + // Just eat IO events until the state machine has finished + return 0; +} + +int Http1ClientSession::state_wait_for_close(int event, void *data) { STATE_ENTER(::state_wait_for_close, event, data); diff --git a/proxy/http/Http1ClientSession.h b/proxy/http/Http1ClientSession.h index 0a624d2..ca2739a 100644 --- a/proxy/http/Http1ClientSession.h +++ b/proxy/http/Http1ClientSession.h @@ -99,6 +99,7 @@ private: int state_keep_alive(int event, void *data); int state_slave_keep_alive(int event, void *data); int state_wait_for_close(int event, void *data); + int state_wait_for_sm_shutdown(int event, void *data); enum C_Read_State { HCS_INIT, @@ -108,11 +109,10 @@ private: HCS_CLOSED, }; - NetVConnection *client_vc = nullptr; - int magic = HTTP_SS_MAGIC_DEAD; - int transact_count= 0; - bool half_close = false; - bool conn_decrease= false; + int magic = HTTP_SS_MAGIC_DEAD; + int transact_count = 0; + bool half_close= false; + bool conn_decrease = false; MIOBuffer *read_buffer = nullptr; IOBufferReader *_reader = nullptr; diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index 127c06e..04bee2f 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -3224,6 +3224,11 @@ HttpSM::tunnel_handler_ua(int event, HttpTunnelConsumer *c) server_session->get_netvc()->set_active_timeout(HRTIME_SECONDS(t_state.txn_conf->background_fill_active_timeout)); } + // Even with the background fill, the client side should go down + c->write_vio = nullptr; + c->vc->do_io_close(EHTTP_ERROR); + c->alive = false; + } else { // No background fill p = c->producer;
[trafficserver] branch 9.0.x updated: Make Http2ClientSession inactive on EOS event
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new f2b828d Make Http2ClientSession inactive on EOS event f2b828d is described below commit f2b828d39b94c33b963845f7fcf23d8982664e4c Author: Masaori Koshiba AuthorDate: Tue Jun 9 16:04:16 2020 +0900 Make Http2ClientSession inactive on EOS event (cherry picked from commit e9c3a136bfd5b06178c22b095263eb34673eb657) --- proxy/http2/Http2ClientSession.cc | 3 +++ proxy/http2/Http2ConnectionState.cc | 2 ++ 2 files changed, 5 insertions(+) diff --git a/proxy/http2/Http2ClientSession.cc b/proxy/http2/Http2ClientSession.cc index 2ecfa2e..da44c70 100644 --- a/proxy/http2/Http2ClientSession.cc +++ b/proxy/http2/Http2ClientSession.cc @@ -103,6 +103,9 @@ Http2ClientSession::free() REMEMBER(NO_EVENT, this->recursion) Http2SsnDebug("session free"); + // Don't free active ProxySession + ink_release_assert(is_active() == false); + this->_milestones.mark(Http2SsnMilestone::CLOSE); ink_hrtime total_time = this->_milestones.elapsed(Http2SsnMilestone::OPEN, Http2SsnMilestone::CLOSE); diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc index 3c1654e..ecb8cf4 100644 --- a/proxy/http2/Http2ConnectionState.cc +++ b/proxy/http2/Http2ConnectionState.cc @@ -1403,6 +1403,8 @@ Http2ConnectionState::release_stream() if (total_client_streams_count == 0) { if (fini_received) { +ua_session->clear_session_active(); + // We were shutting down, go ahead and terminate the session // this is a member of Http2ConnectionState and will be freed // when ua_session is destroyed
[trafficserver] branch 8.1.x updated: Make Http2ClientSession inactive on EOS event
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 8.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/8.1.x by this push: new 7d24eef Make Http2ClientSession inactive on EOS event 7d24eef is described below commit 7d24eef07e62263584837ea589caebefd6e38ebb Author: Masaori Koshiba AuthorDate: Tue Jun 9 16:04:16 2020 +0900 Make Http2ClientSession inactive on EOS event (cherry picked from commit e9c3a136bfd5b06178c22b095263eb34673eb657) --- proxy/http2/Http2ClientSession.cc | 3 +++ proxy/http2/Http2ConnectionState.cc | 2 ++ 2 files changed, 5 insertions(+) diff --git a/proxy/http2/Http2ClientSession.cc b/proxy/http2/Http2ClientSession.cc index f575ff3..6d7d3de 100644 --- a/proxy/http2/Http2ClientSession.cc +++ b/proxy/http2/Http2ClientSession.cc @@ -107,6 +107,9 @@ Http2ClientSession::free() REMEMBER(NO_EVENT, this->recursion) Http2SsnDebug("session free"); + // Don't free active ProxySession + ink_release_assert(is_active() == false); + this->_milestones.mark(Http2SsnMilestone::CLOSE); ink_hrtime total_time = this->_milestones.elapsed(Http2SsnMilestone::OPEN, Http2SsnMilestone::CLOSE); diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc index 703feb6..394b299 100644 --- a/proxy/http2/Http2ConnectionState.cc +++ b/proxy/http2/Http2ConnectionState.cc @@ -1383,6 +1383,8 @@ Http2ConnectionState::release_stream(Http2Stream *stream) if (total_client_streams_count == 0) { if (fini_received) { +ua_session->clear_session_active(); + // We were shutting down, go ahead and terminate the session // this is a member of Http2ConnectionState and will be freed // when ua_session is destroyed
[trafficserver] branch 9.0.x updated: Make h2spec test more resiliant by extending timeout (#6891)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 3b0a534 Make h2spec test more resiliant by extending timeout (#6891) 3b0a534 is described below commit 3b0a534f2e57997b25abddb1da451ea0c0e6ddeb Author: Susan Hinrichs AuthorDate: Mon Jun 15 20:58:16 2020 -0500 Make h2spec test more resiliant by extending timeout (#6891) Co-authored-by: Susan Hinrichs (cherry picked from commit bbe03bbf645492e595f9a872ae2e7e22afeedce2) --- tests/gold_tests/h2/h2spec.test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/gold_tests/h2/h2spec.test.py b/tests/gold_tests/h2/h2spec.test.py index 7bb7fd4..c1ff4f0 100644 --- a/tests/gold_tests/h2/h2spec.test.py +++ b/tests/gold_tests/h2/h2spec.test.py @@ -55,8 +55,8 @@ ts.Disk.records_config.update({ 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.client.verify.server': 0, -'proxy.config.diags.debug.enabled': 1, -'proxy.config.diags.debug.tags': 'http2', +'proxy.config.diags.debug.enabled': 0, +'proxy.config.diags.debug.tags': 'http', }) # @@ -67,7 +67,7 @@ ts.Disk.records_config.update({ h2spec_targets = "http2/1 http2/2 http2/3 http2/4 http2/5 http2/6.1 http2/6.2 http2/6.3 http2/6.5 http2/6.6 http2/6.7 http2/6.8 http2/7 http2/8 hpack" test_run = Test.AddTestRun() -test_run.Processes.Default.Command = 'h2spec {0} -t -k -p {1}'.format(h2spec_targets, ts.Variables.ssl_port) +test_run.Processes.Default.Command = 'h2spec {0} -t -k --timeout 10 -p {1}'.format(h2spec_targets, ts.Variables.ssl_port) test_run.Processes.Default.ReturnCode = 0 test_run.Processes.Default.StartBefore(httpbin, ready=When.PortOpen(httpbin.Variables.Port)) test_run.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port))
[trafficserver] branch 9.0.x updated: set sni_name with remapped origin name if sni_policy is not the default value (#6898)
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new a787a22 set sni_name with remapped origin name if sni_policy is not the default value (#6898) a787a22 is described below commit a787a223359bede7bf63e1ab287d7fc20317fdfd Author: Xin Li <33378623+whut...@users.noreply.github.com> AuthorDate: Mon Jun 15 18:59:49 2020 -0700 set sni_name with remapped origin name if sni_policy is not the default value (#6898) Co-authored-by: xinli1 (cherry picked from commit 6f564de71cda287b5b79b89d1c8c327a24ba5472) --- proxy/http/HttpSM.cc | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index 0065775..127c06e 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -4749,11 +4749,13 @@ HttpSM::get_outbound_sni() const { const char *sni_name = nullptr; size_t len = 0; - if (t_state.txn_conf->ssl_client_sni_policy != nullptr && !strcmp(t_state.txn_conf->ssl_client_sni_policy, "remap")) { + if (t_state.txn_conf->ssl_client_sni_policy == nullptr || !strcmp(t_state.txn_conf->ssl_client_sni_policy, "host")) { +// By default the host header field value is used for the SNI. +sni_name = t_state.hdr_info.server_request.host_get(reinterpret_cast()); + } else { +// If other is specified, like "remap" and "verify_with_name_source", the remapped origin name is used for the SNI value len = strlen(t_state.server_info.name); sni_name = t_state.server_info.name; - } else { // Do the default of host header for SNI -sni_name = t_state.hdr_info.server_request.host_get(reinterpret_cast()); } return std::string_view(sni_name, len); }
[trafficserver] branch 9.0.x updated: Fix compiler issue with ICC 19.1
This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git The following commit(s) were added to refs/heads/9.0.x by this push: new 1ee1c0c Fix compiler issue with ICC 19.1 1ee1c0c is described below commit 1ee1c0c4f09db7b387c81b0c75fa985b4580662f Author: Unknown AuthorDate: Fri Jun 12 15:06:30 2020 -0500 Fix compiler issue with ICC 19.1 Current drop of these compiler with core dump the compiler on this line. This fixes the issues. The compiler teams have been notified and claim it will be fixed in upcoming drop (cherry picked from commit 538ad5dc2402dde4f98a237fddcb44dfed09b343) --- proxy/hdrs/MIME.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/hdrs/MIME.cc b/proxy/hdrs/MIME.cc index 75cab70..a3024dc 100644 --- a/proxy/hdrs/MIME.cc +++ b/proxy/hdrs/MIME.cc @@ -2383,7 +2383,7 @@ MIMEScanner::get(TextView , TextView , bool _shares_input, b } else { // This really should be an error (spec doesn't permit lone CR) but the regression tests // require it. -this->append({_CR, 1}); +this->append(TextView(_CR, 1)); // This is to fix a core dump of the icc 19.1 compiler when {_CR, 1} is used m_state = MIME_PARSE_INSIDE; } break;