You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Vinicius Petrucci <vp...@ic.uff.br> on 2007/09/02 16:57:28 UTC

mod_proxy_balancer

Hi Guys,

I've read Ruediger's patch about preventing mod_proxy_balancer from
overwriting the status of workers when creating a new child process
(http://svn.apache.org/viewcvs?rev=374929&view=rev).

I'm running the latest stable release of Apache (2.2.4) and I think
the same bug is overwriting the lbfactor value to 1 (original
configuration) when creating a new child process. Is it really a bug?
How can I prevent that?

Thanks in advance.

Vinicius

-- 
Vinicius Tavares Petrucci
home page: http://www.ic.uff.br/~vpetrucci

mod_proxy_balancer

Posted by Vinicius Petrucci <vp...@gmail.com>.
[sorry in case of duplicated msgs]

Hi Guys,

I've read Ruediger's patch about preventing mod_proxy_balancer from
overwriting the status of workers when creating a new child process
(http://svn.apache.org/viewcvs?rev=374929&view=rev).

I'm running the latest stable release of Apache (2.2.4) and I think
the same bug is overwriting the lbfactor value to 1 (original
configuration) when creating a new child process. Is it really a bug?
How can I prevent that?

Thanks in advance.

Vinicius

-- 
Vinicius Tavares Petrucci
home page: http://www.ic.uff.br/~vpetrucci

Re: AW: mod_proxy_balancer

Posted by Vinicius Petrucci <vp...@ic.uff.br>.
Tested in 2.2.6 ...

Thanks Rüdiger ! :)

On 11/09/2007, Plüm, Rüdiger, VF-Group <ru...@vodafone.com> wrote:
> Thanks for testing. The attached patch cleanly applies to 2.2.x and also
> contains a backport of r527937.
>
> Regards
>
> Rüdiger
>
> > -----Ursprüngliche Nachricht-----
> > Von: vpetrucci@gmail.com
> > Auftrag von Vinicius Petrucci
> > Gesendet: Dienstag, 11. September 2007 03:11
> > An: dev@httpd.apache.org
> > Betreff: Re: AW: mod_proxy_balancer
> >
> >
> > What do I have to do to work in 2.2.6? Too much changes in r572937?
> >
> > On 10/09/2007, Vinicius Petrucci <vp...@ic.uff.br> wrote:
> > > Hi Rüdiger,
> > >
> > > I've tested the 2nd. It works fine. :)
> > >
> > > best,
> > > Vinicius
> > >
> > > On 10/09/2007, Ruediger Pluem <rp...@apache.org> wrote:
> > > >
> > > >
> > > > On 09/10/2007 06:16 PM, Vinicius Petrucci wrote:
> > > > > I've tried the 1st patch (which is simpler and nicer)
> > in httpd-trunk
> > > > > and now It seems to work... :)
> > > >
> > > > Thanks for testing, but can you please also test the 2nd patch?
> > > > Only the 2nd patch is backportable and I would like to
> > see this fixed in 2.2.x too.
> > > >
> > > > Regards
> > > >
> > > > Rüdiger
> > > >
> > > >
> > >
> > >
> > > --
> > > Vinicius Tavares Petrucci
> > > home page: http://www.ic.uff.br/~vpetrucci
> > >
> >
> >
> > --
> > Vinicius Tavares Petrucci
> > home page: http://www.ic.uff.br/~vpetrucci
> >
>
>


-- 
Vinicius Tavares Petrucci
home page: http://www.ic.uff.br/~vpetrucci

Re: AW: mod_proxy_balancer

Posted by Plüm, Rüdiger, VF-Group <ru...@vodafone.com>.
Thanks for testing. The attached patch cleanly applies to 2.2.x and also
contains a backport of r527937.

Regards

Rüdiger

