Skip to content

Commit

Permalink
3
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyiZzz committed Oct 8, 2023
1 parent d16714b commit b2c8e81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion be/src/common/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions be/src/util/stack_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b2c8e81

Please sign in to comment.