You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2019/08/17 00:10:28 UTC

[kudu] branch master updated: KUDU-2212 mute TSAN on destruction of a locked mutex in glog

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

alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git


The following commit(s) were added to refs/heads/master by this push:
     new 191e329  KUDU-2212 mute TSAN on destruction of a locked mutex in glog
191e329 is described below

commit 191e329a11f6ea3695ea5ee3e1009cbdcc44ec9e
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Fri Jun 28 13:46:05 2019 -0700

    KUDU-2212 mute TSAN on destruction of a locked mutex in glog
    
    This patch adds a suppression for TSAN warning about destruction
    of a locked mutex in libglog.  Since the only registered instances
    of the issue happen only during shutdown of the C++ runtime upon exit
    of the kudu CLI tool, it seems safe to mute it.
    
    The motivation for this change is to hunt down the issue tracked
    by KUDU-2878: while doing so, this benign TSAN warning hinders the
    scenario used to RCA the latter.
    
    The suppression of the warnings for a locked mutex relies on the fix for
    issue 944 in the thread sanitizers. The fix is back-ported as a patch
    for LLVM 6.0 in Kudu's thirdparty.  For details on the TSAN suppressions
    fix, see https://github.com/google/sanitizers/issues/944.
    
    The results of two representative 1K runs are below: kudu-admin-test built
    in TSAN with --gtest_filter='*ToolTest.TestDeleteTable*' before and after
    the fix (yes, I ran many of 1K runs for both versions).
    
      before: 1 out of 1K failed:
        http://dist-test.cloudera.org/job?job_id=aserbin.1565931838.118516
    
      after : 0 out of 1K failed:
        http://dist-test.cloudera.org/job?job_id=aserbin.1565931149.115149
    
    Change-Id: If0b62027a1a4db18bfaa6c89b3070c918fc4f88a
    Reviewed-on: http://gerrit.cloudera.org:8080/13763
    Reviewed-by: Adar Dembo <ad...@cloudera.com>
    Tested-by: Kudu Jenkins
---
 src/kudu/util/sanitizer_options.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/kudu/util/sanitizer_options.cc b/src/kudu/util/sanitizer_options.cc
index 0caff30..de7cf4f 100644
--- a/src/kudu/util/sanitizer_options.cc
+++ b/src/kudu/util/sanitizer_options.cc
@@ -110,6 +110,9 @@ SANITIZER_HOOK_ATTRIBUTE const char *__tsan_default_suppressions() {
   "race:google::InitVLOG3__\n"
   "race:glog_internal_namespace_::Mutex\n"
   "race:vlocal__\n"
+  // See https://issues.apache.org/jira/browse/KUDU-2212 for details on
+  // the destruction of a locked mutex in glog.
+  "mutex:glog_internal_namespace_::Mutex::~Mutex\n"
 
   // gflags variables are accessed without synchronization, but FlagSaver and other
   // APIs acquire locks when accessing them. This should be safe on x86 for