You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by to...@apache.org on 2016/02/02 22:49:01 UTC

incubator-kudu git commit: Remove TSAN suppressions for protobuf

Repository: incubator-kudu
Updated Branches:
  refs/heads/master ab2c673d9 -> 744138a5e


Remove TSAN suppressions for protobuf

We now build protobuf with TSAN instrumentation enabled. So, we shouldn't need
to suppress anything from the library. This required adding -DTHREAD_SANITIZER
to the instrumented protobuf build so that the TSAN instrumentation got built
in.

Change-Id: I0b4a2066dfc4b4e83c5c0a35bb8e5aa8f42d9147
Reviewed-on: http://gerrit.cloudera.org:8080/1990
Tested-by: Todd Lipcon <to...@apache.org>
Reviewed-by: David Ribeiro Alves <da...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/744138a5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/744138a5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/744138a5

Branch: refs/heads/master
Commit: 744138a5e6507b00324ac030fc276c3d3a9d3337
Parents: ab2c673
Author: Todd Lipcon <to...@apache.org>
Authored: Mon Feb 1 23:16:05 2016 -0800
Committer: Todd Lipcon <to...@apache.org>
Committed: Tue Feb 2 21:48:46 2016 +0000

----------------------------------------------------------------------
 build-support/tsan-suppressions.txt | 6 ------
 thirdparty/build-definitions.sh     | 3 +++
 thirdparty/build-thirdparty.sh      | 1 +
 3 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/744138a5/build-support/tsan-suppressions.txt
----------------------------------------------------------------------
diff --git a/build-support/tsan-suppressions.txt b/build-support/tsan-suppressions.txt
index dbbe4a2..d7d6a5f 100644
--- a/build-support/tsan-suppressions.txt
+++ b/build-support/tsan-suppressions.txt
@@ -17,12 +17,6 @@
 race:_dl_deallocate_tls
 race:kudu::tablet::ScopedRowLock::Release
 
-
-# Protobuf's implementation of GoogleOnce doesn't properly annotate itself
-race:google::protobuf::GoogleOnceInitImpl
-race:google::protobuf::Message::GetReflection
-race:*::protobuf_AssignDescriptorsOnce
-
 # libunwind uses some double-checked locking which isn't perfectly safe.
 # Reported at http://savannah.nongnu.org/bugs/index.php?42677
 #

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/744138a5/thirdparty/build-definitions.sh
----------------------------------------------------------------------
diff --git a/thirdparty/build-definitions.sh b/thirdparty/build-definitions.sh
index dc4d47e..65b7825 100644
--- a/thirdparty/build-definitions.sh
+++ b/thirdparty/build-definitions.sh
@@ -172,6 +172,9 @@ build_gmock() {
 
 build_protobuf() {
   cd $PROTOBUF_DIR
+  # We build protobuf in both instrumented and non-instrumented modes.
+  # If we don't clean in between, we may end up mixing modes.
+  test -f Makefile && make distclean
   CFLAGS="$EXTRA_CFLAGS" \
     CXXFLAGS="$EXTRA_CXXFLAGS" \
     LDFLAGS="$EXTRA_LDFLAGS" \

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/744138a5/thirdparty/build-thirdparty.sh
----------------------------------------------------------------------
diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh
index a6684a2..4d6b8a6 100755
--- a/thirdparty/build-thirdparty.sh
+++ b/thirdparty/build-thirdparty.sh
@@ -294,6 +294,7 @@ if [ -n "$F_TSAN" ]; then
   save_env
   EXTRA_CFLAGS="-fsanitize=thread $EXTRA_CFLAGS"
   EXTRA_CXXFLAGS="-nostdinc++ -fsanitize=thread $EXTRA_CXXFLAGS"
+  EXTRA_CXXFLAGS="-DTHREAD_SANITIZER $EXTRA_CXXFLAGS"
   EXTRA_CXXFLAGS="-isystem $PREFIX_LIBSTDCXX_TSAN/include/c++/$GCC_VERSION/backward $EXTRA_CXXFLAGS"
   EXTRA_CXXFLAGS="-isystem $PREFIX_LIBSTDCXX_TSAN/include/c++/$GCC_VERSION $EXTRA_CXXFLAGS"
   EXTRA_CXXFLAGS="-L$PREFIX_LIBSTDCXX_TSAN/lib $EXTRA_CXXFLAGS"