-
Notifications
You must be signed in to change notification settings - Fork 19
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
ISSUE-1083: panic handler for router crashes #1084
Conversation
Part 1: very basic stack unwind + register dump to stderr on crash To be done: - unit test! - display mappings for link shared libraries (e.g. proton...) - document how to use the output for crash debug Adds requirement for libunwind library.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1084 +/- ##
=======================================
Coverage ? 78.62%
=======================================
Files ? 237
Lines ? 60042
Branches ? 5607
=======================================
Hits ? 47206
Misses ? 10220
Partials ? 2616
Flags with carried forward coverage won't be shown. Click here to find out more.
|
router/src/panic.c
Outdated
{ | ||
if (getenv("SKUPPER_ROUTER_DISABLE_PANIC_HANDLER") == 0) { | ||
struct sigaction sa = { | ||
// use SA_RESETHAND since if the stack unwind fails the default signal handler (coredump) will be invoked |
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.
the comment is incorrect, no? the default signal handler will be invoked at the end regardless of whether stack unwind failed or not. Which is the desired behavior, so that when we can get coredump, we do also get coredump, in addition to stack unwind.
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.
Good catch - removed.
Sample output: `*** SKUPPER-ROUTER FATAL ERROR *** Backtrace: [1] IP: 0x00000000006e2e6b (skrouterd + 0x00000000006e2e6b) [2] IP: 0x00000000006b6072 (skrouterd + 0x00000000006b6072) [3] IP: 0x00000000005dfb05 (skrouterd + 0x00000000005dfb05) [4] IP: 0x00007fabbc8ae12d (/lib64/libc.so.6 + 0x000000000008b12d) [5] IP: 0x00007fabbc92fbc0 (/lib64/libc.so.6 + 0x000000000010cbc0) *** END *** |
Very basic stack unwind + register dump to stderr on crash (cherry picked from commit fcee563)
Very basic stack unwind + register dump to stderr on crash
@@ -846,7 +846,7 @@ jobs: | |||
dnf config-manager --set-enabled powertools | |||
dnf install --setopt=tsflags=nodocs --setopt=install_weak_deps=False -y epel-release 'dnf-command(copr)' 'dnf-command(builddep)' | |||
dnf copr enable -y clime/rpkg-util | |||
dnf install --setopt=tsflags=nodocs --setopt=install_weak_deps=False -y git rpkg | |||
dnf install --setopt=tsflags=nodocs --setopt=install_weak_deps=False -y git rpkg libunwind-devel |
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.
libunwind-devel
here is redundant, it is installed by dnf builddep
when it scans the spec file.
Part 1: very basic stack unwind + register dump to stderr on crash
To be done:
Adds requirement for libunwind library.