You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Behlendorf <br...@organic.com> on 1997/01/24 09:50:51 UTC

[PATCH] memsetting sigaction

mgyger@itr.ch:
> Some members of struct sigaction are not initialized, causing an error
> return status of sigaction.


Adrian Filipi-Martin <ad...@virginia.edu> writes:
When starting httpd or restarting it with a SIGHUP, the following is logged 
to the error_log:

[Wed Jan  8 14:21:03 1997] created shared memory segment #4206
[Wed Jan  8 14:21:03 1997] sigaction(SIGSEGV): Invalid argument
[Wed Jan  8 14:21:03 1997] sigaction(SIGBUS): Invalid argument
[Wed Jan  8 14:21:03 1997] Server configured -- resuming normal operations

(Note that the shared memory segment message is only present when the daemon
is send a SIGHUP signal to restart it.)

These error messages do not appear to have any real effect upon the operation
of the server.  I expect they would not matter until it has either a bus or 
a segment fault.

In any case, I looked at the source with gdb and the fact that a sigaction 
structure is not initialized completely in http_main.c seems to be the culprit.
In any case a small patch is included below that does the required clearing of
the sigaction structure and fixes the problem.
>How-To-Repeat:
Either start the server or restart it with a SIGHUP.  Then hope that you 
do not get lucky and have the aforementioned sigaction structure placed in a 
block of zeroed out memory.
>Fix:
I suspect that invalid arguments are being passed to the sigaction() functions.



--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com  www.apache.org  hyperreal.com  http://www.organic.com/JOBS