From 38ac7b2070fabaab24282633b2c4f57e0785ccee Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 8 Sep 2016 08:30:03 +0200 Subject: [PATCH] Docs: Fix core dump instructions for daemon with SUID bit set refs #12648 --- doc/20-development.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/doc/20-development.md b/doc/20-development.md index b0590e4a8..3e0ea545c 100644 --- a/doc/20-development.md +++ b/doc/20-development.md @@ -279,16 +279,22 @@ Verify that the Icinga 2 process core file size limit is set to `unlimited`. ### Core Dump Kernel Format -Adjust the coredump kernel format and file location. +The Icinga 2 daemon runs with the SUID bit set. Therefore you need +to explicitly enable core dumps for SUID on Linux. - vim /etc/sysctl.conf + sysctl -w fs.suid_dumpable=1 - kernel.core_pattern = /var/lib/cores/core.%e.%p +Adjust the coredump kernel format and file location on Linux: - sysctl -p + sysctl -w kernel.core_pattern=/var/lib/cores/core.%e.%p - mkdir /var/lib/cores + install -m 1777 -d /var/lib/cores +MacOS: + + sysctl -w kern.corefile=/cores/core.%P + + chmod 777 /cores ### Core Dump Analysis @@ -305,4 +311,8 @@ Simple test case for a `SIGSEGV` simulation with `sleep`: (gdb) bt rm /var/lib/cores/core.sleep.* +Analyzing Icinga 2: + + gdb /usr/lib64/icinga2/sbin/icinga2 core.icinga2. + (gdb) bt -- 2.40.0