diff --git a/be/src/common/status.h b/be/src/common/status.h index 5c8a56c65fdb4d3..f61ed84192b5c7d 100644 --- a/be/src/common/status.h +++ b/be/src/common/status.h @@ -396,7 +396,7 @@ class [[nodiscard]] Status { } #ifdef ENABLE_STACKTRACE if (stacktrace && capture_stacktrace(code)) { - status._err_msg->_stack = get_stack_trace(4); + status._err_msg->_stack = get_stack_trace(1); LOG(WARNING) << "meet error status: " << status; // may print too many stacks. } #endif diff --git a/be/src/util/stack_util.h b/be/src/util/stack_util.h index d32f97a0abae001..65b2d8bad2f5a92 100644 --- a/be/src/util/stack_util.h +++ b/be/src/util/stack_util.h @@ -29,8 +29,7 @@ namespace doris { // boost: 1000 times cost 1min, has line numbers, but has memory leak. // glibc: 1000 times cost 1min, no line numbers, unresolved backtrace symbol. // libunwind: cost is negligible, has line numbers. -// Delete the first three frame pointers, which are inside the StackTrace. -std::string get_stack_trace(int start_pointers_index = 3); +std::string get_stack_trace(int start_pointers_index = 0); // Note: there is a libc bug that causes this not to work on 64 bit machines // for recursive calls.