]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
Fix pool concurrency problems
authorRuediger Pluem <rpluem@apache.org>
Fri, 11 Oct 2019 15:11:40 +0000 (15:11 +0000)
committerRuediger Pluem <rpluem@apache.org>
Fri, 11 Oct 2019 15:11:40 +0000 (15:11 +0000)
commitfadc83a84fee174c24604f5b37a5446953474f3a
treeebac0e3a095095bf2717a1f7de4ba4cdf66d62f5
parent1473184d209917fc8eb553faf26890a6d2fc9fe7
Fix pool concurrency problems

Create a subpool of the connection pool for worker scoped DNS resolutions.
This is needed to avoid race conditions in using the connection pool by multiple
threads during ramp up.

Recheck after obtaining the lock if we still need to do things or if they
were already done by another thread while we were waiting on the lock.

* modules/proxy/proxy_util.c: Create a subpool of the connection pool for worker
  scoped DNS resolutions and use it.

* modules/proxy/mod_proxy.h: Define AP_VOLATILIZE_T and add dns_pool to
  struct proxy_conn_pool.

* modules/proxy/mod_proxy_ftp.c: Use dns_pool and consider that
  worker->cp->addr is volatile in this location of the code.

PR: 63503

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1868296 13f79535-47bb-0310-9956-ffa450edef68
CHANGES
include/ap_mmn.h
modules/proxy/mod_proxy.h
modules/proxy/mod_proxy_ftp.c
modules/proxy/proxy_util.c