Yann Ylavic [Fri, 11 Dec 2020 13:15:00 +0000 (13:15 +0000)]
Merge r1879441, r1879448, r1879594, r1883854, r1884136, r1884292 from trunk:
Add additional test suite runs for the prefork & event pool-debug builds:
- run with SSLSessionCache defined (after r1879430)
- run with "SSLProtocol TLSv1.2"
Adjust for r1879447 to specify shmcb is tested when
TEST_SSL_SESSCACHE is defined. [skip ci]
For TEST_SSL=1 runs, test SSLSessionCache with shmcb, memcached
and redis socache providers. Force TLSv1.2 for these runs since
TLSv1.3 doesn't use the cache.
Stop testing if a core dump was generated during the main test suite run.
Add ASan (AddressSanitizer) build and tests to ci.
+if test -v TEST_SSL; then
+ pushd test/perl-framework
+ ./scripts/memcached-init.sh
+ ./scripts/redis-init.sh
+ popd
+fi
+
if test -v APR_VERSION; then
install_apx apr ${APR_VERSION} "${APR_CONFIG}"
APU_CONFIG="$APU_CONFIG --with-apr=$HOME/root/apr-${APR_VERSION}"
Index: test/travis_run_linux.sh
===================================================================
--- test/travis_run_linux.sh (revision 1884310)
+++ test/travis_run_linux.sh (working copy)
@@ -77,6 +77,10 @@ if ! test -v SKIP_TESTING; then
export UBSAN_OPTIONS="log_path=$PWD/ubsan.log"
fi
+ if test -v TEST_ASAN; then
+ export ASAN_OPTIONS="log_path=$PWD/asan.log"
+ fi
+
if test -v WITH_TEST_SUITE; then
make check TESTS="${TESTS}" TEST_CONFIG="${TEST_ARGS}"
RV=$?
@@ -88,8 +92,25 @@ if ! test -v SKIP_TESTING; then
RV=$?
popd
fi
- if test -v LITMUS; then
+
+ # Skip further testing if a core dump was created during the test
+ # suite run above.
+ if test $RV -eq 0 -a -f test/perl-framework/t/core; then
+ RV=4
+ fi
+
+ if test -v TEST_SSL -a $RV -eq 0; then
pushd test/perl-framework
+ for cache in shmcb redis:localhost:6379 memcache:localhost:11211; do
+ SSL_SESSCACHE=$cache ./t/TEST -sslproto TLSv1.2 -defines TEST_SSL_SESSCACHE t/ssl
+ RV=$?
+ test $RV -eq 0 || break
+ done
+ popd
+ fi
+
+ if test -v LITMUS -a $RV -eq 0; then
+ pushd test/perl-framework
mkdir -p t/htdocs/modules/dav
./t/TEST -start
# litmus uses $TESTS, so unset it.
@@ -123,9 +144,18 @@ if ! test -v SKIP_TESTING; then
RV=3
fi
+ if test -v TEST_ASAN && ls asan.log.* &> /dev/null; then
+ cat asan.log.*
+
+ # ASan can report memory leaks, fail on errors only
+ if grep -q "ERROR: AddressSanitizer:" `ls asan.log.*`; then
+ RV=4
+ fi
+ fi
+
if test -f test/perl-framework/t/core; then
gdb -ex 'thread apply all backtrace' -batch ./httpd test/perl-framework/t/core
- RV=4
+ RV=5
fi
Jim Jagielski [Tue, 17 Nov 2020 15:04:40 +0000 (15:04 +0000)]
Merge r1883097 from trunk:
mpm_event: don't reset connections after lingering close timeout
While httpd is supposed to do lingering close for incoming data, it has no
control anyway over outgoing/pending data once they are handled by the
system.
So don't reset the connection after lingering close times out, otherwise the
system won't do its own lingering close to flush un-acked data.
The connection reset was introduced by r1802875 and backported to 2.4.28.
Submitted by: ylavic
Reviewed by: ylavic, jorton, jim
Jim Jagielski [Tue, 17 Nov 2020 15:04:12 +0000 (15:04 +0000)]
Merge r1883096 from trunk:
mpm_event: don't kill keepalive connections on connections_above_limit().
Before r1819855 (backported to 2.4.30), mpm_event killed keepalive connections
only when workers were exhausted, while this commit set workers_were_busy for
connections_above_limit().
Restore prior to r1819855 behaviour, and since ap_queue_info_num_idlers() is
now part of connections_above_limit(), let's update workers_were_busy there
only when necessary.
Submitted by: ylavic
Reviewed by: ylavic, jorton, jim
Jim Jagielski [Tue, 17 Nov 2020 14:59:04 +0000 (14:59 +0000)]
Merge r1776290, r1869399 from trunk:
let wstunnel run first
Since wstunnel can step aside based on the Upgrade: header.
mod_proxy: Add proxy check_trans hook.
This allows proxy modules to decline request handling at early stage.
Then mod_proxy_wstunnel can implement that hook to verify that an Upgrade
is requested, and otherwise hand over to mod_proxy_http.
Ruediger Pluem [Mon, 16 Nov 2020 12:24:12 +0000 (12:24 +0000)]
Merge r1881620, r1881635 from trunk:
Process early errors via a dummy HTTP/1.1 request as well
Process early errors via a dummy HTTP/1.1 request as well to ensure
that the request gets logged correctly and possible custom error
pages are considered. The previous way of directly sending a HTTP/2
answer with the HTTP status code appropriate for the error is more
efficient, but does not log the request nor sents a possible custom
error page.
* modules/http2/h2.h: Add http_status to h2_request struct and define
H2_HTTP_STATUS_UNSET.
* modules/http2/h2_request.c(h2_request_create_rec): Check if
http_status is set for the request and die with the
status code it contains if set.
* modules/http2/h2_session.c(on_header_cb): Adjust the error condition
now that we mark early errors via http_status: Only return an error
if the status is not success and http_status is not H2_HTTP_STATUS_UNSET.
* modules/http2/h2_stream.c(set_error_response): Set http_status
on the request instead of creating headers for a response and a
respective brigade.
Backport:
- r1859106: Axe some outdated compatibility notes
- r1878824: Add some html syntax highlight to a piece of code. + some missing links
- r1878825: Fix typo in r1878824
Joe Orton [Tue, 15 Sep 2020 08:50:59 +0000 (08:50 +0000)]
Merge r1880602, r1881396 from trunk: [under CTR for Travis changes]
Fail for more abort() errors in error_log.
Fail if a core dump is produced, and dump the backtrace if so.
(e.g. during parent or child process shutdown, core dumps will
not show up as test case failures so would not otherwise be caught)
* Makefile.in: Define the update-changes target to merge the change files
from the changes directory to the top of the CHANGES file and remove
them afterwards. If a Subversion binary was found during configure try
to svn rm them otherwise just delete them.
* configure.in: Search for the Subversion binary.
* acinclude.m4: Set the corresponding Makefile variable for the Subversion
binary.
* README.CHANGES: New file to document the new approach.
Can we have mercy with people working on case-preserving file systems?
Consider case insensitive filessystems
Consider case insensitive filessystems and thus choose a new non conflicting
name for the directory to store CHANGES entries.
Joe Orton [Mon, 14 Sep 2020 13:16:54 +0000 (13:16 +0000)]
Merge r1870095, r1870097, r1880927 from trunk:
Buffer HTTP request bodies for TLSv1.3 PHA in the same way as for
TLSv<1.3 renegotiation.
* modules/ssl/ssl_engine_kernel.c (fill_reneg_buffer): Factor
out...
(ssl_hook_Access_classic): ... from here.
(ssl_hook_Access_modern): Use it here too.
Add logno.
* modules/ssl/ssl_engine_kernel.c (ssl_hook_Access_modern): Move
fill_reneg_buffer() call down after r->connection->master
check.
mod_proxy: add ap_proxy_define_match_worker() and use it for ProxyPassMatch
and ProxyMatch section to distinguish between normal workers and workers
with regex substitutions in the name. Implement handling of such workers
in ap_proxy_get_worker(). PR 43513
mod_proxy: better check for worker->s->is_name_matchable
Return a match whenever we get to the end of the worker name, regardless
of whether there is URL left.
ProxyPassMatch had been using the default worker in trunk.
Follow up to r1609680: simpler/faster ap_proxy_strcmp_ematch().
No functional change.
Follow up to r1609680: further simplify/optimize ap_proxy_strcmp_ematch().
While at it, same treatment for its mother ap_strcmp_match().
make sure the $n of the regular expressions is not included the name of the worker.
for example, the example:
ProxyPassMatch "^(/.*\.gif)$" "http://backend.example.com:8000$1"
was giving:
AH00526: Syntax error on line nnn of bla/conf/httpd.conf:
ProxyPass Unable to parse URL: http://backend.example.com:8000$1
ap_proxy_define_match_worker: don't copy the url unnecessarily.
And save a few cycles, when the duplication is needed, by not copying
the ignored part.
ap_proxy_define_match_worker: disable connection reuse by default.
To avoid compat issues with dns/connection reuse now that a worker with
dollar substitution can be elected.
CHANGES entry for ap_proxy_define_match_worker().
Oups, axe spurious copypasta.
mod_proxy: unfail mixed ProxyPass/<Proxy> and ProxyPassMatch/<ProxyMatch>.
It is not a failure in current 2.4.x, so to ease backport and to avoid compat
breakage simply warn about the second directive being ignored.
This commit can be reverted in trunk if we want next versions to fail in this
case.