You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2018/09/05 14:57:36 UTC

[trafficserver] branch 8.0.x updated: Log Collation - Memory leak when all hosts are down.

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

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


The following commit(s) were added to refs/heads/8.0.x by this push:
     new 266aebf  Log Collation - Memory leak when all hosts are down.
266aebf is described below

commit 266aebf18b0b4a2ffc752a4833659831c56b0989
Author: Peter Chou <pb...@labs.att.com>
AuthorDate: Mon Jul 30 23:33:16 2018 -0700

    Log Collation - Memory leak when all hosts are down.
    
    This patch is intended to address issue #2416. When all hosts are down, the log output is supposed to be
    written to an orphan file. The LogHost::orphan_write_and_try_delete() is supposed to consume a LogBuffer
    reference count, but it only does so in one branch of the if/then/else instead of both. This patch
    fixes this issue.
    
    (cherry picked from commit 3bf26d17e6bb8aed07de5681a9bdc75e59b72294)
---
 proxy/logging/LogHost.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxy/logging/LogHost.cc b/proxy/logging/LogHost.cc
index 2cffd68..a55c52a 100644
--- a/proxy/logging/LogHost.cc
+++ b/proxy/logging/LogHost.cc
@@ -302,8 +302,8 @@ LogHost::orphan_write_and_try_delete(LogBuffer *&lb)
     m_orphan_file->preproc_and_try_delete(lb);
   } else {
     Debug("log-host", "logging space exhausted, failed to write orphan file, drop(%" PRIu32 ") bytes", lb->header()->byte_count);
-    LogBuffer::destroy(lb);
   }
+  LogBuffer::destroy(lb);
 }
 
 void