> -----Ursprüngliche Nachricht-----
> Von: vpetrucci@gmail.com 
> Auftrag von Vinicius Petrucci
> Gesendet: Dienstag, 11. September 2007 03:11
> An: dev@httpd.apache.org
> Betreff: Re: AW: mod_proxy_balancer
> 
> 
> What do I have to do to work in 2.2.6? Too much changes in r572937?
> 
> On 10/09/2007, Vinicius Petrucci <vp...@ic.uff.br> wrote:
> > Hi Rüdiger,
> >
> > I've tested the 2nd. It works fine. :)
> >
> > best,
> > Vinicius
> >
> > On 10/09/2007, Ruediger Pluem <rp...@apache.org> wrote:
> > >
> > >
> > > On 09/10/2007 06:16 PM, Vinicius Petrucci wrote:
> > > > I've tried the 1st patch (which is simpler and nicer) 
> in httpd-trunk
> > > > and now It seems to work... :)
> > >
> > > Thanks for testing, but can you please also test the 2nd patch?
> > > Only the 2nd patch is backportable and I would like to 
> see this fixed in 2.2.x too.
> > >
> > > Regards
> > >
> > > Rüdiger
> > >
> > >
> >
> >
> > --
> > Vinicius Tavares Petrucci
> > home page: http://www.ic.uff.br/~vpetrucci
> >
> 
> 
> -- 
> Vinicius Tavares Petrucci
> home page: http://www.ic.uff.br/~vpetrucci
> 

Re: AW: mod_proxy_balancer

Posted by Vinicius Petrucci <vp...@ic.uff.br>.
What do I have to do to work in 2.2.6? Too much changes in r572937?

On 10/09/2007, Vinicius Petrucci <vp...@ic.uff.br> wrote:
> Hi Rüdiger,
>
> I've tested the 2nd. It works fine. :)
>
> best,
> Vinicius
>
> On 10/09/2007, Ruediger Pluem <rp...@apache.org> wrote:
> >
> >
> > On 09/10/2007 06:16 PM, Vinicius Petrucci wrote:
> > > I've tried the 1st patch (which is simpler and nicer) in httpd-trunk
> > > and now It seems to work... :)
> >
> > Thanks for testing, but can you please also test the 2nd patch?
> > Only the 2nd patch is backportable and I would like to see this fixed in 2.2.x too.
> >
> > Regards
> >
> > Rüdiger
> >
> >
>
>
> --
> Vinicius Tavares Petrucci
> home page: http://www.ic.uff.br/~vpetrucci
>


-- 
Vinicius Tavares Petrucci
home page: http://www.ic.uff.br/~vpetrucci

Re: AW: mod_proxy_balancer

Posted by Vinicius Petrucci <vp...@ic.uff.br>.
Hi Rüdiger,

I've tested the 2nd. It works fine. :)

best,
Vinicius

On 10/09/2007, Ruediger Pluem <rp...@apache.org> wrote:
>
>
> On 09/10/2007 06:16 PM, Vinicius Petrucci wrote:
> > I've tried the 1st patch (which is simpler and nicer) in httpd-trunk
> > and now It seems to work... :)
>
> Thanks for testing, but can you please also test the 2nd patch?
> Only the 2nd patch is backportable and I would like to see this fixed in 2.2.x too.
>
> Regards
>
> Rüdiger
>
>


-- 
Vinicius Tavares Petrucci
home page: http://www.ic.uff.br/~vpetrucci

Re: AW: mod_proxy_balancer

Posted by Ruediger Pluem <rp...@apache.org>.

On 09/10/2007 06:16 PM, Vinicius Petrucci wrote:
> I've tried the 1st patch (which is simpler and nicer) in httpd-trunk
> and now It seems to work... :)

Thanks for testing, but can you please also test the 2nd patch?
Only the 2nd patch is backportable and I would like to see this fixed in 2.2.x too.

Regards

Rüdiger


Re: AW: mod_proxy_balancer

Posted by Vinicius Petrucci <vp...@ic.uff.br>.
I've tried the 1st patch (which is simpler and nicer) in httpd-trunk
and now It seems to work... :)

