kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dral...@apache.org
Subject kudu git commit: [flaky tests] Address LSAN false positives
Date Thu, 04 May 2017 20:38:40 GMT
Repository: kudu
Updated Branches:
  refs/heads/master 174a058e2 -> dcd029eca


[flaky tests] Address LSAN false positives

Some tests, like external_mini_cluster-itest, are now only failing
in ASAN due to leaks. Upon inspection I could only find false
positives among these leaks around thread local variables.

This seems related to this issue:
https://github.com/google/sanitizers/issues/757

The fix is to wrap those specific instances of false positives
with ScopedLeakDisabler so that they don't get reported.

After many tries I was unable to come up with the right incantation
to cause this in dist-tests. Running the highest failing test in
ASAN with stress was not enough to cause this. Somehow this is
more likely in jenkins where these failures are pretty common.

Change-Id: I8c8d9ff83c0cfbc11cab213a25cbd5daa3b25869
Reviewed-on: http://gerrit.cloudera.org:8080/6320
Reviewed-by: David Ribeiro Alves <davidralves@gmail.com>
Tested-by: Kudu Jenkins


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

Branch: refs/heads/master
Commit: dcd029eca777f44bc8dff922a2dedfaa8a99a6a9
Parents: 174a058
Author: David Alves <dralves@apache.org>
Authored: Wed Mar 8 12:24:22 2017 -0800
Committer: David Ribeiro Alves <davidralves@gmail.com>
Committed: Thu May 4 20:38:12 2017 +0000

----------------------------------------------------------------------
 src/kudu/util/kernel_stack_watchdog.cc | 4 ++++
 src/kudu/util/thread_restrictions.cc   | 4 ++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/dcd029ec/src/kudu/util/kernel_stack_watchdog.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/kernel_stack_watchdog.cc b/src/kudu/util/kernel_stack_watchdog.cc
index 2304163..829431f 100644
--- a/src/kudu/util/kernel_stack_watchdog.cc
+++ b/src/kudu/util/kernel_stack_watchdog.cc
@@ -23,6 +23,7 @@
 #include <string>
 
 #include "kudu/util/debug-util.h"
+#include "kudu/util/debug/leakcheck_disabler.h"
 #include "kudu/util/env.h"
 #include "kudu/util/faststring.h"
 #include "kudu/util/flag_tags.h"
@@ -154,6 +155,9 @@ void KernelStackWatchdog::RunThread() {
 }
 
 KernelStackWatchdog::TLS* KernelStackWatchdog::GetTLS() {
+  // Disable leak check. LSAN sometimes gets false positives on thread locals.
+  // See: https://github.com/google/sanitizers/issues/757
+  debug::ScopedLeakCheckDisabler d;
   INIT_STATIC_THREAD_LOCAL(KernelStackWatchdog::TLS, tls_);
   return tls_;
 }

http://git-wip-us.apache.org/repos/asf/kudu/blob/dcd029ec/src/kudu/util/thread_restrictions.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/thread_restrictions.cc b/src/kudu/util/thread_restrictions.cc
index c6207a0..40372c1 100644
--- a/src/kudu/util/thread_restrictions.cc
+++ b/src/kudu/util/thread_restrictions.cc
@@ -18,6 +18,7 @@
 #include <glog/logging.h>
 #include <gperftools/heap-checker.h>
 
+#include "kudu/util/debug/leakcheck_disabler.h"
 #include "kudu/util/thread.h"
 #include "kudu/util/threadlocal.h"
 #include "kudu/util/thread_restrictions.h"
@@ -41,6 +42,9 @@ struct LocalThreadRestrictions {
 };
 
 LocalThreadRestrictions* LoadTLS() {
+  // Disable leak check. LSAN sometimes gets false positives on thread locals.
+  // See: https://github.com/google/sanitizers/issues/757
+  debug::ScopedLeakCheckDisabler d;
   BLOCK_STATIC_THREAD_LOCAL(LocalThreadRestrictions, local_thread_restrictions);
   return local_thread_restrictions;
 }


Mime
View raw message