SEGV in 2.0b1 (tarball from Nagios.ORG) - at exit(result): FreeBSD 4.9-RELEASE/pthread lib.

Stanley Hopcroft Stanley.Hopcroft at IPAustralia.Gov.AU
Wed Dec 29 13:19:20 CET 2004


Dear Folks,

Is this a case of get another OS ?

tsitc> gdb -c nagios.core nagios
GNU gdb 4.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you 
are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for 
details.
This GDB was configured as "i386-unknown-freebsd"...Deprecated bfd_read 
called at 
/usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c 
line 2627 in elfstab_build_psymtabs
Deprecated bfd_read called at 
/usr/src/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c 
line 933 in fill_symbuf

Core was generated by `nagios'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libperl.so.3...done.
Reading symbols from /usr/lib/libm.so.2...done.
Reading symbols from /usr/lib/libc.so.4...done.
Reading symbols from /usr/lib/libcrypt.so.2...done.
Reading symbols from /usr/lib/libc_r.so.4...done.
Reading symbols from /usr/lib/libutil.so.3...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0  0x281ecda4 in .cerror () from /usr/lib/libc.so.4
(gdb) bt
#0  0x281ecda4 in .cerror () from /usr/lib/libc.so.4
#1  0x2827dcbf in _exit () from /usr/lib/libc_r.so.4
#2  0x281ecca3 in exit () from /usr/lib/libc.so.4
#3  0x805369e in main (argc=3, argv=0xbfbffb78, env=0xbfbffb88) at 
nagios.c:433
(gdb) b 433
Breakpoint 1 at 0x8053695: file nagios.c, line 433.
(gdb) l 420,440
420                                     printf("     Check your 
configuration file(s) to ensure that they contain valid\n");
421                                     printf("     directives and data 
defintions.  If you are upgrading from a previous\n");
422                                     printf("     version of Nagios, 
you should be aware that some variables/definitions\n");
423                                     printf("     may have been 
removed or modified in this version.  Make sure to read\n");
424                                     printf("     the HTML 
documentation regarding the config files, as well as the\n");
425                                     printf("     'Whats New' section 
to find out what has changed.\n\n");
426                                     }
427                             }
428     
429                     /* clean up after ourselves */
430                     cleanup();
431     
432                     /* exit */
433                     exit(result);
434                     }
435     
436     
437             /* we're just testing scheduling... */
438             else if(test_scheduling==TRUE){
439     
440                     /* reset program variables */
(gdb) set args -v /usr/local/nagios-2.0b1/etc/nagios.cfg
(gdb) r
Starting program: /usr/home/anwsmh/build/nagios-2.0b1/base/nagios -v 
/usr/local/nagios-2.0b1/etc/nagios.cfg

Nagios 2.0b1
Copyright (c) 1999-2004 Ethan Galstad (nagios at nagios.org)
Last Modified: 12-15-2005
License: GPL

Reading configuration data...

Running pre-flight check on configuration data...

Checking services...
        Checked 459 services.
Checking hosts...
        Checked 196 hosts.
Checking host groups...
        Checked 18 host groups.
Checking service groups...
        Checked 0 service groups.
Checking contacts...
        Checked 51 contacts.
Checking contact groups...
Warning: Contact group 'hpa-bne-admins' is not used in any 
hostgroup/service definitions or host/hostgroup/service escalations!
Warning: Contact group 'internet-admins' is not used in any 
hostgroup/service definitions or host/hostgroup/service escalations!
Warning: Contact group 'lan-managers' is not used in any 
hostgroup/service definitions or host/hostgroup/service escalations!
Warning: Contact group 'wan-managers' is not used in any 
hostgroup/service definitions or host/hostgroup/service escalations!
        Checked 23 contact groups.
Checking service escalations...
        Checked 3 service escalations.
Checking service dependencies...
        Checked 66 service dependencies.
Checking host escalations...
        Checked 0 host escalations.
Checking host dependencies...
        Checked 0 host dependencies.
Checking commands...
        Checked 130 commands.
Checking time periods...
        Checked 17 time periods.
Checking extended host info definitions...
        Checked 0 extended host info definitions.
Checking extended service info definitions...
        Checked 0 extended service info definitions.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 4
Total Errors:   0

Things look okay - No serious problems were detected during the 
pre-flight check

Breakpoint 1, main (argc=3, argv=0xbfbffb40, env=0xbfbffb50) at 
nagios.c:433
433                     exit(result);
(gdb) p result
$1 = 0
(gdb) s

Program received signal SIGSEGV, Segmentation fault.
0x281ecda4 in .cerror () from /usr/lib/libc.so.4
(gdb)

./configure  --enable-embedded-perl --with-perlcache 
--with-gd-lib=/usr/local/lib -with-gd-inc=/usr/local/include 
--prefix=/usr/local/nagios-2.0b1

Reconfiguring without embedded Perl support, removes the SEGV.

At a guess this is a conflict between an old (5.005) unthreaded Perl and 
the threaded Nagios application.

Unfortunately

1 4.x FreeBSD ships with a 5.005 system Perl (although 5.6 and
5.8 are in the ports).

2 4.x FreeBSD Perl ports are built without thread support.

I will try this on other FreeBSD systems with more contemporary Perls.

This may be another aspect of the threading problems on FreeBSD 4.x 
systems (ntop is another application using POSIX threads that 
struggles on FreeBSD).

Yours sincerely.


 -- 
Stanley Hopcroft

IP Australia
Ph: (02) 6283 3189  Fax: (02) 6281 1353
PO Box 200 Woden  ACT 2606
http://www.ipaustralia.gov.au
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: disclaimer.txt
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20041229/6806d311/attachment.txt>


More information about the Developers mailing list