Skip to content

Commit

Permalink
Set db_stress defaults for TSAN deadlock detector (#10131)
Browse files Browse the repository at this point in the history
Summary:
After #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: #10131

Reviewed By: ltamasi

Differential Revision: D36986307

Pulled By: ajkr

fbshipit-source-id: e918cdb2fcc39517d585f1e5fd2539e185ada7c1
  • Loading branch information
ajkr authored and facebook-github-bot committed Jun 7, 2022
1 parent 5cbee1f commit ff32346
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db_stress_tool/db_stress_gflags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ff32346

Please sign in to comment.