On 10/09/2007, Jim Jagielski <ji...@jagunet.com> wrote:
>
> On Sep 10, 2007, at 10:42 AM, Plüm, Rüdiger, VF-Group wrote:
>
> >
> >
> >> -----Ursprüngliche Nachricht-----
> >> Von: Jim Jagielski
> >> Gesendet: Montag, 10. September 2007 16:06
> >> An: dev@httpd.apache.org
> >> Betreff: Re: AW: mod_proxy_balancer
> >>
> >
> >>
> >> Regarding the 2nd one... the:
> >>
> >> +            else {
> >> +                worker_is_initialized = 0;
> >> +            }
> >>
> >> seems redundant... But other than that nit, looks good!
> >
> > Point taken. Thanks for catching it.
> > My approach would be to commit the 2nd patch first, get it backported
> > and improve things on trunk with the first patch afterwards.
> > Another approach would be to commit the first patch to trunk and
> > propose
> > the second for backport. I am not sure about the best approach here.
> >
>
> The 1st sounds better to me... And it's not *that* ugly :) :)
>
>


-- 
Vinicius Tavares Petrucci
home page: http://www.ic.uff.br/~vpetrucci

Re: AW: mod_proxy_balancer

Posted by Jim Jagielski <ji...@jaguNET.com>.
On Sep 10, 2007, at 10:42 AM, Plüm, Rüdiger, VF-Group wrote:

>
>
>> -----Ursprüngliche Nachricht-----
>> Von: Jim Jagielski
>> Gesendet: Montag, 10. September 2007 16:06
>> An: dev@httpd.apache.org
>> Betreff: Re: AW: mod_proxy_balancer
>>
>
>>
>> Regarding the 2nd one... the:
>>
>> +            else {
>> +                worker_is_initialized = 0;
>> +            }
>>
>> seems redundant... But other than that nit, looks good!
>
> Point taken. Thanks for catching it.
> My approach would be to commit the 2nd patch first, get it backported
> and improve things on trunk with the first patch afterwards.
> Another approach would be to commit the first patch to trunk and  
> propose
> the second for backport. I am not sure about the best approach here.
>

The 1st sounds better to me... And it's not *that* ugly :) :)


Re: AW: mod_proxy_balancer

Posted by Plüm, Rüdiger, VF-Group <ru...@vodafone.com>.

> -----Ursprüngliche Nachricht-----
> Von: Jim Jagielski 
> Gesendet: Montag, 10. September 2007 16:06
> An: dev@httpd.apache.org
> Betreff: Re: AW: mod_proxy_balancer
> 

> 
> Regarding the 2nd one... the:
> 
> +            else {
> +                worker_is_initialized = 0;
> +            }
> 
> seems redundant... But other than that nit, looks good!

Point taken. Thanks for catching it.
My approach would be to commit the 2nd patch first, get it backported
and improve things on trunk with the first patch afterwards.
Another approach would be to commit the first patch to trunk and propose
the second for backport. I am not sure about the best approach here.

Regards

Rüdiger
 

Re: AW: mod_proxy_balancer

Posted by Jim Jagielski <ji...@jaguNET.com>.
On Sep 10, 2007, at 9:18 AM, Plüm, Rüdiger, VF-Group wrote:

