httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch>
Subject Re: mod_proxy seg faulting ?
Date Mon, 06 May 2013 20:23:33 GMT
On Sat, 4 May 2013, Micha Lenk wrote:
> > I am pretty sure that this is a thread-unsafe pool usage. 
> > create_proxy_config() puts the global config pool into 
> > (proxy_server_conf)->pool. It is later (during request processing) 
> > used all over the place without further locking. This must be a sub-
> > pool instead, and it must be protected with a mutex. Or new sub-pools 
> > must be created wherever conf->pool is used.
> Can you please elaborate the problem of thread-unsafe pool usage a bit
> more so that we can better understand why this is causing a segmentation
> fault? Or alternatively, do you have any pointer to documentation,
> mailinglists, what ever, where to read more about it?

Hmm. I thought there was some introductory documentation, but I didn't 
find much. There is a short note at the end of . Basically, only 
the functions in 
that are explicitly marked as thread safe may safely operate on a pool 
from different threads without locking.

In most use cases, a pool is tied to some object like a connection or a 
request and at a given time only a single worker thread processes this 
connection or request. Therefore the pools can be used without locking in 
those cases.

But there is only one pool tied to the global configuration, and that pool 
must not be used from the worker threads.


View raw message