[icinga-checkins] icinga.org: icinga2/support/2.5: Docs: Fix core dump instructions for daemon with SUID bit set

git at icinga.org git at icinga.org
Mon Nov 7 13:49:26 CET 2016


Module: icinga2
Branch: support/2.5
Commit: 4206cbc15eac2b9980ab0ebd710c4a7a500f3471
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=4206cbc15eac2b9980ab0ebd710c4a7a500f3471

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Thu Sep  8 08:30:03 2016 +0200

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 0bbbda3..0bdbacd 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`.
 
 ### <a id="development-debug-core-dump-format"></a> 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
 
 ### <a id="development-debug-core-dump-analysis"></a> 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.<PID>
+    (gdb) bt
 



More information about the icinga-checkins mailing list