>
>
>> -----Ursprüngliche Nachricht-----
>> Von: vpetrucci@gmail.com
>> Auftrag von Vinicius Petrucci
>> Gesendet: Mittwoch, 5. September 2007 18:09
>> An: dev@httpd.apache.org
>> Betreff: Re: AW: mod_proxy_balancer
>>
>>
>> Well, debugging a little bit more... I realize that the condition
>> (worker is already initialized?) in proxy_util.c(1672) is always
>> bypassed, which is the same condition used by the Rüdiger's patch.
>>
>> But, in proxy_util.c(1706) the same condition is rechecked (the
>> comment says "Possible if proxy is using scoreboard to hold shared
>> stats").
>
> This is the reason why my patch does not work. Attached two  
> proposed solutions:
>
> worker_init_patch_plus_r572937.diff: A simple and nice solution,  
> but IMHO it is not
> backportable as it changes the API.
> worker_init_patch_plus_r572937_back.diff: A more complex and nasty  
> solution that IMHO is
> backportable.
>
> Both patches require r572937 to be applied first.
>
> Can you please give both patches a try?
>
> Other comments welcome as well.
>

Regarding the 2nd one... the:

+            else {
+                worker_is_initialized = 0;
+            }

seems redundant... But other than that nit, looks good!


Re: AW: mod_proxy_balancer

Posted by Plüm, Rüdiger, VF-Group <ru...@vodafone.com>.

> -----Ursprüngliche Nachricht-----
> Von: vpetrucci@gmail.com 
> Auftrag von Vinicius Petrucci
> Gesendet: Mittwoch, 5. September 2007 18:09
> An: dev@httpd.apache.org
> Betreff: Re: AW: mod_proxy_balancer
> 
> 
> Well, debugging a little bit more... I realize that the condition
> (worker is already initialized?) in proxy_util.c(1672) is always
> bypassed, which is the same condition used by the Rüdiger's patch.
> 
> But, in proxy_util.c(1706) the same condition is rechecked (the
> comment says "Possible if proxy is using scoreboard to hold shared
> stats").

This is the reason why my patch does not work. Attached two proposed solutions:

worker_init_patch_plus_r572937.diff: A simple and nice solution, but IMHO it is not
backportable as it changes the API.
worker_init_patch_plus_r572937_back.diff: A more complex and nasty solution that IMHO is
backportable.

Both patches require r572937 to be applied first.

Can you please give both patches a try?

Other comments welcome as well.

Regards

Rüdiger



> 
> Attached is the patch applied and the error_log with debug 
> information.
> 
> Vinicius
> 
> On 05/09/07, Vinicius Petrucci <vp...@ic.uff.br> wrote:
> > Well... I will give another try... Indeed, modifying proxy_utils.c
> > might not be a nice solution...
> >
> > On 05/09/07, Plüm, Rüdiger, VF-Group 
> <ru...@vodafone.com> wrote:
> > >
> > >
> > > > -----Ursprüngliche Nachricht-----
> > > > Von: Jim Jagielski
> > > > Gesendet: Mittwoch, 5. September 2007 15:13
> > > > An: dev@httpd.apache.org
> > > > Betreff: Re: AW: mod_proxy_balancer
> > > >
> > >
> > > >
> > > > Like you said, logically it doesn't make sense that the
> > > > 2 patches work different (yours doesn't and Vinicius'
> > > > does)... So I was thinking a different logic test for
> > > > Vinicius to try, to see if its something local on
> > > > his end...
> > >
> > > Ahh Ok. Now I get it. Thanks.
> > >
> > > Regards
> > >
> > > Rüdiger
> > >
> > >
> >
> >
> > --
> > Vinicius Tavares Petrucci
> > home page: http://www.ic.uff.br/~vpetrucci
> >
> 
> 
> -- 
> Vinicius Tavares Petrucci
> home page: http://www.ic.uff.br/~vpetrucci
> 

Re: AW: mod_proxy_balancer

Posted by Vinicius Petrucci <vp...@ic.uff.br>.
Well, debugging a little bit more... I realize that the condition
(worker is already initialized?) in proxy_util.c(1672) is always
bypassed, which is the same condition used by the R�diger's patch.

But, in proxy_util.c(1706) the same condition is rechecked (the
comment says "Possible if proxy is using scoreboard to hold shared
stats").

Attached is the patch applied and the error_log with debug information.

Vinicius

On 05/09/07, Vinicius Petrucci <vp...@ic.uff.br> wrote:
> Well... I will give another try... Indeed, modifying proxy_utils.c
> might not be a nice solution...
>
> On 05/09/07, Pl�m, R�diger, VF-Group <ru...@vodafone.com> wrote:
> >
> >
> > > -----Urspr�ngliche Nachricht-----
> > > Von: Jim Jagielski
> > > Gesendet: Mittwoch, 5. September 2007 15:13
> > > An: dev@httpd.apache.org
> > > Betreff: Re: AW: mod_proxy_balancer
> > >
> >
> > >
> > > Like you said, logically it doesn't make sense that the
> > > 2 patches work different (yours doesn't and Vinicius'
> > > does)... So I was thinking a different logic test for
> > > Vinicius to try, to see if its something local on
> > > his end...
> >
> > Ahh Ok. Now I get it. Thanks.
> >
> > Regards
> >
> > R�diger
> >
> >
>
>
> --
> Vinicius Tavares Petrucci
> home page: http://www.ic.uff.br/~vpetrucci
>


-- 
Vinicius Tavares Petrucci
home page: http://www.ic.uff.br/~vpetrucci

Re: AW: mod_proxy_balancer

Posted by Vinicius Petrucci <vp...@ic.uff.br>.
Well... I will give another try... Indeed, modifying proxy_utils.c
might not be a nice solution...

On 05/09/07, Plüm, Rüdiger, VF-Group <ru...@vodafone.com> wrote:
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Jim Jagielski
> > Gesendet: Mittwoch, 5. September 2007 15:13
> > An: dev@httpd.apache.org
> > Betreff: Re: AW: mod_proxy_balancer
> >
>
> >
> > Like you said, logically it doesn't make sense that the
> > 2 patches work different (yours doesn't and Vinicius'
> > does)... So I was thinking a different logic test for
> > Vinicius to try, to see if its something local on
> > his end...
>
> Ahh Ok. Now I get it. Thanks.
>
> Regards
>
> Rüdiger
>
>


-- 
Vinicius Tavares Petrucci
home page: http://www.ic.uff.br/~vpetrucci

Re: AW: mod_proxy_balancer

Posted by Plüm, Rüdiger, VF-Group <ru...@vodafone.com>.

> -----Ursprüngliche Nachricht-----
> Von: Jim Jagielski
> Gesendet: Mittwoch, 5. September 2007 15:13
> An: dev@httpd.apache.org
> Betreff: Re: AW: mod_proxy_balancer
> 

> 
> Like you said, logically it doesn't make sense that the
> 2 patches work different (yours doesn't and Vinicius'
> does)... So I was thinking a different logic test for
> Vinicius to try, to see if its something local on
> his end...

Ahh Ok. Now I get it. Thanks.

Regards

Rüdiger


Re: AW: mod_proxy_balancer

Posted by Jim Jagielski <ji...@jaguNET.com>.
On Sep 5, 2007, at 9:04 AM, Plüm, Rüdiger, VF-Group wrote:

>
>
>> -----Ursprüngliche Nachricht-----
>> Von: Jim Jagielski
>> Gesendet: Mittwoch, 5. September 2007 14:03
>> An: dev@httpd.apache.org
>> Betreff: Re: mod_proxy_balancer
>>
>>
>> Hmmm... maybe:
>>
>>     worker_is_initialized = (workers->s &&
>> PROXY_WORKER_IS_INITIALIZED
>> (workers));
>>
>> instead of
>>
>>      worker_is_initialized = workers->s ?
>>                                  PROXY_WORKER_IS_INITIALIZED
>> (workers) : 0;
>>
>
> Ok. But doesn't this deliver the same results (at least from the  
> logical
> point of view)?
> It may be that if worker_is_initialized results in something != 0 that
> this value is different between both, but this should not matter.
> So it boils down to a matter of style (BTW: I am happy to adjust it
> to the first version).
>

Like you said, logically it doesn't make sense that the
2 patches work different (yours doesn't and Vinicius'
does)... So I was thinking a different logic test for
Vinicius to try, to see if its something local on
his end...


AW: mod_proxy_balancer

Posted by Plüm, Rüdiger, VF-Group <ru...@vodafone.com>.

> -----Ursprüngliche Nachricht-----
> Von: Jim Jagielski 
> Gesendet: Mittwoch, 5. September 2007 14:03
> An: dev@httpd.apache.org
> Betreff: Re: mod_proxy_balancer
> 
> 
> Hmmm... maybe:
> 
>     worker_is_initialized = (workers->s && 
> PROXY_WORKER_IS_INITIALIZED 
> (workers));
> 
> instead of
> 
>      worker_is_initialized = workers->s ?
>                                  PROXY_WORKER_IS_INITIALIZED 
> (workers) : 0;
> 

Ok. But doesn't this deliver the same results (at least from the logical
point of view)?
It may be that if worker_is_initialized results in something != 0 that
this value is different between both, but this should not matter.
So it boils down to a matter of style (BTW: I am happy to adjust it
to the first version).

Regards

Rüdiger

Re: mod_proxy_balancer

Posted by Jim Jagielski <ji...@jaguNET.com>.
Hmmm... maybe:

    worker_is_initialized = (workers->s && PROXY_WORKER_IS_INITIALIZED 
(workers));

instead of

     worker_is_initialized = workers->s ?
                                 PROXY_WORKER_IS_INITIALIZED 
(workers) : 0;

??

Re: mod_proxy_balancer

Posted by Plüm, Rüdiger, VF-Group <ru...@vodafone.com>.

> -----Ursprüngliche Nachricht-----
> Von: vpetrucci@gmail.com  Im 
> Auftrag von Vinicius Petrucci
> Gesendet: Dienstag, 4. September 2007 21:59
> An: Ruediger Pluem
> Cc: dev@httpd.apache.org
> Betreff: Re: mod_proxy_balancer
> 
> 
> Hi,
> 
> As I said before, your last patch didn't solve the bug because the
> variable you created (worker_is_initialized) always gets zero value.
> 
> I've created the patches attached. The solution was to simply move the
> code section that set lbfactor, lbstatus, and lbset to the original
> configuration inside the function ap_proxy_initialize_worker_share()
> in proxy_util.c.

This is really, really strange because basicly the conditions in your patch
and my patch are the same (The test done at the beginning of 
ap_proxy_initialize_worker_share is basicly the same as mine).
So I currently cannot tell why your patch works and mine does not. This
needs further testing.

> 
> It works using my httpd-trunk version. Could you guys confirm 
> if it is correct?

The downside of your patch is that ap_proxy_initialize_worker_share
is also called from other places outside mod_proxy_balancer and
it is part of the public proxy API which might make it impossible
to backport your patch to the stable branch as your patch changes
the behaviour of the function.

Regards

Rüdiger

> 
> Vinicius
> 
> On 04/09/07, Vinicius Petrucci <vp...@ic.uff.br> wrote:
> > I don't know why, but each time a new child is created the variable
> > worker_is_initialized is 0.
> >
> > Therefore, the problem of reseting to the original 
> configuration is not solved.
> >
> > I'm debugging more on this...
> >
> > On 04/09/07, Ruediger Pluem <rp...@apache.org> wrote:
> > >
> > >
> > > On 09/03/2007 11:40 PM, Vinicius Petrucci wrote:
> > > > Ruedinger:
> > > >
> > > > In your patch, I think the call 
> PROXY_WORKER_IS_INITIALIZED(workers)
> > > > before initialize the pointer *workers is causing that 
> error log:
> > > >
> > > > [Mon Sep 03 18:32:34 2007] [notice] child pid 5225 exit signal
> > > > Segmentation fault (11)
> > >
> > > Sorry my fault. Can you please try the attached one please?
> > >
> > > >
> > > > But if I call the method: ap_proxy_initialize_worker_share(conf,
> > > > workers, s); before, I always get worker initialized...
> > >
> > > Which is why I called it before :-).
> > >
> > > Regards
> > >
> > > Rüdiger
> > >
> > >
> > >
> >
> >
> > --
> > Vinicius Tavares Petrucci
> > home page: http://www.ic.uff.br/~vpetrucci
> >
> 
> 
> -- 
> Vinicius Tavares Petrucci
> home page: http://www.ic.uff.br/~vpetrucci
> 

