You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by cm...@apache.org on 2026/03/26 17:49:41 UTC

(trafficserver) branch 10.2.x updated (039f09470a -> 08182ac3a3)

This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a change to branch 10.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


    from 039f09470a AGENTS.md has to be at the root of the repo (#13001)
     new b87c872cfc Add HTTP result code to USDT milestone_sm_finish (#12937)
     new a978a9257e Fix possible crashes on OCSP request timeout (#12982)
     new 08182ac3a3 Check valid parent selection hash string (#12985)

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/proxy/FetchSM.cc         |  1 +
 src/proxy/ParentSelection.cc | 37 +++++++++++++++++++++++++++++++++++++
 src/proxy/PluginVC.cc        |  2 ++
 src/proxy/http/HttpSM.cc     | 13 ++++++-------
 4 files changed, 46 insertions(+), 7 deletions(-)


(trafficserver) 02/03: Fix possible crashes on OCSP request timeout (#12982)

Posted by cm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit a978a9257e17811f9791e93c39ae30b05fd498e8
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Tue Mar 24 17:44:14 2026 -0600

    Fix possible crashes on OCSP request timeout (#12982)
    
    * Fix possible crashes on OCSP request timeout
    
    * Acquire lock in do_io_shutdown
    
    (cherry picked from commit 9da84544f092122b209de6236112ac2810cbddde)
---
 src/proxy/FetchSM.cc  | 1 +
 src/proxy/PluginVC.cc | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/proxy/FetchSM.cc b/src/proxy/FetchSM.cc
index 66b800fd6a..11fef0f849 100644
--- a/src/proxy/FetchSM.cc
+++ b/src/proxy/FetchSM.cc
@@ -61,6 +61,7 @@ FetchSM::cleanUp()
   }
 
   if (http_vc) {
+    http_vc->do_io_shutdown(IO_SHUTDOWN_READWRITE);
     http_vc->do_io_close();
   }
   free_MIOBuffer(req_buffer);
diff --git a/src/proxy/PluginVC.cc b/src/proxy/PluginVC.cc
index ab9d684aa6..3caa8dc673 100644
--- a/src/proxy/PluginVC.cc
+++ b/src/proxy/PluginVC.cc
@@ -397,6 +397,8 @@ PluginVC::do_io_shutdown(ShutdownHowTo_t howto)
   ink_assert(!closed);
   ink_assert(magic == PluginVCMagic_t::ALIVE);
 
+  SCOPED_MUTEX_LOCK(lock, mutex, this_ethread());
+
   switch (howto) {
   case IO_SHUTDOWN_READ:
     read_state.shutdown = true;


(trafficserver) 01/03: Add HTTP result code to USDT milestone_sm_finish (#12937)

Posted by cm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit b87c872cfc238e5d57ff4a252ac856a2db51b47d
Author: Mo Chen <mo...@apache.org>
AuthorDate: Wed Mar 25 17:37:17 2026 -0500

    Add HTTP result code to USDT milestone_sm_finish (#12937)
    
    (cherry picked from commit 33800d2f41dba13dfa1085af9ee25404813dd1e2)
---
 src/proxy/http/HttpSM.cc | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/proxy/http/HttpSM.cc b/src/proxy/http/HttpSM.cc
index 6f3bcf6bf9..b40fb8ef74 100644
--- a/src/proxy/http/HttpSM.cc
+++ b/src/proxy/http/HttpSM.cc
@@ -7761,11 +7761,14 @@ HttpSM::kill_this()
 void
 HttpSM::update_stats()
 {
-  ATS_PROBE1(milestone_sm_finish, sm_id);
+  const HTTPStatus status_code =
+    t_state.hdr_info.client_response.valid() ? t_state.hdr_info.client_response.status_get() : HTTPStatus::NONE;
+
+  ATS_PROBE2(milestone_sm_finish, sm_id, static_cast<int>(status_code));
   milestones[TS_MILESTONE_SM_FINISH] = ink_get_hrtime();
 
   if (is_action_tag_set("bad_length_state_dump")) {
-    if (t_state.hdr_info.client_response.valid() && t_state.hdr_info.client_response.status_get() == HTTPStatus::OK) {
+    if (status_code == HTTPStatus::OK) {
       int64_t p_resp_cl = t_state.hdr_info.client_response.get_content_length();
       int64_t resp_size = client_response_body_bytes;
       if (!((p_resp_cl == -1 || p_resp_cl == resp_size || resp_size == 0))) {
@@ -7853,11 +7856,7 @@ HttpSM::update_stats()
         fd = -1;
       }
     }
-    // get the status code, lame that we have to check to see if it is valid or we will assert in the method call
-    int status = 0;
-    if (t_state.hdr_info.client_response.valid()) {
-      status = static_cast<int>(t_state.hdr_info.client_response.status_get());
-    }
+    int  status = static_cast<int>(status_code);
     char client_ip[INET6_ADDRSTRLEN];
     ats_ip_ntop(&t_state.client_info.src_addr, client_ip, sizeof(client_ip));
     Error("[%" PRId64 "] Slow Request: "


(trafficserver) 03/03: Check valid parent selection hash string (#12985)

Posted by cm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 08182ac3a316e76c38bc1bde76cbdad31f00a3fa
Author: Serris Santos <se...@gmail.com>
AuthorDate: Wed Mar 25 11:22:03 2026 -0700

    Check valid parent selection hash string (#12985)
    
    * Check valid parent selection hash string
    
    * add regression test
    
    * off by one
    
    (cherry picked from commit 1252ea460dd5e007c6368b0ecadb5c5fb939b745)
---
 src/proxy/ParentSelection.cc | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/src/proxy/ParentSelection.cc b/src/proxy/ParentSelection.cc
index b282fba7b3..a1bc20452f 100644
--- a/src/proxy/ParentSelection.cc
+++ b/src/proxy/ParentSelection.cc
@@ -32,6 +32,7 @@
 #include "tscore/Regression.h"
 #include "tscore/Tokenizer.h"
 
+#include <string>
 #include <string_view>
 
 using namespace std::literals;
@@ -556,6 +557,11 @@ ParentRecord::ProcessParents(char *val, bool isPrimary)
       errPtr = "Parent string is empty";
       goto MERROR;
     }
+    if (tmp3 && strlen(tmp3 + 1) > MAXDNAME) {
+      errPtr = "Parent hash string is too long";
+      goto MERROR;
+    }
+
     // Update the pRecords
     if (isPrimary) {
       memcpy(this->parents[i].hostname, current, tmp - current);
@@ -1948,6 +1954,37 @@ EXCLUSIVE_REGRESSION_TEST(PARENTSELECTION)(RegressionTest * /* t ATS_UNUSED */,
   FP;
   RE(verify(result, ParentResultType::SPECIFIED, "minnie", 80), 213);
 
+  // Test 214
+  // Overlong hash_string (exceeding MAXDNAME chars) should be rejected by ProcessParents.
+  // The entry is discarded so findParent returns DIRECT.
+  {
+    tbl[0] = '\0';
+    ST(214);
+    std::string long_hash(MAXDNAME + 1, 'a');
+    std::string cfg = "dest_domain=. parent=host:80&" + long_hash + " round_robin=consistent_hash go_direct=true\n";
+    ink_strlcpy(tbl, cfg.c_str(), sizeof(tbl));
+    REBUILD;
+    REINIT;
+    br(request, "overlong.hash.net");
+    FP;
+    RE(verify(result, ParentResultType::DIRECT, nullptr, 0), 214);
+  }
+
+  // Test 215
+  // Max-length hash_string that fits (MAXDNAME chars) should be accepted.
+  {
+    tbl[0] = '\0';
+    ST(215);
+    std::string max_hash(MAXDNAME, 'b');
+    std::string cfg = "dest_domain=. parent=host:80&" + max_hash + " round_robin=consistent_hash go_direct=false\n";
+    ink_strlcpy(tbl, cfg.c_str(), sizeof(tbl));
+    REBUILD;
+    REINIT;
+    br(request, "maxlen.hash.net");
+    FP;
+    RE(verify(result, ParentResultType::SPECIFIED, "host", 80), 215);
+  }
+
   delete request;
   delete result;
   delete params;