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

dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new a73b28789d Fix memory leak by calling  in mem hook (#12708)
a73b28789d is described below

commit a73b28789de104f5e760df5d1ca5bab9c7b66f58
Author: Xinyi Zou <zouxiny...@gmail.com>
AuthorDate: Sun Sep 18 10:04:15 2022 +0800

    Fix memory leak by calling  in mem hook (#12708)
    
    After the consume mem tracker exceeds the mem limit in the mem hook, the 
boost stacktrace will be printed. A query/load will only be printed once, and 
the process tracker will only be printed once per second.
    
    After the process memory reaches the upper limit, the boost stacktrace will 
be printed every second. The observed phenomena are as follows:
    
    After query/load is canceled, the memory increases instantly;
    tcmalloc profile total physical memory is less than perf process memory;
    The process mem tracker is smaller than the perf process memory;
---
 be/src/runtime/memory/mem_tracker_limiter.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/be/src/runtime/memory/mem_tracker_limiter.cpp 
b/be/src/runtime/memory/mem_tracker_limiter.cpp
index e09e1493c8..a1fdb60f9d 100644
--- a/be/src/runtime/memory/mem_tracker_limiter.cpp
+++ b/be/src/runtime/memory/mem_tracker_limiter.cpp
@@ -213,7 +213,8 @@ void MemTrackerLimiter::print_log_usage(const std::string& 
msg) {
         } else {
             detail += "\n" + log_usage();
         }
-        detail += "\n" + 
boost::stacktrace::to_string(boost::stacktrace::stacktrace());
+        // TODO: memory leak by calling `boost::stacktrace` in mem hook
+        // detail += "\n" + 
boost::stacktrace::to_string(boost::stacktrace::stacktrace());
         LOG(WARNING) << detail;
         _print_log_usage = false;
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to