Re: mod_proxy_balancer

Posted by Vinicius Petrucci <vp...@ic.uff.br>.
Hi,

As I said before, your last patch didn't solve the bug because the
variable you created (worker_is_initialized) always gets zero value.

I've created the patches attached. The solution was to simply move the
code section that set lbfactor, lbstatus, and lbset to the original
configuration inside the function ap_proxy_initialize_worker_share()
in proxy_util.c.

It works using my httpd-trunk version. Could you guys confirm if it is correct?

Vinicius

On 04/09/07, Vinicius Petrucci <vp...@ic.uff.br> wrote:
> I don't know why, but each time a new child is created the variable
> worker_is_initialized is 0.
>
> Therefore, the problem of reseting to the original configuration is not solved.
>
> I'm debugging more on this...
>
> On 04/09/07, Ruediger Pluem <rp...@apache.org> wrote:
> >
> >
> > On 09/03/2007 11:40 PM, Vinicius Petrucci wrote:
> > > Ruedinger:
> > >
> > > In your patch, I think the call PROXY_WORKER_IS_INITIALIZED(workers)
> > > before initialize the pointer *workers is causing that error log:
> > >
> > > [Mon Sep 03 18:32:34 2007] [notice] child pid 5225 exit signal
> > > Segmentation fault (11)
> >
> > Sorry my fault. Can you please try the attached one please?
> >
> > >
> > > But if I call the method: ap_proxy_initialize_worker_share(conf,
> > > workers, s); before, I always get worker initialized...
> >
> > Which is why I called it before :-).
> >
> > Regards
> >
> > R�diger
> >
> >
> >
>
>
> --
> Vinicius Tavares Petrucci
> home page: http://www.ic.uff.br/~vpetrucci
>


-- 
Vinicius Tavares Petrucci
home page: http://www.ic.uff.br/~vpetrucci

Re: mod_proxy_balancer

Posted by Vinicius Petrucci <vp...@ic.uff.br>.
I don't know why, but each time a new child is created the variable
worker_is_initialized is 0.

Therefore, the problem of reseting to the original configuration is not solved.

I'm debugging more on this...

On 04/09/07, Ruediger Pluem <rp...@apache.org> wrote:
>
>
> On 09/03/2007 11:40 PM, Vinicius Petrucci wrote:
> > Ruedinger:
> >
> > In your patch, I think the call PROXY_WORKER_IS_INITIALIZED(workers)
> > before initialize the pointer *workers is causing that error log:
> >
> > [Mon Sep 03 18:32:34 2007] [notice] child pid 5225 exit signal
> > Segmentation fault (11)
>
> Sorry my fault. Can you please try the attached one please?
>
> >
> > But if I call the method: ap_proxy_initialize_worker_share(conf,
> > workers, s); before, I always get worker initialized...
>
> Which is why I called it before :-).
>
> Regards
>
> Rüdiger
>
>
>


-- 
Vinicius Tavares Petrucci
home page: http://www.ic.uff.br/~vpetrucci

Re: mod_proxy_balancer

