]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fail for more abort() errors in error_log.
authorJoe Orton <jorton@apache.org>
Wed, 5 Aug 2020 08:26:58 +0000 (08:26 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 5 Aug 2020 08:26:58 +0000 (08:26 +0000)
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)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1880602 13f79535-47bb-0310-9956-ffa450edef68

.travis.yml
test/travis_run_linux.sh

index e21ff3799f0478c9c53b5cd4eaf9138264cc5106..09d89b4cf09fd0b7ea9276cec859c8d0d4cc0118 100644 (file)
@@ -28,6 +28,7 @@ addons:
       - libpcre2-dev
       - libldap2-dev
       - ldap-utils
+      - gdb
 env:
   global:
     - MFLAGS=-j2
index d1925f5b2d8ce372e98953d3a862fd738b9fdc4a..ad2cde3d85111dc36fafc23f6213b8372dd2b781 100755 (executable)
@@ -118,21 +118,31 @@ if ! test -v SKIP_TESTING; then
         popd
     fi
 
-    if grep -q 'Segmentation fault' test/perl-framework/t/logs/error_log; then
-        grep --color=always -C5 'Segmentation fault' test/perl-framework/t/logs/error_log
-        RV=2
-    fi
+    # Catch cases where abort()s get logged to stderr by libraries but
+    # only cause child processes to terminate e.g. during shutdown,
+    # which may not otherwise trigger test failures.
+
+    # "glibc detected": printed with LIBC_FATAL_STDERR_/MALLOC_CHECK_
+    # glibc will abort when malloc errors are detected.  This will get
+    # caught by the segfault grep as well.
+
+    # "pool concurrency check": printed by APR built with
+    # --enable-thread-debug when an APR pool concurrency check aborts
+
+    for phrase in 'Segmentation fault' 'glibc detected' 'pool concurrency check:'; do
+        if grep -q "$phrase" test/perl-framework/t/logs/error_log; then
+            grep --color=always -C5 "$phrase" test/perl-framework/t/logs/error_log
+            RV=2
+        fi
+    done
 
     if test -v TEST_UBSAN && ls ubsan.log.* &> /dev/null; then
         cat ubsan.log.*
         RV=3
     fi
 
-    # With LIBC_FATAL_STDERR_/MALLOC_CHECK_ glibc will abort when
-    # malloc errors are detected.  This should get caught by the
-    # segfault grep above, but in case it is not, catch it here too:
-    if grep 'glibc detected' test/perl-framework/t/logs/error_log; then
-        grep --color=always -C20 'glibc detected' test/perl-framework/t/logs/error_log
+    if test -f test/perl-framework/t/core; then
+        gdb -ex 'thread apply all backtrace' -batch ./httpd test/perl-framework/t/core
         RV=4
     fi