[Nagiosplug-devel] [ nagiosplug-Bugs-1107524 ] check_ping, segfault, popen problems

SourceForge.net noreply at sourceforge.net
Thu Feb 3 16:09:17 CET 2005


Bugs item #1107524, was opened at 2005-01-22 22:39
Message generated for change (Comment added) made by tonvoon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1107524&group_id=29880

Category: Parsing problem
Group: CVS
Status: Open
Resolution: None
>Priority: 7
Submitted By: gprosser (gprosser)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_ping, segfault, popen problems

Initial Comment:
check_ping.c, including the current version in CVS,
installs a signal handler for SIGALRM called
popen_timeout_alarm_handler on startup, and sets an
alarm to interrupt it later so the plugin doesn't run
forever.

However, the popen handler is set to kill the processes
that was opened when an ALRM hits, and in certain
circumstances (DNS timeouts) the plugin is still
resolving the hostname of the target and has not yet
opened a command.

This leads to SIGSEGV when popen_timeout_(etc) tries to
dereference a null pointer looking for what process to
kill.

I would suggest a safer benign signal handler to handle
DNS timeouts be installed in the first case, and then
changed just before the process is actually popened to
the current handler.

Thanks.

-gnp

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

>Comment By: Ton Voon (tonvoon)
Date: 2005-02-04 00:05

Message:
Logged In: YES 
user_id=664364

Raising priority on this one. Cannot reproduce myself. Any test cases 
available?

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

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




More information about the Devel mailing list