glibc and valgrind memcheck errors (cgi segmentation fault)

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

glibc and valgrind memcheck errors (cgi segmentation fault)

Post by Guest »

This is a multi-part message in MIME format.

------_=_NextPart_001_01C9A9AE.3047C22C
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

We found something in the status.dat file where plugin output containing
a windows UNC followed by the letter n was treated as a newline
character. It seems to have thrown off the cgi file when it attempted to
read status.dat in the bottom of the strace:

plugin_output=3DThe message '-1073737725' for application
'AdsmClientService' could not be formatted using library(ies): ''. The
log entry contains the following replacement strings:'ANS4005E Error
processing '\
=20
long_plugin_output=3Dtnode02\\d$\\Archive\\solutions\\solutions_tlog_2009=
0
3151900.TRN': file not found' ** EventID: 4099\n

the plugin_output line SHOULD read:
plugin_output=3DThe message '-1073737725' for application
'AdsmClientService' could not be formatted using library(ies): ''. The
log entry contains the following replacement strings:'ANS4005E Error
processing
'\ntnode02\\d$\\Archive\\solutions\\solutions_tlog_200903151900.TRN':
file not found' ** EventID: 4099\n


This seems to be a bug with encoding either with nrpe or with nagios.

Regards,

Justin Amburn


This email is confidential and intended for its recipient only. If you
have received this in error please delete it and notify Justin Amburn.


_____________________________________________
From: Justin Amburn=20
Sent: Friday, March 20, 2009 2:19 PM
To: Justin Amburn; '[email protected]'
Subject: RE: glibc and valgrind memcheck errors (cgi segmentation fault)
with nagios 3.06 on Redhat 4.7 x86

Here is an strace of the segmentation fault, if this is of any use to
anyone:

execve("/usr/local/nagios/sbin/status.cgi",
["/usr/local/nagios/sbin/status.cg"...], [/* 30 vars */]) =3D 0
uname({sys=3D"Linux", node=3D"nagios01", ...}) =3D 0
brk(0) =3D 0x9f3a000
access("/etc/ld.so.preload", R_OK) =3D -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) =3D 3
fstat64(3, {st_mode=3DS_IFREG|0644, st_size=3D63655, ...}) =3D 0
old_mmap(NULL, 63655, PROT_READ, MAP_PRIVATE, 3, 0) =3D 0xb7f39000
close(3) =3D 0
open("/usr/lib/libglib-2.0.so.0", O_RDONLY) =3D 3
read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\327A\0004\0\0\0"...,
512) =3D 512
fstat64(3, {st_mode=3DS_IFREG|0755, st_size=3D505200, ...}) =3D 0
old_mmap(0x411000, 503692, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =3D 0x411000
old_mmap(0x48b000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7a000) =3D 0x48b000
close(3) =3D 0
open("/lib/tls/libc.so.6", O_RDONLY) =3D 3
read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\276$\0004\0\0\0"...
, 512) =3D 512
fstat64(3, {st_mode=3DS_IFREG|0755, st_size=3D1547540, ...}) =3D 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) =3D 0xb7f38000
old_mmap(0x237000, 1240284, PROT_READ|PROT_EXEC,
MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =3D 0x237000
old_mmap(0x360000, 16384, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x129000) =3D 0x360000
old_mmap(0x364000, 7388, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) =3D 0x364000
close(3) =3D 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) =3D 0xb7f37000
mprotect(0x360000, 8192, PROT_READ) =3D 0
mprotect(0x233000, 4096, PROT_READ) =3D 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7f376c0,
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0,
limit_in_pages:1, seg_not_present:0, useable:1}) =3D 0
munmap(0xb7f39000, 63655) =3D 0
time(NULL) =3D 1237583737
brk(0) =3D 0x9f3a000
brk(0x9f5b000) =3D 0x9f5b000
open("/usr/local/nagios/etc/cgi.cfg", O_RDONLY) =3D 3
fstat64(3, {st_mode=3DS_IFREG|0664, st_size=3D9593, ...}) =3D 0
mmap2(NULL, 9593, PROT_READ, MAP_PRIVATE, 3, 0) =3D 0xb7

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: ustin Amburn=2
Locked