2.0a1 SIGSEGV

Tom DE BLENDE (GCC) Tom.DeBlende at dhl.com
Fri Sep 3 13:16:53 CEST 2004


Dear devs,

I'm sorry for the previous noise. Thanks to Mr. Hopcroft, I managed to 
get some useful info out of gdb. Or at least it is useful for you. Here 
is the output:

[root at gcclo77 bin]# gdb nagios
GNU gdb Red Hat Linux (6.0post-0.20040223.20rh)
Copyright 2004 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-redhat-linux-gnu"...(no debugging 
symbols found)...Using host libthread_db library 
"/lib/tls/libthread_db.so.1".

(gdb) set args /usr/local/nagios/etc/nagios.cfg
(gdb) r
Starting program: /usr/local/nagios/bin/nagios 
/usr/local/nagios/etc/nagios.cfg
(no debugging symbols found)...(no debugging symbols found)...(no 
debugging symbols found)...(no debugging symbols found)...[Thread 
debugging using libthread_db enabled]
[New Thread -1220216704 (LWP 26021)]
(no debugging symbols found)...(no debugging symbols found)...(no 
debugging symbols found)...(no debugging symbols found)...
Nagios 2.0a1
Copyright (c) 1999-2004 Ethan Galstad (nagios at nagios.org)
Last Modified: 11-18-2003
License: GPL

(no debugging symbols found)...Nagios 2.0a1 starting... (PID=26021)
[New Thread -1220326480 (LWP 26038)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1220216704 (LWP 26021)]
0xb747ea6a in __strtol_internal () from /lib/tls/libc.so.6
(gdb) list
No symbol table is loaded.  Use the "file" command.
(gdb) info stack
#0  0xb747ea6a in __strtol_internal () from /lib/tls/libc.so.6
#1  0x0806c49a in xrddefault_read_state_information ()
#2  0x08069d37 in read_initial_state_information ()
#3  0x08052413 in main ()
(gdb) info stack
#0  0xb747ea6a in __strtol_internal () from /lib/tls/libc.so.6
#1  0x0806c49a in xrddefault_read_state_information ()
#2  0x08069d37 in read_initial_state_information ()
#3  0x08052413 in main ()
(gdb) print deviceId
No symbol table is loaded.  Use the "file" command.
(gdb) bt full
#0  0xb747ea6a in __strtol_internal () from /lib/tls/libc.so.6
No symbol table info available.
#1  0x0806c49a in xrddefault_read_state_information ()
No symbol table info available.
#2  0x08069d37 in read_initial_state_information ()
No symbol table info available.
#3  0x08052413 in main ()
No symbol table info available.
(gdb)

Can anyone point me to a way forward now?

Thanks,
Tom

Tom DE BLENDE (GCC) wrote:

> Hi Stanley,
> CC List
>
> I'm sorry if I don't understand what you want me to do. But if I 
> understand correctly, you want me to recompile Nagios with -g option 
> to gcc. But if I check the files you pointed me to, it looks like it 
> allready was the case:
>
> [root at gcclo77 nagios-cvs]# grep CFLAGS Makefile
> CFLAGS=-g -O2 -DHAVE_CONFIG_H
> [root at gcclo77 nagios-cvs]# grep CFLAGS Makefile.in
> CFLAGS=@CFLAGS@ @DEFS@
>
> Environment is Centos 3.1 fully patched (RHEL 3):
>
> [root at gcclo77 nagios-cvs]# gcc -v
> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man 
> --infodir=/usr/share/info --enable-shared --enable-threads=posix 
> --disable-checking --with-system-zlib --enable-__cxa_atexit 
> --host=i386-redhat-linux
> Thread model: posix
> gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-39)
> [root at gcclo77 nagios-cvs]# uname -a
> Linux gcclo77 2.4.21-15.0.4.ELsmp #1 SMP Wed Aug 4 00:52:17 EDT 2004 
> i686 i686 i386 GNU/Linux
> [root at gcclo77 nagios-cvs]# cat /proc/version
> Linux version 2.4.21-15.0.4.ELsmp (skvidal at el) (gcc version 3.2.3 
> 20030502 (Red Hat Linux 3.2.3-34)) #1 SMP Wed Aug 4 00:52:17 EDT 2004
>
> Kind regards,
> Tom
>
> Stanley Hopcroft wrote:
>
>> Dear Tom,
>>
>> I am writing to thank you for your letter and say,
>>
>> On Fri, Sep 03, 2004 at 10:25:30AM +0200, Tom DE BLENDE (GCC) wrote:
>>  
>>
>> '(no debugging symbols found)' is fatal since it means gdb can't 
>> relate the fault in the text (binary) with the source.
>>
>> It means that Nag was compiled without debugging -g option to gcc.
>>
>> In the 1.x series this is defined in the CFLAGS in the Makefile (and 
>> should be Makefile.in).
>>
>> If you stripped the binary (good idea normally), recompile and try 
>> again.
>>
>> Otherwise try putting a -g in the CFLAGs of Makefile.in (prob create 
>> a backup), recompile and gdb again (you don't need DEBUG options to 
>> configure nor do you need to install the new binary).
>>
>> It's prob not a bad thing to rip out any optimiser options (-O2 etc) 
>> if you stll get a SEGV and try that also.
>>
>> I know this is a lot to ask but it's the only way.
>>
>> Best also to post
>>
>> OS name and version
>> gcc -v
>>
>> to Nag-devel along with the bt and the configure options.
>>
>>  
>>
>>> [root at gcclo77 etc]# gdb ../bin/nagios
>>> GNU gdb Red Hat Linux (6.0post-0.20040223.20rh)
>>> Copyright 2004 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-redhat-linux-gnu"...(no debugging 
>>> symbols found)...Using host libthread_db library 
>>> "/lib/tls/libthread_db.so.1".
>>>
>>>   
>>
>> r> (gdb) set args -d /usr/local/nagios/etc/nagios
>>  
>>
>>> (gdb) r
>>> Starting program: /usr/local/nagios/bin/nagios -d 
>>> /usr/local/nagios/etc/nagios
>>> (no debugging symbols found)...(no debugging symbols found)...(no 
>>> debugging symbols found)...(no debugging symbols found)...[Thread 
>>> debugging using libthread_db enabled]
>>> [New Thread -1220216704 (LWP 20093)]
>>> (no debugging symbols found)...(no debugging symbols found)...(no 
>>> debugging symbols found)...(no debugging symbols found)...(no 
>>> debugging symbols found)...
>>> Program exited with code 0376.
>>> (gdb) bt
>>> No stack.
>>> (gdb)
>>>
>>>   
>>
>>
>>
>>
>> Nice job. Sorry the information wasn't up to it.
>>
>> I can't help with the prob; my focus is (poorly admittedly) with the 
>> ePN support in 2.x.
>>
>> BTW SEGV ==> BUG so you are helping significantly debug the 2.x series.
>>
>> Yours sincerely.
>>
>>  
>>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
>



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click




More information about the Developers mailing list