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 2025/08/20 15:31:17 UTC

(trafficserver) branch 10.1.x updated (c85bb2f07c -> 97f791f2a4)

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

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


    from c85bb2f07c These two plugins depends on libswoc (#12454)
     new bad17dcc50 Retry connect if server closes before receiving response (#12446)
     new 97f791f2a4 Fix a crash due to unsatisfied precondition (#12449)

The 2 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/api/InkAPITest.cc         | 8 +++++---
 src/iocore/cache/CacheTest.cc | 3 ++-
 src/proxy/http/HttpSM.cc      | 8 +++++---
 3 files changed, 12 insertions(+), 7 deletions(-)


(trafficserver) 02/02: Fix a crash due to unsatisfied precondition (#12449)

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

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

commit 97f791f2a4623ae9ac218e460400c69b00964622
Author: Chris McFarlen <ch...@mcfarlen.us>
AuthorDate: Mon Aug 18 11:55:38 2025 -0500

    Fix a crash due to unsatisfied precondition (#12449)
    
    * Fix a crash due to unsatisfied precondition
    
    * Check for dummy port before failing
    
    (cherry picked from commit f1870950be554fceb40e100eb073fd3bc6cefbbf)
---
 src/api/InkAPITest.cc         | 8 +++++---
 src/iocore/cache/CacheTest.cc | 3 ++-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/api/InkAPITest.cc b/src/api/InkAPITest.cc
index d174fc6a13..b0467e71bc 100644
--- a/src/api/InkAPITest.cc
+++ b/src/api/InkAPITest.cc
@@ -917,9 +917,11 @@ synserver_vc_accept(TSCont contp, TSEvent event, void *data)
   TSAssert(s->magic == MAGIC_ALIVE);
 
   if (event == TS_EVENT_NET_ACCEPT_FAILED) {
-    Warning("Synserver failed to bind to port %d.", ntohs(s->accept_port));
-    ink_release_assert(!"Synserver must be able to bind to a port, check system netstat");
-    Dbg(dbg_ctl_SockServer, "%s: NET_ACCEPT_FAILED", __func__);
+    if (s && s->accept_port != SYNSERVER_DUMMY_PORT) {
+      Warning("Synserver failed to bind to port %d.", ntohs(s->accept_port));
+      ink_release_assert(!"Synserver must be able to bind to a port, check system netstat");
+      Dbg(dbg_ctl_SockServer, "%s: NET_ACCEPT_FAILED", __func__);
+    }
     return TS_EVENT_IMMEDIATE;
   }
 
diff --git a/src/iocore/cache/CacheTest.cc b/src/iocore/cache/CacheTest.cc
index 0cbf0df6cb..492dd74597 100644
--- a/src/iocore/cache/CacheTest.cc
+++ b/src/iocore/cache/CacheTest.cc
@@ -449,7 +449,8 @@ REGRESSION_TEST(cache_disk_replacement_stability)(RegressionTest *t, int level,
 
   *pstatus = REGRESSION_TEST_INPROGRESS;
 
-  disk.num_errors = 0;
+  disk.num_errors       = 0;
+  disk.hash_base_string = ats_strdup("placeholder");
 
   for (int i = 0; i < MAX_VOLS; ++i) {
     stripes[i]     = new StripeSM{&disk, static_cast<off_t>(DEFAULT_STRIPE_SIZE / STORE_BLOCK_SIZE), 0};


(trafficserver) 01/02: Retry connect if server closes before receiving response (#12446)

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

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

commit bad17dcc50bdeebbf7b6584764656843578292b4
Author: Chris McFarlen <ch...@mcfarlen.us>
AuthorDate: Tue Aug 19 17:55:41 2025 -0500

    Retry connect if server closes before receiving response (#12446)
    
    (cherry picked from commit 324918ebf3b33df3a54cf7ceffc4ab9a2be1b2c4)
---
 src/proxy/http/HttpSM.cc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/proxy/http/HttpSM.cc b/src/proxy/http/HttpSM.cc
index 7c548fa50a..6b0ea6fbaa 100644
--- a/src/proxy/http/HttpSM.cc
+++ b/src/proxy/http/HttpSM.cc
@@ -1925,13 +1925,15 @@ HttpSM::state_read_server_response_header(int event, void *data)
   switch (event) {
   case VC_EVENT_EOS:
     server_entry->eos = true;
+    // If we have received any bytes for this transaction do not retry
+    if (server_response_hdr_bytes > 0) {
+      t_state.current.retry_attempts.maximize(t_state.configured_connect_attempts_max_retries());
+    }
+    break;
 
-  // Fall through
   case VC_EVENT_READ_READY:
   case VC_EVENT_READ_COMPLETE:
     // More data to parse
-    // Got some data, won't retry origin connection on error
-    t_state.current.retry_attempts.maximize(t_state.configured_connect_attempts_max_retries());
     break;
 
   case VC_EVENT_ERROR: