Disable FlushSchedule when running TSAN
Summary: There's a bug in TSAN (or libstdc++?) with std::shared_ptr<> for some reason. In db_test, only FlushSchedule is affected. See more: https://groups.google.com/forum/#!topic/thread-sanitizer/vz_s-t226Vg With this change and all other @sdong's and mine diffs, our db_test should be TSAN-clean. I'll move to other tests. Test Plan: no more flush schedule when running TSAN Reviewers: yhchiang, rven, sdong Reviewed By: sdong Subscribers: sdong, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D32469
This commit is contained in:
parent
e84299c769
commit
4bdf38b16e
4
Makefile
4
Makefile
@ -61,8 +61,8 @@ endif
|
||||
ifdef COMPILE_WITH_TSAN
|
||||
DISABLE_JEMALLOC=1
|
||||
EXEC_LDFLAGS += -fsanitize=thread -pie
|
||||
PLATFORM_CCFLAGS += -fsanitize=thread -fPIC
|
||||
PLATFORM_CXXFLAGS += -fsanitize=thread -fPIC
|
||||
PLATFORM_CCFLAGS += -fsanitize=thread -fPIC -DROCKSDB_TSAN_RUN
|
||||
PLATFORM_CXXFLAGS += -fsanitize=thread -fPIC -DROCKSDB_TSAN_RUN
|
||||
endif
|
||||
|
||||
ifndef DISABLE_JEMALLOC
|
||||
|
@ -3036,6 +3036,9 @@ TEST(DBTest, RecoverDuringMemtableCompaction) {
|
||||
} while (ChangeOptions());
|
||||
}
|
||||
|
||||
// false positive TSAN report on shared_ptr --
|
||||
// https://groups.google.com/forum/#!topic/thread-sanitizer/vz_s-t226Vg
|
||||
#ifndef ROCKSDB_TSAN_RUN
|
||||
TEST(DBTest, FlushSchedule) {
|
||||
Options options = CurrentOptions();
|
||||
options.disable_auto_compactions = true;
|
||||
@ -3073,6 +3076,7 @@ TEST(DBTest, FlushSchedule) {
|
||||
ASSERT_LE(pikachu_tables, static_cast<uint64_t>(10));
|
||||
ASSERT_GT(pikachu_tables, static_cast<uint64_t>(0));
|
||||
}
|
||||
#endif // enabled only if not TSAN run
|
||||
|
||||
TEST(DBTest, MinorCompactionsHappen) {
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user