ClickHouse/contrib
Azat Khuzhin 42af45b2ba rocksdb: fix race condition during multiple DB opening
This should fix the following SIGSEGV, that was found on CI [1]:

    <Fatal> BaseDaemon: Address: NULL pointer. Access: read. Unknown si_code.
    <Fatal> BaseDaemon: 4.4. inlined from ../contrib/rocksdb/utilities/object_registry.cc:19: rocksdb::ObjectLibrary::FindEntry() const
    ...
    <Fatal> BaseDaemon: 7.3. inlined from ../contrib/rocksdb/options/cf_options.cc:678: rocksdb::$_7::operator()()

  [1]: https://clickhouse-test-reports.s3.yandex.net/29341/2b2bec3679df7965af908ce3f1e8e17e39bd12fe/integration_tests_flaky_check_(asan).html#fail1

And also I checked manually with TSan binary, and here is a data race
reported by TSan:

    WARNING: ThreadSanitizer: data race (pid=3356)
      Read of size 8 at 0x7b0c0008cca8 by thread T40:
        2 rocksdb::ObjectLibrary::FindEntry() const obj-x86_64-linux-gnu/../contrib/rocksdb/utilities/object_registry.cc:18:27 (clickhouse-tsan+0x1b839a6c)
        ...
        6 rocksdb::$_7::operator()() const obj-x86_64-linux-gnu/../contrib/rocksdb/options/cf_options.cc:676:32 (clickhouse-tsan+0x1b6bfa63)
        ...
        28 rocksdb::GetColumnFamilyOptionsFromMap() obj-x86_64-linux-gnu/../contrib/rocksdb/options/options_helper.cc:727:10 (clickhouse-tsan+0x1b6fffd2)
        29 DB::StorageEmbeddedRocksDB::initDb() obj-x86_64-linux-gnu/../src/Storages/RocksDB/StorageEmbeddedRocksDB.cpp:359:26 (clickhouse-tsan+0x14195e31)
        ...

      Previous write of size 8 at 0x7b0c0008cca8 by thread T41:
        ...
        9 rocksdb::ObjectLibrary::AddEntry() obj-x86_64-linux-gnu/../contrib/rocksdb/utilities/object_registry.cc:31:19 (clickhouse-tsan+0x1b8392fc)
        ...
        11 rocksdb::RegisterTableFactories()::$_0::operator()() const obj-x86_64-linux-gnu/../contrib/rocksdb/table/table_factory.cc:23:14 (clickhouse-tsan+0x1b7ea94c)
        ...
        43 rocksdb::GetColumnFamilyOptionsFromMap() obj-x86_64-linux-gnu/../contrib/rocksdb/options/options_helper.cc:727:10 (clickhouse-tsan+0x1b6fffd2)
        44 DB::StorageEmbeddedRocksDB::initDb() obj-x86_64-linux-gnu/../src/Storages/RocksDB/StorageEmbeddedRocksDB.cpp:359:26 (clickhouse-tsan+0x14195e31)

