From ff32346415b147bd7d596728a645dc502af95ac8 Mon Sep 17 00:00:00 2001 From: Andrew Kryczka Date: Tue, 7 Jun 2022 15:15:09 -0700 Subject: [PATCH] Set db_stress defaults for TSAN deadlock detector (#10131) Summary: After https://github.com/facebook/rocksdb/issues/9357 we began seeing the following error attempting to acquire locks for file ingestion: ``` FATAL: ThreadSanitizer CHECK failed: /home/engshare/third-party2/llvm-fb/12/src/llvm/compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector.h:67 "((n_all_locks_)) < (((sizeof(all_locks_with_contexts_)/sizeof((all_locks_with_contexts_)[0]))))" (0x40, 0x40) ``` The command was using default values for `ingest_external_file_width` (1000) and `log2_keys_per_lock` (2). The expected number of locks needed to update those keys is then (1000 / 2^2) = 250, which is above the 0x40 (64) limit. This PR reduces the default value of `ingest_external_file_width` to 100 so the expected number of locks is 25, which is within the limit. Pull Request resolved: https://github.com/facebook/rocksdb/pull/10131 Reviewed By: ltamasi Differential Revision: D36986307 Pulled By: ajkr fbshipit-source-id: e918cdb2fcc39517d585f1e5fd2539e185ada7c1 --- db_stress_tool/db_stress_gflags.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db_stress_tool/db_stress_gflags.cc b/db_stress_tool/db_stress_gflags.cc index 97f02f7281b..8b0c6fe3536 100644 --- a/db_stress_tool/db_stress_gflags.cc +++ b/db_stress_tool/db_stress_gflags.cc @@ -636,7 +636,7 @@ DEFINE_int32(ingest_external_file_one_in, 0, "every N operations on average. 0 indicates IngestExternalFile() " "is disabled."); -DEFINE_int32(ingest_external_file_width, 1000, +DEFINE_int32(ingest_external_file_width, 100, "The width of the ingested external files."); DEFINE_int32(compact_files_one_in, 0,