[Pkg-nagios-devel] Bug#859582: check-mk-livestatus: nagios3 segfaults when check-mk-livestatus plugin is enabled

Haw Loeung haw.loeung at canonical.com
Tue Apr 4 23:31:32 UTC 2017


Package: check-mk-livestatus
Version: 1.2.6p12-1
Severity: normal

Dear Maintainer,

With check-mk-livestatus plugin enabled, nagios3 segfaults regularly, mostly
during logrotation. It seems the cause is due to the shipped out
nagios/downtime.h with check-mk differing from the one in nagios3 (defined
struct scheduled_downtime_struct).

Reports from Ubuntu users seeing this is in LP#1372284.

I've included a patch which I think fixes it but may need mangling for
inclusion:

diff -u check-mk-1.2.6p12/debian/patches/00list check-mk-1.2.6p12/debian/patches/00list
--- check-mk-1.2.6p12/debian/patches/00list
+++ check-mk-1.2.6p12/debian/patches/00list
@@ -2,0 +3 @@
+03_fix_livestatus_downtime
only in patch2:
unchanged:
--- check-mk-1.2.6p12.orig/debian/patches/03_fix_livestatus_downtime.dpatch
+++ check-mk-1.2.6p12/debian/patches/03_fix_livestatus_downtime.dpatch
@@ -0,0 +1,23 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_fix_livestatus_downtime.dpatch by Haw Loeung <haw.loeung at canonical.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix livestatus scheduled_downtime_struct - LP:1372284
+
+ at DPATCH@
+
+--- pkg-check_mk/setup.sh      2017-02-17 16:22:29.871869640 +1100
++++ pkg-check_mk/setup.sh      2017-02-17 16:30:22.019025547 +1100
+@@ -569,6 +569,12 @@ compile_livestatus ()
+    tar xvzf $SRCDIR/livestatus.tar.gz -C $D
+    sed -i '/Boston/ a\
+ #include <cstddef>' livestatus.src/src/TableStatus.cc livestatus.src/src/TableLog.cc
++   sed -i '/time_t start_time;/ a\
++      time_t flex_downtime_start;' livestatus.src/nagios/downtime.h
++   sed -i '/int is_in_effect;/d' livestatus.src/nagios/downtime.h
++   sed -i '/unsigned long downtime_id;/ a\
++      int is_in_effect;; \
++      int     start_notification_sent;' livestatus.src/nagios/downtime.h
+    pushd $D
+
+    local CONFIGURE_OPTS=""


-- System Information:
Debian Release: stretch/sid
  APT prefers xenial-updates
  APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 'xenial')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0-66-lowlatency (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.utf8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages check-mk-livestatus depends on:
ii  libc6       2.23-0ubuntu7
ii  libgcc1     1:6.0.1-0ubuntu1
ii  libstdc++6  5.4.0-6ubuntu1~16.04.4

Versions of packages check-mk-livestatus recommends:
pn  check-mk-doc  <none>

Versions of packages check-mk-livestatus suggests:
pn  xinetd  <none>

-- no debconf information



More information about the Pkg-nagios-devel mailing list