httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Plüm, Rüdiger, Vodafone Group <ruediger.pl...@vodafone.com>
Subject RE: Balancers (file based SHMs) and restart issue (Windows only?)
Date Wed, 02 Sep 2015 09:48:09 GMT


> -----Original Message-----
> From: Yann Ylavic [mailto:ylavic.dev@gmail.com]
> Sent: Mittwoch, 2. September 2015 11:08
> To: dev@httpd.apache.org
> Subject: Balancers (file based SHMs) and restart issue (Windows only?)
> 
> Re PR 58024.
> 
> AIUI, balancers (and members) SHM slots are destroyed (and the
> underlying base file removed) with pconf before restarting and then
> re-created after (according to the new configuration, eg. number of
> balancers/members, be it the same or not).
> Persisted slots are saved in their own file (with the .persit suffix),
> and reused (copied) only if the configuration did not change in
> between.
> (@Jim, I see now how this is better than attaching ;)
> 
> This works well on Unixes, but on Windows files can't be removed
> (unlinked) while any process/thread hold an HANDLE on it, hence until
> all the children have exited...
> Thus, since the SHM files still exist on restart, the balancer code
> tries to attach them instead of re-creating, and issues the checks on
> the existing size to fit the reloaded configuration, and fail should
> should any balancer/member be added or removed => PR 58024.
> 
> BTW, even on Unixes there is a race on these files between the main
> process and the children, or the children themselves from different
> "generation".

Really? I would think that these are files with the same name but different inodes and hence
different.

Regards

Rüdiger


Mime
View raw message