You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jd...@apache.org on 2020/05/22 18:26:51 UTC

[qpid-proton] branch master updated: PROTON-2225: enable threaderciser by default, suppress race checkers (#247)

This is an automated email from the ASF dual-hosted git repository.

jdanek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/master by this push:
     new bc4a1db  PROTON-2225: enable threaderciser by default, suppress race checkers (#247)
bc4a1db is described below

commit bc4a1db33937f02010d5accdc303b3a6bf5db287
Author: Jiri Daněk <jd...@redhat.com>
AuthorDate: Fri May 22 20:26:41 2020 +0200

    PROTON-2225: enable threaderciser by default, suppress race checkers (#247)
    
    * NO-JIRA: specify explicitly the compiler used on macOS
    
    On Travis on macOS, gcc is aliased to clang. This way, we won't
    have a misleading line in Travis report about the compiler.
    
    * PROTON-2225: enable threaderciser by default, suppress race checkers
---
 .travis.yml            | 29 ++++++++++++++++++++++-------
 c/tests/CMakeLists.txt | 11 +++++++----
 tests/tsan.supp        |  4 ++++
 tests/valgrind.supp    | 28 ++++++++++++++++++++++++++++
 4 files changed, 61 insertions(+), 11 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index bfc0d82..3572ff8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,16 +19,27 @@
 
 sudo: false
 language: cpp
-compiler:
-- gcc
-- clang
-env:
-- OPENSSL_ia32cap='0x00000000'
 
 matrix:
   include:
   - os: linux
     dist: bionic
+    dist: xenial
+    sudo: true
+    language: cpp
+    compiler: gcc
+    env:
+    - OPENSSL_ia32cap='0x00000000'
+  - os: linux
+    dist: xenial
+    language: cpp
+    compiler: clang
+    env:
+    - OPENSSL_ia32cap='0x00000000'
+    # c-threaderciser test hangs on older clang
+    - QPID_PROTON_CTEST_ARGS="--exclude-regex 'c-threaderciser'"
+  - os: linux
+    dist: bionic
     sudo: true
     compiler:
     - gcc
@@ -64,21 +75,25 @@ matrix:
 
   - os: osx
     osx_image: xcode9.4
+    compiler: clang
     env:
     - PATH="/usr/local/opt/python/libexec/bin:/usr/local/bin:$PATH"
     - PKG_CONFIG_PATH='/usr/local/opt/openssl@1.1/lib/pkgconfig'
     - QPID_PROTON_CMAKE_ARGS='-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13'
+    # c-threaderciser test hangs on older clang
     # python-tox-test segfaults and ruby tests do not start due to dynamic library issues
-    - QPID_PROTON_CTEST_ARGS="--exclude-regex 'python-tox-test|ruby.*'"
+    - QPID_PROTON_CTEST_ARGS="--exclude-regex 'c-threaderciser|python-tox-test|ruby.*'"
 
   - os: osx
     osx_image: xcode11.3
+    compiler: clang
     env:
     - PATH="/usr/local/opt/python/libexec/bin:/usr/local/bin:$PATH"
     - PKG_CONFIG_PATH='/usr/local/opt/openssl@1.1/lib/pkgconfig'
     - QPID_PROTON_CMAKE_ARGS='-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14'
+    # TODO PROTON-2225: c-threaderciser sometimes fails with assertion error
     # python-tox-test segfaults and ruby tests do not start due to dynamic library issues
-    - QPID_PROTON_CTEST_ARGS="--exclude-regex 'python-tox-test|ruby.*'"
+    - QPID_PROTON_CTEST_ARGS="--exclude-regex 'c-threaderciser|python-tox-test|ruby.*'"
 
 addons:
   # Ubuntu 16.04 APT dependencies, https://packages.ubuntu.com/
diff --git a/c/tests/CMakeLists.txt b/c/tests/CMakeLists.txt
index a0550cc..647e486 100644
--- a/c/tests/CMakeLists.txt
+++ b/c/tests/CMakeLists.txt
@@ -79,10 +79,13 @@ if (CMAKE_CXX_COMPILER)
     target_link_libraries(c-ssl-proactor-test qpid-proton-core qpid-proton-proactor ${PLATFORM_LIBS})
 
     # Thread race test.
-    #
-    # TODO aconway 2018-11-14: enable by default when races and xcode
-    # problems are cleared up
-    option(THREADERCISER "Run the threaderciser concurrency tests" OFF)
+    if (MSVC)
+      # test does not compile on Windows
+      set(DEFAULT_THREADERCISER OFF)
+    else (MSVC)
+      set(DEFAULT_THREADERCISER ON)
+    endif (MSVC)
+    option(THREADERCISER "Run the threaderciser concurrency tests" ${DEFAULT_THREADERCISER})
     if (THREADERCISER)
       add_executable(c-threaderciser threaderciser.c)
       set_target_properties(c-threaderciser PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} ${C_WARNING_FLAGS}")
diff --git a/tests/tsan.supp b/tests/tsan.supp
index 07b3fdb..f0f9020 100644
--- a/tests/tsan.supp
+++ b/tests/tsan.supp
@@ -26,3 +26,7 @@ race:^stop_polling$
 # PROTON-2133 in close (also match with .c/.cpp at the end)
 race:c/examples/broker
 race:cpp/examples/broker
+
+# found by threaderciser, in c/src/proactor/epoll.c
+race:^listener_final_free$
+race:^pn_proactor_connect2$
diff --git a/tests/valgrind.supp b/tests/valgrind.supp
index 3fee095..2cabf58 100644
--- a/tests/valgrind.supp
+++ b/tests/valgrind.supp
@@ -148,4 +148,32 @@
    Helgrind:Race
    fun:*
    fun:_nss_files_getservbyname_r
+}
+
+{
+   TODO(PROTON-2133) investigate races in tests (threaderciser, c-fd-leak)
+   Helgrind:Race
+   ...
+   fun:proactor_do_epoll
+   fun:pn_proactor_wait
+   fun:proactor_thread
+}
+
+{
+   TODO(PROTON-2133) investigate races in tests (threaderciser, c-fd-leak)
+   Helgrind:Race
+   ...
+   fun:pmutex_finalize
+   fun:pcontext_finalize
+   fun:pconnection_final_free
+   fun:pconnection_cleanup
+}
+
+{
+   TODO(PROTON-2225) investigate threaderciser test
+   Memcheck:Leak
+   ...
+   fun:connection_ctx_new
+   ...
+   fun:proactor_thread
 }
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org