summaryrefslogtreecommitdiff
path: root/db/range_tombstone_fragmenter_test.cc
diff options
context:
space:
mode:
authorPeter Dillinger <peterd@fb.com>2022-10-18 00:35:35 -0700
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>2022-10-18 00:35:35 -0700
commite466173d5cb0735f49a905489be0eb889a26d89d (patch)
treea38b745850fcff121e9391376f1230c1d1a006e4 /db/range_tombstone_fragmenter_test.cc
parent8367f0d2d76de0f7d096cc65f5f9ebfb907d551a (diff)
Print stack traces on frozen tests in CI (#10828)
Summary: Instead of existing calls to ps from gnu_parallel, call a new wrapper that does ps, looks for unit test like processes, and uses pstack or gdb to print thread stack traces. Also, using `ps -wwf` instead of `ps -wf` ensures output is not cut off. For security, CircleCI runs with security restrictions on ptrace (/proc/sys/kernel/yama/ptrace_scope = 1), and this change adds a work-around to `InstallStackTraceHandler()` (only used by testing tools) to allow any process from the same user to debug it. (I've also touched >100 files to ensure all the unit tests call this function.) Pull Request resolved: https://github.com/facebook/rocksdb/pull/10828 Test Plan: local manual + temporary infinite loop in a unit test to observe in CircleCI Reviewed By: hx235 Differential Revision: D40447634 Pulled By: pdillinger fbshipit-source-id: 718a4c4a5b54fa0f9af2d01a446162b45e5e84e1
Diffstat (limited to 'db/range_tombstone_fragmenter_test.cc')
-rw-r--r--db/range_tombstone_fragmenter_test.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/db/range_tombstone_fragmenter_test.cc b/db/range_tombstone_fragmenter_test.cc
index 368dc909f..46b3c99b5 100644
--- a/db/range_tombstone_fragmenter_test.cc
+++ b/db/range_tombstone_fragmenter_test.cc
@@ -549,6 +549,7 @@ TEST_F(RangeTombstoneFragmenterTest, SeekOutOfBounds) {
} // namespace ROCKSDB_NAMESPACE
int main(int argc, char** argv) {
+ ROCKSDB_NAMESPACE::port::InstallStackTraceHandler();
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}