[Nagiosplug-devel] [ nagiosplug-Patches-764745 ] check_procs SIGSEGV fix for some Solaris systems w/ zombies

SourceForge.net noreply at sourceforge.net
Thu Jul 3 09:50:11 CEST 2003


Patches item #764745, was opened at 2003-07-02 18:22
Message generated for change (Comment added) made by tonvoon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=764745&group_id=29880

Category: Bugfix
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Alexander Matey (amatey)
>Assigned to: Ton Voon (tonvoon)
Summary: check_procs SIGSEGV fix for some Solaris systems w/ zombies

Initial Comment:
check_procs (current CVS rev 1.5) dies with
segmentation fault on _some_ of my Solaris systems. I
was seeing it on both Solaris 7 and 8 with different
patchlevels.

Running check_procs under gdb revealed that in all
cases it died on check_procs.c:211 because asprintf()
call on previous line returned procargs == NULL. The
process entry in ps output that caused this was always
a zombie process with input_buffer + pos pointing to
0x0 instead of '\n' which the code assumed to be there.

Attached patch corrects this behavior by not making
this assumption. This may help other OSes besides Solaris.

----------------------------------------------------------------------

>Comment By: Ton Voon (tonvoon)
Date: 2003-07-03 17:49

Message:
Logged In: YES 
user_id=664364

Thanks for the patch. I can't seem to get the problem on my 
SunOS 5.6, but you do say it is a bit erratic.

My guess is that the ps command is not returning a carriage 
return or is missing the field for the comm column. However, 
the patch doesn't seem to cause a problem on my Solaris 
server, so I think it is safe to add it in.

Committed to check_procs.c v1.16.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=764745&group_id=29880




More information about the Devel mailing list