Repository: kudu Updated Branches: refs/heads/master 0a9d1aac2 -> 726514abf
debug-util-test: add status message when stacks fail The TestSnapshot test case is flaky, and it seems to be because one of the threads sometimes fails to take a stack trace. This patch just adds the Status to the log so that we can diagnose the flake next time it happens. Change-Id: I4f1da4658c2fbb8e4a049edc392b15f7bf14c8fa Reviewed-on: http://gerrit.cloudera.org:8080/9471 Reviewed-by: Adar Dembo <[email protected]> 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/b6682c7e Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/b6682c7e Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/b6682c7e Branch: refs/heads/master Commit: b6682c7ece2170a0524676a9ebc4fd75b45e8304 Parents: 0a9d1aa Author: Todd Lipcon <[email protected]> Authored: Fri Mar 2 15:54:13 2018 -0800 Committer: Todd Lipcon <[email protected]> Committed: Sun Mar 4 18:15:03 2018 +0000 ---------------------------------------------------------------------- src/kudu/util/debug-util-test.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/b6682c7e/src/kudu/util/debug-util-test.cc ---------------------------------------------------------------------- diff --git a/src/kudu/util/debug-util-test.cc b/src/kudu/util/debug-util-test.cc index 13e1926..b44c207 100644 --- a/src/kudu/util/debug-util-test.cc +++ b/src/kudu/util/debug-util-test.cc @@ -186,9 +186,10 @@ TEST_F(DebugUtilTest, TestSnapshot) { int groups = 0; snap.VisitGroups([&](ArrayView<StackTraceSnapshot::ThreadInfo> group) { groups++; - for (auto& info : group) { + for (const auto& info : group) { count++; - LOG(INFO) << info.tid << " " << info.thread_name; + LOG(INFO) << info.tid << " " << info.thread_name + << " (" << info.status.ToString() << ")"; } LOG(INFO) << group[0].stack.ToHexString(); });
