Nagios 3.0.6 and 3.1.2 SIGSEGV on FreeBSD 8 in get_next_comment_by_host
Scott Lambert
lambert at lambertfam.org
Wed Sep 23 03:02:12 CEST 2009
On Thu, Sep 17, 2009 at 11:14:41PM -0500, Scott Lambert wrote:
> I have installed Nagios 3.0.6 using the ports collection on a FreeBSD
> 8-BETA2 box.
>
> Nagios runs great until someone acknowleges a down host, (adding
> a comment). Later, when the host comes back up, Nagios exits on
> a SIGSEGV. It seems to only happen when we have retention data
> (retention.dat) showing the host down. If we just restart Nagios
> without removing the retention.dat file, it SIGSEGV's the next time
> it tries to mark the host up. I upgraded to the nagios-devel devel
> (Nagios 3.1.2) and we have the same problem.
Stefan Bethke replied to my post to the freebsd-current mailing list.
He believes that Nagios has a "use after free" bug evidenced by finding
the canary values the FreeBSD malloc sets while using gdb to debug the
problem.
http://archive.netbsd.se/?ml=nagios-devel&a=2009-07&t=11196612
Turning off the malloc debug argument "J" by linking /etc/malloc.conf to
"j" appears to have caused Nagios to stop dieing on SIGSEGV.
http://www.freebsd.org/cgi/man.cgi?query=malloc
As I understand it, the fact that Nagios works without the debug option
set for malloc means Nagios is still trying to use previously free()d,
realloc()d or rallocf()d memory but the values in the memory are benign
enough to allow it to keep running. But, I am just an admin, not a
developer, so could be getting that all wrong.
Anyway, FreeBSD 8 is up to release candidate status and should now have
malloc debugging turned off by default now. People trying with current
FreeBSD 8 code should not see the problem. People on FreeBSD 9 will
though. ;-)
--
Scott Lambert KC5MLE Unix SysAdmin
lambert at lambertfam.org
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list