Segfault when Acknowledging

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Segfault when Acknowledging

Post 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
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Segfault when Acknowledging

Post by sreinhardt »

We are aware and working on it as I type this out.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Segfault when Acknowledging

Post 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 :(
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Segfault when Acknowledging

Post by abrist »

Could you PM me the core dump and the cmd.cgi file? It may help speed up Eric[1]'s bug hunt.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Segfault when Acknowledging

Post 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
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Segfault when Acknowledging

Post by abrist »

Send them through email if you could (you should have my email address).
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Segfault when Acknowledging

Post 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-)
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Segfault when Acknowledging

Post 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
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Segfault when Acknowledging

Post 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 :)
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Segfault when Acknowledging

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked