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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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
Index: httpd-trunk/modules/proxy/mod_proxy_balancer.c
===================================================================
--- httpd-trunk/modules/proxy/mod_proxy_balancer.c	(revision 572771)
+++ httpd-trunk/modules/proxy/mod_proxy_balancer.c	(working copy)
@@ -95,13 +95,6 @@
         ++workers;
     }
 
-    workers = (proxy_worker *)balancer->workers->elts;
-    for (i = 0; i < balancer->workers->nelts; i++) {
-        /* Set to the original configuration */
-        workers[i].s->lbstatus = workers[i].s->lbfactor =
-          (workers[i].lbfactor ? workers[i].lbfactor : 1);
-        workers[i].s->lbset = workers[i].lbset;
-    }
     /* Set default number of attempts to the number of
      * workers.
      */
Index: httpd-trunk/modules/proxy/proxy_util.c
===================================================================
--- httpd-trunk/modules/proxy/proxy_util.c	(revision 572771)
+++ httpd-trunk/modules/proxy/proxy_util.c	(working copy)
@@ -1723,6 +1723,10 @@
 
     worker->s->status |= (worker->status | PROXY_WORKER_INITIALIZED);
 
+    /* Set to the original configuration */
+	worker->s->lbstatus = worker->s->lbfactor =
+	    (worker->lbfactor ? worker->lbfactor : 1);
+	worker->s->lbset = worker->lbset;
 }
 
 PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, server_rec *s)

Reply via email to