--=_67863cp1ps3m
Content-Type: text/plain;
charset=ISO-8859-1;
DelSp="Yes";
format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Quoting Ethan Galstad :
> Herbert Straub wrote:
>> Quoting [email protected]:
>>
>>> Hello developers,
>>> Hendrik supposed me to build the nagios source without the option '-O2'.=
I
>>> have done this, but nothing changed. The SIGSEGV also happens in Version
>>> 3.0a2 without the '-O2' option.
>>> Output from gdb:
>>> #0 0xb7e43e84 in mallopt () from /lib/tls/libc.so.6
>>> #1 0xb7e42dcb in free () from /lib/tls/libc.so.6
>>> #2 0x080774ac in my_free ()
>>> #3 0x08073d4f in clear_volatile_macros ()
>>> #4 0x0806c92c in log_host_event ()
>>> #5 0x080706a8 in handle_host_state ()
>>> #6 0x0805bfa8 in process_host_check_result_3x ()
>>> #7 0x0805bc42 in handle_async_host_check_result_3x ()
>>> #8 0x08057533 in reap_check_results ()
>>> #9 0x0806ac7d in handle_timed_event ()
>>> #10 0x0806aaea in event_execution_loop ()
>>> #11 0x080554f1 in main ()
>>
>>
>> I think this is a problem with glibc6 version (2.3.2.ds1-22sa) in
>> debian sarge and the NPTL. I confirm the situation on a Debian Sarge
>> machine. I got no errors with the following workaround:
>>
>> export LD_ASSUME_KERNEL=3D2.4.15
>> /usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg
>>
>> The /debian/FAQ from glibc6 contains the following section:
>> The application should continue to run for now, but when the warning mess=
age
>> is printed use of the NPTL threading library, and other new kernel-2.6
>> features, it's worth trying to set environment variable =20
>> LD_ASSUME_KERNEL=3D2.4.1
>> (switch to LinuxThreads instead of NPTL).
>>
>> Debian using glibc-2.3 Ubuntu 2.4, RHEL5 glib-2.5. Perhaps this could
>> be a reason? See the debian changelog of glibc6:
>> http://packages.debian.org/changelogs/p ... 5-0exp6/c=
hangelog
>>
>
> This could be a bug in glibc6 or NPTL, but it could also be a problem
> with the thread code in Nagios. Perhaps in the signal handling or
> thread startup or state information? I'm not sure where the problem
> might lie, or where to go for pointers on finding the source of the
> problem. Any threading gurus care to lend a hand?
>
Yesterday I installed Ubuntu Warty, which using the same glibc and =20
NPTL version as Debian Sarge and i can reproduce the segmentation =20
fault error. Next, I tried to configure nagios with --enable-DEBUGALL =20
and see one warning and one error in the compile phase:
utils.c: In function ?get_raw_command_line2?:
utils.c
utils.c
utils.c
--> Ok
utils.c: In function ?generate_check_stats?:
utils.c:5984: warning: incompatible implicit declaration of built-in =20
function ?round?
utils.c:5989: warning: incompatible implicit declaration of built-in =20
function ?round?
--> this could the reason for the segfault!
After patching nagios (see patch attachment), i could'nt reproduce the =20
segfault under Debian Sarge! Looks good! I compared the 2.8 with 3.0 =20
and see, that 2.8 doesn't contains the round function call.
For me, the details of this phenomenon are unclear, but one hint can =20
give this little test programm:
#include
#include
main()
{
int test1; int test2; int test3;
test1=3D5; test2=3D10;
test3=3D(int)floor((double)(test1*test2));
printf("test3: %d\n", test3);
test3=3D(int)round((double)(test1*test2));
printf("test3: %d\n", test3);
}
Debian Sarge:
$ gcc -o test_round -lm test_round.c
$ ./test_round
test3: 50
test3: 0
Ubuntu Edgy:
$ gcc -o test_round -lm test_round.c
test_round.c: In function ?main?:
test_round.c:11: warning: incompatible implicit declaration of =20
built-in function ?round?
$ ./test_round
./test_round
test3: 50
test3: 50
Anyway, please test the situation and report the situation.
Best Regards
Herbert Straub
--=_67
...[email truncated]...
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]