httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: new watchdog module
Date Thu, 05 Feb 2009 11:03:54 GMT
Plüm, Rüdiger, VF-Group wrote:
>  
> 
>> -----Ursprüngliche Nachricht-----
>> Von: Mladen Turk  
>> Gesendet: Donnerstag, 5. Februar 2009 06:36
>> An: dev@httpd.apache.org
>> Betreff: Re: new watchdog module
>>
>> Ruediger Pluem wrote:
>>>>> I would like to commit this module to trunk.
>>>>> It's a watchdog module that creates a worker threads
>>>>> either in parent, child via an API, and it's not for
>>>>> standalone use, but for other module usage like
>>>>> mod_heartbeat, probably mod_jk and others that need
>>>>> maintenance threads.
>>>> It seems scary to me to have the MPM parent on Unix 
>> forking children while a
>>>> separate thread in that same process is running arbitrary 
>> code.  Surprising
>>>> problems can crop up when this arbitrary code is in 
>> certain states (maybe a
>>>> mutex gets inherited in held state by the new MPM child?)
>>> This seems to be a very valid concern to me. Plus in the 
>> parent it runs with root
>>> privileges and we should minimize the code that runs with 
>> these privileges, even
>>> more so as an author of code that uses the watchdog may not 
>> really be aware that
>>> its code is running under root (in contrast to people who 
>> develop modules like
>>> mod_unixd and mod_privileges).
>>>
>> The parent process watchdog is supposed to be used only for core
>> features that affect all children's and can be done without
>> requiring graceful restart.
> 
> Why can these tasks not be performed by a dedicated child?
>

The simplest one would be graceful restart.
Child processing the requests would set some shared
memory flag and parent watchdog thread could be
used to monitor the shared memory field status,
and signal the mpm to do a graceful restart.


>> Making the module running as root is very easy and
>> average 'Joe the Developer' can already use such a feature
>> with or without this option.
> 
> That was not my point. The current ways for a developer to do this
> IMHO point him more obviously to the fact that his code is running
> under root than the watchdog API would do.
>

Well, I don't under estimate module developers.
This is just an helper API, and it makes things more
robust at the end.


Regards
-- 
^(TM)

Mime
View raw message