Posted by Ruediger Pluem <rp...@apache.org>.

On 09/03/2007 11:40 PM, Vinicius Petrucci wrote:
> Ruedinger:
> 
> In your patch, I think the call PROXY_WORKER_IS_INITIALIZED(workers)
> before initialize the pointer *workers is causing that error log:
> 
> [Mon Sep 03 18:32:34 2007] [notice] child pid 5225 exit signal
> Segmentation fault (11)

Sorry my fault. Can you please try the attached one please?

> 
> But if I call the method: ap_proxy_initialize_worker_share(conf,
> workers, s); before, I always get worker initialized...

Which is why I called it before :-).

Regards

Rüdiger


Re: mod_proxy_balancer

Posted by Ruediger Pluem <rp...@apache.org>.

On 09/02/2007 04:57 PM, Vinicius Petrucci wrote:
> Hi Guys,
> 
> I've read Ruediger's patch about preventing mod_proxy_balancer from
> overwriting the status of workers when creating a new child process
> (http://svn.apache.org/viewcvs?rev=374929&view=rev).
> 
> I'm running the latest stable release of Apache (2.2.4) and I think
> the same bug is overwriting the lbfactor value to 1 (original
> configuration) when creating a new child process. Is it really a bug?
> How can I prevent that?

Can you please try if the attached patch against trunk fixes your issue
(also applies for 2.2.x with little fuzz)?
Can you please open a bug report in bugzilla for this? This eases tracking
for us. Thanks.

I CCed dev@httpd.apache.org as this is the correct mailing list for
such issues (apart from bugzilla as mentioned above).

Regards

Rüdiger