summaryrefslogtreecommitdiffstats
path: root/lib/sigevent.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sigevent.c')
-rw-r--r--lib/sigevent.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/sigevent.c b/lib/sigevent.c
index 06f80db..3e69f28 100644
--- a/lib/sigevent.c
+++ b/lib/sigevent.c
@@ -240,7 +240,17 @@ core_handler(int signo, siginfo_t *siginfo, void *context)
/* dump memory stats on core */
log_memstats(stderr, "core_handler");
- zlog_tls_buffer_fini();
+ /*
+ * This is a buffer flush because FRR is going down
+ * hard. This is especially important if the crash
+ * was caused by a memory operation and if we call
+ * zlog_tls_buffer_fini() then it has memory
+ * operations as well. This will cause the
+ * core dump to not happen. BAD MOJO
+ * So this is intentional, let's try to flush
+ * what we can and let the crash happen.
+ */
+ zlog_tls_buffer_flush();
/* give the kernel a chance to generate a coredump */
sigaddset(&sigset, signo);