]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
Merge r1822531, r1829676, r1847232, r1847234, r1861333, r1852442, r1866145, r1868295...
authorJim Jagielski <jim@apache.org>
Tue, 14 Jan 2020 17:42:58 +0000 (17:42 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 14 Jan 2020 17:42:58 +0000 (17:42 +0000)
commit484abff1b1ae65c565a692709c5a8aa0bbd3bf9a
tree5d5addc58d55c203f7297aad605b159dcce0d600
parente380b3cd448d070cf1e3eb97c12584c6e233864a
Merge r1822531, r1829676, r1847232, r1847234, r1861333, r1852442, r1866145, r1868295, r1868296 from trunk:

mod_proxy: fix proxy connection cleanup from an n+2 pool.

When connection_destructor() is called after pchild is gone, we can't
dereference worker->cp anymore. This happens is debug/one_process mode only,
if we exit by calling apr_terminate() or clearing the process pool directly.

Fix this by NULL-ing worker->cp in conn_pool_cleanup(), and by registering it
as a pre_cleanup.

Delay some memory allocation.

If this handler will not handle the request, no need to waste bytes in the request pool.

Add error messages and return bad request.

fix incorrect rv. Sorry.

Follow up to r1847232.
There is no point to use "old" numbers in recent commit.

Also avoid number duplication. The messages are the same but in different code path, so having different numbers makes sense.
This also avoids a warning when running:
   make update-log-msg-tags

Make proxy modules compile if APR_HAS_THREADS is not defined.

restore use of global mutex under !APR_HAS_THREADS

followup to r1852442 which appears to have been too agressive in wrapping
blocks with #if APR_HAS_THREADS.  With !APR_HAS_THREADS a global mutex
is a proc mutex.

* Add back logging goodness

Add back logging goodness added by covener in r1865938.

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

Submitted by: ylavic, jailletc36, jfclere, jfclere, jailletc36, stsp, covener, rpluem, rpluem
Reviewed by: rpluem, covener, jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1872790 13f79535-47bb-0310-9956-ffa450edef68
CHANGES
STATUS
include/ap_mmn.h
modules/proxy/mod_proxy.h
modules/proxy/mod_proxy_balancer.c
modules/proxy/mod_proxy_ftp.c
modules/proxy/proxy_util.c