-
Notifications
You must be signed in to change notification settings - Fork 838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove multiple debug functions for producing backtraces. #13469
Conversation
Instead, make CrashHandler::logBacktrace() available to write a backtrace of the current thread into the log. Calling this function should work on Linux, because there we build with libunwind support by default, and this can produce backtraces even for our static builds using libmusl (in contrast to `backtrace()`, which is a no-op there). In addition, using `CrashHandler::logBacktrace()` does not require to compile with the `-DUSE_BACKTRACE=On` CMake option. It is likely that the change made by this PR removes backtrace capabilities for MacOS and Windows, but it looks like those were only enabled previously when compiling with `-DUSE_BACKTRACE=On`, which is unlikely. To finalize this PR, we need to decide whether these potential restrictions are ok for us, and if so, we can also remove the `USE_BACKTRACE` CMake variable and remove the one or two remainders that use the `ARNAGODB_ENABLE_BACKTRACE` define in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add stack trace logging to invalid handle value - without its completely useless.
Else LGTM.
Tests blue |
As discussed with @mpoeter and @dothebart offline, we will not add Windows stacktrace logging, but instead we will try to leverage minidumps in case an unhandled exception flies by. |
Scope & Purpose
Remove multiple debug functions for producing backtraces.
Instead, make CrashHandler::logBacktrace() available to write a
backtrace of the current thread into the log.
Calling this function should work on Linux, because there we build with
libunwind support by default, and this can produce backtraces even for
our static builds using libmusl (in contrast to
backtrace()
, which isa no-op there). In addition, using
CrashHandler::logBacktrace()
doesnot require to compile with the
-DUSE_BACKTRACE=On
CMake option.It is likely that the change made by this PR removes backtrace
capabilities for MacOS and Windows, but it looks like those were only
enabled previously when compiling with
-DUSE_BACKTRACE=On
, which isunlikely.
In addition, this PR removes the
USE_BACKTRACE
CMake variable and alsothe internal
ARANGODB_ENABLE_BACKTRACE
define that was enabled by thisvariable.
The
USE_BACKTRACE
CMake option does not seem to have been documented.So this is likely an internal change only.
Backports:
Testing & Verification
Link to Jenkins PR run:
http://172.16.10.101:8080/view/PR/job/arangodb-matrix-pr/13816/