-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
log/diag: Support diagnostic stacktraces on SIGSEGV #6243
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit adds support for enabling libunwind -- a library that can be used to display stack information. Use --enable-libunwind to check for availability. A diagnostic message is displayed if libunwind cannot be found as requested.
This commit adds an error code for the diagnostic code used for SIGSEGV diagnostic messages.
This commit adds a configuration setting to enable a stack trace message if Suricata receives a SIGSEGV.
This commit adds a signal handler for SIGSEGV when configured. The signal handler emits a one line stack trace using SCLogError. The intent is to provide diagnostic information in deployments where core files are not possible. The diagnostic message is from the offending thread and includes the stack trace; each frame includes the symbol + offset.
Codecov Report
@@ Coverage Diff @@
## master #6243 +/- ##
==========================================
- Coverage 76.94% 76.94% -0.01%
==========================================
Files 611 611
Lines 186146 186147 +1
==========================================
- Hits 143236 143224 -12
- Misses 42910 42923 +13
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
Continued in #6309 |
thomasjwinter
added a commit
to thomasjwinter/suricata
that referenced
this pull request
Aug 8, 2023
thomasjwinter
added a commit
to thomasjwinter/suricata
that referenced
this pull request
Aug 31, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Continuation of #6201
This PR supports configuring Suricata to emit a one-line diagnostic message containing a stacktrace when SIGSEGV occurs.
Requires
--enable-libunwind
to configure supportlibunwind
must be available for configurationlogging.sigsegv-stacktrace
)Example output:
Link to redmine ticket: 4526
Describe changes:
on
when configured with--enable-libunwind
.#suricata-verify-pr:
#suricata-verify-repo:
#suricata-verify-branch:
#suricata-update-pr:
#suricata-update-repo:
#suricata-update-branch:
#libhtp-pr:
#libhtp-repo:
#libhtp-branch: