<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>Locking problems?: Nagios 1.1 on Redhat Enterprise ES 2.1</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2 FACE="Arial">I've recently built the latest nagios for deployment on Redhat Enterprise ES 2.1 and our testing has shown two serious problems:</FONT></P>

<P><FONT SIZE=2 FACE="Arial">1) a simple-to-fix html rendering problem</FONT>
<BR><FONT SIZE=2 FACE="Arial">2) a perplexing lock-contention issue</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">HTML rendering problem</FONT>
<BR><FONT SIZE=2 FACE="Arial">The first was easy to fix.  There seems to be a problem with with the html generation in "tac.cgi" where a few lines are incorrectly commented out using (/*  */) which breaks the html. . </FONT></P>

<P><FONT SIZE=2 FACE="Arial">You can easily take out those comment lines by deleting lines 1223 and 1226 (/* and */) from tac.cgi - removing those fixed the broken HTML for us.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Onto the more serious problem. . . </FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Lock Contention?</FONT>
<BR><FONT SIZE=2 FACE="Arial">After running the daemon for a while it looks like we get a number process stuck in some wait loop:</FONT>
<BR><FONT SIZE=2 FACE="Arial">nagios   22304     1  0 16:01 ?        00:00:00 /usr/bin/nagios -d /etc/nagios/n</FONT>
<BR><FONT SIZE=2 FACE="Arial">nagios   22311     1  0 16:01 ?        00:00:00 /usr/bin/nagios -d /etc/nagios/n</FONT>
<BR><FONT SIZE=2 FACE="Arial">nagios   22315     1  0 16:01 ?        00:00:00 /usr/bin/nagios -d /etc/nagios/n</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">[etc. etc. into the hundreds over time]</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Doing an strace of one of these processes, I see that ease of the processes is hanging on a write:</FONT>
<BR><FONT SIZE=2 FACE="Arial">strace -p 22075</FONT>
<BR><FONT SIZE=2 FACE="Arial">write(6, "<hostname-deleted-for-security-purposes>\0\0\0"..., 504</FONT>
<BR><FONT SIZE=2 FACE="Arial">(Of course the "hostname deleted" is really one of our hostnames)</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">It seems that write contention is causing terrific problems for us and will mean that we can't roll out this version. . . </FONT></P>

<P><FONT SIZE=2 FACE="Arial">It would be very hard to blame the hardware for this. . . the disk is very fast and we are using ext3 (both of which are 'better' than our old test machine running 1.0 which didn't have these issues). . . </FONT></P>

<P><FONT SIZE=2 FACE="Arial">Is anyone aware of a quick fix for this?  Is anyone else seeing this process build-up?</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Thanks in advance,</FONT>
<BR><FONT SIZE=2 FACE="Arial">Keith</FONT>
</P>

</BODY>
</HTML>