Page 1 of 2

Segfault when Acknowledging

Posted: Tue Jun 17, 2014 12:10 pm
by BanditBBS
Trying to acknowledge an issue and get a blank screen and this in messages:

Code: Select all

Jun 17 13:08:14 svwdcnagios02 kernel: cmd.cgi[2660]: segfault at 38 ip 0000000000411b50 sp 00007fff2c4e26c0 error 4 in cmd.cgi[400000+44000]
Jun 17 13:08:14 svwdcnagios02 abrt[2690]: Saved core dump of pid 2660 (/usr/local/nagios/sbin/cmd.cgi) to /var/spool/abrt/ccpp-2014-06-17-13:08:14-2660 (20365312 bytes)
Mass acknowledge works fine.

EDIT: further testing seems to only have the issue with hosts and not services

Re: Segfault when Acknowledging

Posted: Tue Jun 17, 2014 12:23 pm
by sreinhardt
We are aware and working on it as I type this out.

Re: Segfault when Acknowledging

Posted: Tue Jun 17, 2014 12:28 pm
by BanditBBS
sreinhardt wrote:We are aware and working on it as I type this out.
Thanks Spenser!

When completed, if it is just one simple file I'd really love the fix besides a bug fix release as I am gone in a day and no time to update all the servers to yet another new version :(

Re: Segfault when Acknowledging

Posted: Tue Jun 17, 2014 12:51 pm
by abrist
Could you PM me the core dump and the cmd.cgi file? It may help speed up Eric[1]'s bug hunt.

Re: Segfault when Acknowledging

Posted: Tue Jun 17, 2014 12:58 pm
by BanditBBS
The dump is 2.48MB, too large for forum attachment in PM!

EDIT: Also, forget what I said about hosts only. I must have gotten lucky with the service I ack'd as now I can't ack service anymore.
EDIT 2: My other servers are working fine, seems to be just this one

Re: Segfault when Acknowledging

Posted: Tue Jun 17, 2014 2:00 pm
by abrist
Send them through email if you could (you should have my email address).

Re: Segfault when Acknowledging

Posted: Tue Jun 17, 2014 2:02 pm
by BanditBBS
abrist wrote:Send them through email if you could (you should have my email address).
Done, let me know if you do not receive them!

tell this Eric guy to hurry 8-)

Re: Segfault when Acknowledging

Posted: Tue Jun 17, 2014 2:35 pm
by BanditBBS
Just to throw this out there for troubleshooting. I have been restarting my XI a bunch of times today applying changes. As I stated, it did work for services at one point but then not again. Perhaps restarting the process screws up and/or fixes it every so often. i am going to apply changes a few times to test and will report back.

EDIT: Nope, but it seems randomly I am able to acknowledge some hosts and some services

Re: Segfault when Acknowledging

Posted: Tue Jun 17, 2014 9:50 pm
by BanditBBS
Just to update anyone watching this......

It is a bug in core 4.0.6 that has been fixed in core 4.0.7. So looks like next XI version(1.2) is needed. Luckily this is only affecting one of my servers and that's because I use a bunch of escalations(for on-call rotation handling) and that's causing the bug. Here's hoping Scott and Eric can somehow hook me up tomorrow :)

Re: Segfault when Acknowledging

Posted: Wed Jun 18, 2014 9:09 am
by scottwilkerson
Ok, here is a short list of steps to upgrade to Core 4.0.7 on XI 20141.1 before the next XI release, this assumes you have the old installation directory in /tmp/nagiosxi

Code: Select all

cd /tmp/nagiosxi/subcomponents/nagioscore/
wget http://sourceforge.net/projects/nagios/files/nagios-4.x/nagios-4.0.7/nagios-4.0.7.tar.gz/download -O nagios-4.0.7.tar.gz
Then edit line 5 of /tmp/nagiosxi/subcomponents/nagioscore/upgrade to read

Code: Select all

pkgname="nagios-4.0.7"
Then, edit /tmp/nagiosxi/subcomponents/nagioscore/apply-patches to only contain the following (removing about 5 lines)

Code: Select all

#!/bin/sh -e

pkgname="$1"

# Apply our patches
echo "Applying Nagios XI patches to Nagios Core..."


# Custom CGIs
cp patches/cgi/*.c "$pkgname/cgi"

# Makefile mods for Custom CGIs
patch "$pkgname/cgi/Makefile.in" < patches/cgi-makefile.patch
Then, from in the /tmp/nagiosxi/subcomponents/nagioscore/ directory

Code: Select all

./upgrade