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
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
avro-cmake
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
base64@af9b331f2b
base64-cmake
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
boringssl-cmake Fix 2021-08-30 20:59:03 +03:00
brotli@63be8a9940
brotli-cmake
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
cassandra@eb9b68dadb
cctz@c0f1bcb97f
cctz-cmake
cityhash102
consistent-hashing
cppkafka@5a119f689f
cppkafka-cmake
croaring@2c867e9f9c
croaring-cmake Disable jemalloc under OSX 2021-08-16 18:04:46 +02:00
curl@3b8bbbbd16
curl-cmake
cyrus-sasl@e6466edfd6
cyrus-sasl-cmake
datasketches-cpp@7d73d7610d
double-conversion@cf2f0f3d54
double-conversion-cmake
dragonbox@923705af6f
dragonbox-cmake
fast_float@7eae925b51
fastops@012b777df9 Switch performance and merge contrib 2021-09-10 11:10:45 +00:00
fastops-cmake
flatbuffers@eb3f827948
fmtlib@c108ee1d59
fmtlib-cmake
gcem@8d4f1b5d76
googletest@e7e591764b
grpc@60c986e15c
grpc-cmake
h3@c7f46cfd71
h3-cmake
hyperscan@e9f08df021
hyperscan-cmake
icu@faa2f9f9e1
icu-cmake
icudata@f020820388
jemalloc@e6891d9746
jemalloc-cmake jemalloc: fix under osx (zone_register() had been optimized out again) 2021-08-18 09:47:59 +03:00
krb5@5149dea4e2
krb5-cmake
lemmagen-c@59537bdcf5
lemmagen-c-cmake
libc-headers@a720b7105a
libcpuid@8db3b8d2d3
libcpuid-cmake
libcxx@2fa892f69a
libcxx-cmake
libcxxabi@df8f1e727d
libcxxabi-cmake
libdivide
libfarmhash
libgsasl@383ee28e82
libhdfs3@082e55f17d Update libhdfs3 2021-09-25 02:54:18 +03:00
libhdfs3-cmake
libmetrohash Fix build 2021-08-15 11:21:46 +03:00
libpq@e071ea570f
libpq-cmake
libpqxx@357608d11b
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
libstemmer_c@c753054304
libstemmer-c-cmake
libunwind@c4ea9848a6 Updated libunwind to protect from wrong CFA expressions 2021-08-24 21:36:45 +03:00
libunwind-cmake
libuv@e2e9b7e9f9
libxml2@18890f471c
libxml2-cmake
llvm@f30bbecef7 Switch performance and merge contrib 2021-09-10 11:10:45 +00:00
lz4@f39b79fb02
lz4-cmake
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
miniselect@be0af6bd0b
msgpack-c@46684265d5
murmurhash
nanodbc@df52a1232d Update nanodbc 2021-08-24 12:50:07 +00:00
nanodbc-cmake
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
orc@0a936f6bbd
pdqsort
poco@46c80daf1b Move back 2021-09-06 16:41:49 +00:00
poco-cmake
protobuf@75601841d1
protobuf-cmake
rapidjson@c4ef90ccdb
re2@13ebb377c6
re2_st
replxx@f97765df14 Bump replxx 2021-08-23 22:27:54 +03:00
replxx-cmake
rocksdb@296c1b8b95 rocksdb: fix race condition during multiple DB opening 2021-09-26 23:41:43 +03:00
rocksdb-cmake
s2geometry@20ea540d81
s2geometry-cmake
sentry-native@94644e92f0
simdjson@8df32cea33
simdjson-cmake Allow to build with AVX2 2021-08-10 03:46:03 +03:00
snappy@3f194acb57
sparsehash-c11@cf0bffaa45
sqlite-amalgamation@9818baa5d0
sqlite-cmake
stats@b6dd459c10
stats-cmake
thrift@010ccf0a0c
unixodbc@b0ad30f7f6
unixodbc-cmake
wordnet-blast@1d16ac2803
wordnet-blast-cmake
xz@869b9d1b4e
yaml-cpp@0c86adac6d
yaml-cpp-cmake
zlib-ng@6a5e93b900 Try update contrib/zlib-ng 2021-08-06 18:03:05 +03:00
zstd@a488ba114e
zstd-cmake
CMakeLists.txt Merge pull request #28659 from myrrc/improvement/tostring_to_magic_enum 2021-09-12 15:26:29 +03:00