Refs: https://github.com/ClickHouse-Extras/rocksdb/pull/13
Fixes: #29341
2021-09-26 23:41:43 +03:00
..
abseil-cpp@b004a8a024 Switch performance and merge contrib 2021-09-10 11:10:45 +00:00
abseil-cpp-cmake Updated CacheDictionary 2021-03-06 14:36:37 +03:00
AMQP-CPP@1a6c51f4ac fix unbundled build 2021-08-03 17:29:59 +03:00
amqpcpp-cmake Fix 2021-08-30 20:59:03 +03:00
arrow@078e21bad3 Try update arrow 2021-08-02 19:33:15 +03:00
arrow-cmake remove duplicated source files in arrow-cmake 2021-08-16 18:56:14 +08:00
avro@e43c46e87f More pytest fixes (#23538) 2021-06-07 20:29:19 +03:00
avro-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
aws@06aa8759d1 contrib/aws/ 2021-08-31 12:54:45 +00:00
aws-c-common@736a82d169
aws-c-event-stream@3bc33662f9
aws-checksums@519d6d9093
aws-s3-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
base64@af9b331f2b
base64-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
boost@66d17f060c added priority queue 2021-09-06 11:37:51 +00:00
boost-cmake Better 2021-09-06 16:39:46 +00:00
boringssl@a6a2e2ab3e Fix submodules 2021-05-19 14:52:02 +03:00
boringssl-cmake Fix 2021-08-30 20:59:03 +03:00
brotli@63be8a9940 Update brotli to a version with a recent origin fix: "encoder: fix rare access to uninitialized data in ring-buffer" 2021-02-26 11:50:01 +00:00
brotli-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
bzip2@bf905ea225 Add submodule bzip2 2021-08-07 06:18:14 +00:00
bzip2-cmake Add bzip2 file compression 2021-08-07 00:25:52 +00:00
capnproto@a00ccd91b3
capnproto-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
cassandra@eb9b68dadb suppress msan cassandra 2021-05-28 16:22:50 +03:00
cctz@c0f1bcb97f Update cctz to 2020e 2020-12-25 23:36:44 +03:00
cctz-cmake Add CI check for darwin-aarch64 (#25560) 2021-06-25 18:21:56 +03:00
cityhash102
consistent-hashing
cppkafka@5a119f689f Fix kafka failover issue (#21118). 2021-06-09 16:02:56 +02:00
cppkafka-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
croaring@2c867e9f9c Update roaring just in case 2021-06-10 02:36:36 +03:00
croaring-cmake Disable jemalloc under OSX 2021-08-16 18:04:46 +02:00
curl@3b8bbbbd16
curl-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
cyrus-sasl@e6466edfd6 Fix submodules 2021-05-19 14:52:02 +03:00
cyrus-sasl-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
datasketches-cpp@7d73d7610d Fix submodules 2021-05-19 14:52:02 +03:00
double-conversion@cf2f0f3d54
double-conversion-cmake Somewhat better support for paths with whitespaces 2021-04-24 22:48:44 +03:00
dragonbox@923705af6f Update Dragonbox 2021-01-17 23:38:59 +03:00
dragonbox-cmake
fast_float@7eae925b51
fastops@012b777df9 Switch performance and merge contrib 2021-09-10 11:10:45 +00:00
fastops-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
flatbuffers@eb3f827948 update 2021-06-18 13:34:15 +03:00
fmtlib@c108ee1d59
fmtlib-cmake
gcem@8d4f1b5d76
googletest@e7e591764b Update 2021-03-19 14:34:52 +08:00
grpc@60c986e15c Fix submodules 2021-05-19 14:52:02 +03:00
grpc-cmake Updated CacheDictionary 2021-03-06 14:36:37 +03:00
h3@c7f46cfd71 Revert "Implement h3ToGeo function" 2021-06-22 17:25:21 +03:00
h3-cmake update cmake 2021-06-22 10:39:27 +03:00
hyperscan@e9f08df021 Fix debug assertion in Hyperscan 2021-01-31 07:23:07 +03:00
hyperscan-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
icu@faa2f9f9e1
icu-cmake Somewhat better support for paths with whitespaces 2021-04-24 22:48:44 +03:00
icudata@f020820388
jemalloc@e6891d9746 MADV_DONTNEED check in runtime for qemu (via patching jemalloc) 2020-12-19 15:34:12 +03:00
jemalloc-cmake jemalloc: fix under osx (zone_register() had been optimized out again) 2021-08-18 09:47:59 +03:00
krb5@5149dea4e2 Fix MSan report in Kerberos library 2021-01-17 21:35:53 +03:00
krb5-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
lemmagen-c@59537bdcf5 Updated submodules to include new READMEs 2021-06-19 23:15:16 +00:00
lemmagen-c-cmake added LemmaGen lemmatizer 2021-06-05 00:52:35 +00:00
libc-headers@a720b7105a
libcpuid@8db3b8d2d3
libcpuid-cmake Disable base64, fastops and libcpuid on unsupported platforms better 2021-04-02 13:57:46 +03:00
libcxx@2fa892f69a Bump submodules to versions with fixes 2021-04-09 18:07:11 +04:00
libcxx-cmake Somewhat better support for paths with whitespaces 2021-04-24 22:48:44 +03:00
libcxxabi@df8f1e727d Update libcxx and use unstable ABI to provide better performance 2021-01-11 02:08:33 +00:00
libcxxabi-cmake Somewhat better support for paths with whitespaces 2021-04-24 22:48:44 +03:00
libdivide Update libdivide to the latest master (2) 2021-03-30 00:37:27 +03:00
libfarmhash
libgsasl@383ee28e82
libhdfs3@082e55f17d Update libhdfs3 2021-09-25 02:54:18 +03:00
libhdfs3-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
libmetrohash Fix build 2021-08-15 11:21:46 +03:00
libpq@e071ea570f Update libpq 2021-07-02 22:26:33 +03:00
libpq-cmake Update libpq 2021-07-02 00:07:23 +03:00
libpqxx@357608d11b Update libpqxx 2021-06-16 09:38:33 +03:00
libpqxx-cmake Postgres ON CONFLICT 2021-08-24 12:37:32 +00:00
librdkafka@b8554f1682 Bump librdkafka (to fix metadata cache destroying) 2021-08-19 21:38:06 +03:00
librdkafka-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
libstemmer_c@c753054304 Updated submodules to include new READMEs 2021-06-19 23:15:16 +00:00
libstemmer-c-cmake minor fix 2021-06-03 19:20:35 +00:00
libunwind@c4ea9848a6 Updated libunwind to protect from wrong CFA expressions 2021-08-24 21:36:45 +03:00
libunwind-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
libuv@e2e9b7e9f9 fix 2021-01-19 01:02:48 +03:00
libxml2@18890f471c
libxml2-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
llvm@f30bbecef7 Switch performance and merge contrib 2021-09-10 11:10:45 +00:00
lz4@f39b79fb02
lz4-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
magic_enum@38f86e4d09 Initial: replacing hardcoded toString for enums with magic_enum 2021-09-06 16:24:03 +02:00
magic-enum-cmake Simplifying exception messages 2021-09-11 00:40:18 +02:00
mariadb-connector-c@5f4034a3a6 Updated MariaDB connector fix cmake 2021-04-08 21:47:12 +03:00
miniselect@be0af6bd0b
msgpack-c@46684265d5
murmurhash Make -Wreserved-id-macro happy 2021-06-22 14:13:19 +03:00
nanodbc@df52a1232d Update nanodbc 2021-08-24 12:50:07 +00:00
nanodbc-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
NuRaft@7ecb16844a Fixup 2021-08-02 15:00:05 +03:00
nuraft-cmake Followup 2021-07-29 14:18:44 +03:00
openldap@0208811b60
openldap-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
orc@0a936f6bbd Update orc and arrow 2021-06-15 16:15:27 +03:00
pdqsort
poco@46c80daf1b Move back 2021-09-06 16:41:49 +00:00
poco-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
protobuf@75601841d1 Try update protobuf to 3.17.3 2021-07-26 09:49:00 +00:00
protobuf-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
rapidjson@c4ef90ccdb
re2@13ebb377c6 Update re2 to 2021-04-01 for GCC 11 compatibility 2021-05-17 13:30:55 +02:00
re2_st re2_st: Avoid replacing re2::re2_internal 2021-05-17 13:49:48 +02:00
replxx@f97765df14 Bump replxx 2021-08-23 22:27:54 +03:00
replxx-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
rocksdb@296c1b8b95 rocksdb: fix race condition during multiple DB opening 2021-09-26 23:41:43 +03:00
rocksdb-cmake Update RocksDB to master 2021-07-16 15:38:16 +03:00
s2geometry@20ea540d81 fix submodule 2021-07-13 10:50:38 +00:00
s2geometry-cmake done 2021-07-19 17:47:24 +03:00
sentry-native@94644e92f0
simdjson@8df32cea33 Fix submodules 2021-05-19 14:52:02 +03:00
simdjson-cmake Allow to build with AVX2 2021-08-10 03:46:03 +03:00
snappy@3f194acb57
sparsehash-c11@cf0bffaa45
sqlite-amalgamation@9818baa5d0 Add library as submodule 2021-07-07 20:06:35 +00:00
sqlite-cmake Add .cmake 2021-07-09 10:27:53 +00:00
stats@b6dd459c10
stats-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
thrift@010ccf0a0c
unixodbc@b0ad30f7f6
unixodbc-cmake Maybe better support for paths with whitespaces 2021-04-24 22:47:52 +03:00
wordnet-blast@1d16ac2803 Updated submodules to include new READMEs 2021-06-19 23:15:16 +00:00
wordnet-blast-cmake added WordNet synonyms extensions 2021-06-03 19:28:12 +00:00
xz@869b9d1b4e
yaml-cpp@0c86adac6d Implemented YAMLParser class 2021-05-21 21:56:22 +03:00
yaml-cpp-cmake Implemented YAMLParser class 2021-05-21 21:56:22 +03:00
zlib-ng@6a5e93b900 Try update contrib/zlib-ng 2021-08-06 18:03:05 +03:00
zstd@a488ba114e Fix submodules 2021-05-19 14:52:02 +03:00
zstd-cmake Update zstd to v1.5.0 2021-05-15 00:57:24 +02:00
CMakeLists.txt Merge pull request #28659 from myrrc/improvement/tostring_to_magic_enum 2021-09-12 15:26:29 +03:00