<div dir="ltr"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Date: Mon, 15 Sep 2008 12:29:55 -0400 (EDT)<br>
From: <a href="mailto:nagios@donsbox.com">nagios@donsbox.com</a><br>
Subject: [Nagios-users] intermittent CGI failure<br>
To: <a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>
Message-ID:<br>
        <<a href="mailto:b53b1fb899386775dbf845218f6f2b64.squirrel@www.donsbox.com">b53b1fb899386775dbf845218f6f2b64.squirrel@www.donsbox.com</a>><br>
Content-Type: text/plain;charset=iso-8859-1<br>
<br>
Installed 3.0.3 from source on OpenBSD 4.3 (sparc64).  Everything works,<br>
but every so often the CGI's will fail.<br>
<br>
e.g. If I refresh, say, status.cgi?host=all 10 times in a row, it'll fail<br>
at least once or twice.<br>
<br>
I can reproduce using both Apache and nginx.<br>
<br>
Here's Apache error log snippet: "Premature end of script headers:<br>
/var/www/nagios/cgi-bin/status.cgi"<br>
<br>
Here's nginx error log snippet: "upstream closed prematurely FastCGI<br>
stdout while reading response header from upstream"<br>
<br>
Familiar issue to anyone?  Next steps to debug?<br>
<br>
I cannot reproduce by running, manually from command shell:<br>
export REQUEST_METHOD=GET<br>
./status.cgi<br>
<br>
</blockquote></div>I think, i've got the same problem. When this error appeared in apache logs i saw this <br><br><font color="#000099" size="2"><font>*** glibc detected *** ./status.cgi: free(): invalid pointer: 0x082b0f48 ***<br>
======= Backtrace: =========<br>/lib/libc.so.6[0x62d38c]<br>/lib/libc.so.6(__libc_free+0x6b)[0x62d88f]<br>./status.cgi[0x806dd96]<br>./status.cgi[0x80548f1]<br>./status.cgi[0x80490d9]<br>/lib/libc.so.6(__libc_start_main+0xb3)[0x5e2dfb]<br>
./status.cgi[0x8048fc1]<br>======= Memory map: ========<br>00323000-0032b000 r-xp 00000000 08:02 524290     /lib/libgcc_s-3.2.3-20040701.so.1<br>0032b000-0032c000 rw-p 00007000 08:02 524290     /lib/libgcc_s-3.2.3-20040701.so.1<br>
005ce000-006e5000 r-xp 00000000 08:02 524300     /lib/<a href="http://libc-2.3.5.so">libc-2.3.5.so</a><br>006e5000-006e7000 r--p 00117000 08:02 524300     /lib/<a href="http://libc-2.3.5.so">libc-2.3.5.so</a><br>006e7000-006e9000 rw-p 00119000 08:02 524300     /lib/<a href="http://libc-2.3.5.so">libc-2.3.5.so</a><br>
006e9000-006eb000 rw-p 00000000 00:00 0<br>008b0000-008c8000 r-xp 00000000 08:02 524412     /lib/<a href="http://ld-2.3.5.so">ld-2.3.5.so</a><br>008c8000-008c9000 r--p 00018000 08:02 524412     /lib/<a href="http://ld-2.3.5.so">ld-2.3.5.so</a><br>
008c9000-008ca000 rw-p 00019000 08:02 524412     /lib/<a href="http://ld-2.3.5.so">ld-2.3.5.so</a><br>08048000-0807d000 r-xp 00000000 08:02 30162979   /usr/local/nagios/sbin/status.cgi<br>0807d000-0807e000 rw-p 00035000 08:02 30162979   /usr/local/nagios/sbin/status.cgi<br>
0807e000-08081000 rw-p 00000000 00:00 0<br>0820e000-084c3000 rw-p 00000000 00:00 0<br>b7100000-b7121000 rw-p 00088000 00:00 0<br>b7121000-b7200000 ---p 000a9000 00:00 0<br>b7284000-b75e9000 r--p 00000000 08:02 1327896    /usr/local/nagios/var/status.dat<br>
b75e9000-b75eb000 rw-p 00000000 00:00 0<br>bfff9000-c0000000 rw-p ffffb000 00:00 0<br>Aborted</font></font><br></div>