Todd Lipcon has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/9409 )
Change subject: KUDU-2291 (part 8): fix a TSAN issue with libunwind initialization ...................................................................... KUDU-2291 (part 8): fix a TSAN issue with libunwind initialization libunwind uses double-checked locking for initialization, which isn't technically safe. We previously tried to work around this by calling into the stack trace library before starting any kudu::Threads, but that still left us open to races in unit tests like rw_mutex-test which uses std::thread. This patch changes the forced single-threaded initialization to use GoogleOnce instead. Prior to this patch, looping rw_mutex-test on TSAN failed 12/1000 times. With the patch it passed 1000/1000. Change-Id: I522b6553e9cb9a30d7106ff55ad119f7df1f949c Reviewed-on: http://gerrit.cloudera.org:8080/9409 Tested-by: Kudu Jenkins Reviewed-by: Mike Percy <mpe...@apache.org> --- M src/kudu/util/debug-util.cc M src/kudu/util/thread.cc 2 files changed, 26 insertions(+), 5 deletions(-) Approvals: Kudu Jenkins: Verified Mike Percy: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/9409 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I522b6553e9cb9a30d7106ff55ad119f7df1f949c Gerrit-Change-Number: 9409 Gerrit-PatchSet: 4 Gerrit-Owner: Todd Lipcon <t...@apache.org> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <mpe...@apache.org> Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <t...@apache.org>