You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Yann Ylavic <yl...@gmail.com> on 2016/03/02 17:13:37 UTC

BalancerPersist "relaxable" checks (was: svn commit: r1733283 - /httpd/httpd/branches/2.4.x/STATUS)

re: mod_proxy_hcheck backport

>       ylavic: Looks like the changes on struct proxy_worker_shared would break
>               startup with "BalancerPersist on" due to the strict checks on
>               the sizes of existing slotmems (slotmem_create/attach)?
> +     jim: Yes, that is right (re: breakage)... this would be noted at
> +          release.

Maybe we could have a "BalancerPersist try" option which would
remove/reset the existing persistent files/SHMs when the sizes change
(either corrupted files or this kind of upgrade change).

That could save the admin from having to locate the relevent
files/SHMs (on disk/ipc/dev) and remove them, which is not obvious
when you have multiple httpd instances running and only some of them
need this administrative cleanage (the others keep running), since the
names of the files/SHMs is not "configurable" (the ID based on
servername/line/.. is finally ap_proxy_hashfunc()ed for practical
reasons) and can hardly be related to an httpd instance...

Re: BalancerPersist "relaxable" checks (was: svn commit: r1733283 - /httpd/httpd/branches/2.4.x/STATUS)

Posted by Yann Ylavic <yl...@gmail.com>.
On Wed, Mar 2, 2016 at 11:47 PM, Yann Ylavic <yl...@gmail.com> wrote:
> On Wed, Mar 2, 2016 at 8:08 PM, Jim Jagielski <ji...@jagunet.com> wrote:
>>
>> Hmmm... iirc, if there is a mismatch, the old files are
>> automagically removed.
>
> You are right, I was still influenced by PR58024 triggering AH02599
> (painful fix), but that was due to the missing unlink() semantic on
> Windows...
>
> I still think AH02599 can be triggered on unclean shutdown, with name
> based SHMs when the cleanup is not called (this has nothing to do with
> mod_proxy_hcheck, though).
>
> Couldn't we use anonymous SHMs for slotmem_shm(s) since we
> create/destroy them for each restart anyway?
> I don't think the apr_shm_attach() path in slotmem_create() should
> ever be hit (thanks to the caching of in 'globallistmem' of the
> process' created SHMs, and other processes should use slotmem_attach()
> anyway).
> Hmm, I may miss some Windows MPM thingy again...

Nevermind, we still need to attach() in children processes!

Re: BalancerPersist "relaxable" checks (was: svn commit: r1733283 - /httpd/httpd/branches/2.4.x/STATUS)

Posted by Yann Ylavic <yl...@gmail.com>.
On Wed, Mar 2, 2016 at 8:08 PM, Jim Jagielski <ji...@jagunet.com> wrote:
>
> Hmmm... iirc, if there is a mismatch, the old files are
> automagically removed.

You are right, I was still influenced by PR58024 triggering AH02599
(painful fix), but that was due to the missing unlink() semantic on
Windows...

I still think AH02599 can be triggered on unclean shutdown, with name
based SHMs when the cleanup is not called (this has nothing to do with
mod_proxy_hcheck, though).

Couldn't we use anonymous SHMs for slotmem_shm(s) since we
create/destroy them for each restart anyway?
I don't think the apr_shm_attach() path in slotmem_create() should
ever be hit (thanks to the caching of in 'globallistmem' of the
process' created SHMs, and other processes should use slotmem_attach()
anyway).
Hmm, I may miss some Windows MPM thingy again...

Re: BalancerPersist "relaxable" checks (was: svn commit: r1733283 - /httpd/httpd/branches/2.4.x/STATUS)

Posted by Jim Jagielski <ji...@jaguNET.com>.
> On Mar 2, 2016, at 11:13 AM, Yann Ylavic <yl...@gmail.com> wrote:
> 
> re: mod_proxy_hcheck backport
> 
>>      ylavic: Looks like the changes on struct proxy_worker_shared would break
>>              startup with "BalancerPersist on" due to the strict checks on
>>              the sizes of existing slotmems (slotmem_create/attach)?
>> +     jim: Yes, that is right (re: breakage)... this would be noted at
>> +          release.
> 
> Maybe we could have a "BalancerPersist try" option which would
> remove/reset the existing persistent files/SHMs when the sizes change
> (either corrupted files or this kind of upgrade change).
> 
> That could save the admin from having to locate the relevent
> files/SHMs (on disk/ipc/dev) and remove them, which is not obvious
> when you have multiple httpd instances running and only some of them
> need this administrative cleanage (the others keep running), since the
> names of the files/SHMs is not "configurable" (the ID based on
> servername/line/.. is finally ap_proxy_hashfunc()ed for practical
> reasons) and can hardly be related to an httpd instance...

Hmmm... iirc, if there is a mismatch, the old files are
automagically removed.