Skip to content

Commit

Permalink
5
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyiZzz committed Aug 28, 2024
1 parent c8463e4 commit d66b94c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions be/src/runtime/memory/mem_tracker_limiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ MemTrackerLimiter::~MemTrackerLimiter() {
"mem tracker not equal to 0 when mem tracker destruct, this usually means that "
"memory tracking is inaccurate and SCOPED_ATTACH_TASK and "
"SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER are not used correctly. "
"If the log is truncated, search for `address sanitizer` in the be.INFO log to see "
"If the log is truncated, search for `Address Sanitizer` in the be.INFO log to see "
"more information."
"1. For query and load, memory leaks may have occurred, it is expected that the query "
"mem tracker will be bound to the thread context using SCOPED_ATTACH_TASK and "
Expand Down Expand Up @@ -206,15 +206,17 @@ std::string MemTrackerLimiter::print_address_sanitizers() {
detail += "\n memory not be freed:";
for (const auto& it : _address_sanitizers) {
auto msg = fmt::format(
"\n [Address Sanitizer] buf not be freed: {}, size {}, strack trace: {}",
it.first, it.second.size, it.second.stack_trace);
"\n [Address Sanitizer] buf not be freed, mem tracker label: {}, consumption: "
"{}, peak consumption: {}, buf: {}, size {}, strack trace: {}",
_label, _consumption->current_value(), _consumption->peak_value(), it.first,
it.second.size, it.second.stack_trace);
LOG(INFO) << msg;
detail += msg;
// detail += msg;
}
detail += "\n incorrect memory alloc and free:";
for (const auto& err_msg : _error_address_sanitizers) {
LOG(INFO) << err_msg;
detail += fmt::format("\n {}", err_msg);
// detail += fmt::format("\n {}", err_msg);
}
return detail;
}
Expand Down

0 comments on commit d66b94c

Please sign in to comment.