Backslashes at the end of plugin_output

Ricardo Maraschini ricardo.maraschini at opservices.com.br
Wed Oct 15 19:58:59 CEST 2008


Hi Ethan,

----- "Ethan Galstad" <nagios at nagios.org> wrote:
> What version of Nagios are you running?  I couldn't replicate a
> segfault
> with 3.0.3

Nagios 3.0.3
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 06-25-2008
License: GPL

To achieve the problem I leave the status.cgi running during all night with the following script:

#!/bin/bash
while [ 1 ];
do
        /usr/local/src/nagios-3.0.3/cgi/status.cgi >>log 2>>log
        if [ $? -ne 0 ]
        then
                cp -Rfp /usr/local/nagios/var/status.log .
                exit;
        fi
        echo -n +
        echo "###################################################" >log
        sleep 2 
done

So, at the morning I have a fresh problematic status.log in my current directory, running with gdb against the copied status.log(to this, I change variable xsddefault_status_log to point to my problematic status.log before start reading):

(gdb) r
Starting program: /usr/local/src/nagios-3.0.3/cgi/status.cgi
[Thread debugging using libthread_db enabled]
[New Thread -1208494400 (LWP 16613)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208494400 (LWP 16613)]
0x009538c6 in _int_free () from /lib/libc.so.6
(gdb) bt
#0  0x009538c6 in _int_free () from /lib/libc.so.6
#1  0x009575b0 in free () from /lib/libc.so.6
#2  0x08073cc1 in xsddefault_read_status_data (config_file=0x807fbee "/usr/local/nagios/etc/cgi.cfg", options=15) at ../xdata/xsddefault.c:776
#3  0x0805992e in read_all_status_data (config_file=0x807fbee "/usr/local/nagios/etc/cgi.cfg", options=15) at cgiutils.c:549
#4  0x08055c03 in main () at status.c:226
(gdb)

Changing the status.c code to print lines during xsddefault_read_status_data() show me that the cgi burns when reading that line pointed in my previous email. How can I help you to solve this?

-rm

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/




More information about the Developers mailing list