https://clickhouse-test-reports.s3.yandex.net/29044/5be9ad2b09c7d10ba80da573b971794aac7837b7/stress_test_(address).html#fail1

```
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:11.395839 [ 22744 ] {} <Fatal> BaseDaemon: ########################################
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:11.587120 [ 22744 ] {} <Fatal> BaseDaemon: (version 21.11.1.8105, build id: 3CD890B84455123690A5C1FA040744E6D5606EF9) (from thread 3639) (query_id: 187001bc-4862-43ca-9fe5-bd6d48975562) Received signal Segmentation fault (11)
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:11.593330 [ 22744 ] {} <Fatal> BaseDaemon: Address: NULL pointer. Access: read. Address not mapped to object.
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:11.596015 [ 22744 ] {} <Fatal> BaseDaemon: Stack trace: 0x31539d06 0x315870e9 0x219b3422 0x219a71b5 0x214fdd4d 0x245cf08a 0x23428006 0x23419cc0 0x23418aa2 0x23a7b79e 0x23a7dac4 0x23ff3910 0x23fee7a0 0x2582f984 0x25855da0 0x2cd25d2f 0x2cd26a21 0x2d01cfe6 0x2d0164fa 0x7fea4aed3609 0x7fea4adfa293
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:17.791030 [ 22771 ] {} <Fatal> BaseDaemon: ########################################
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:17.791811 [ 22771 ] {} <Fatal> BaseDaemon: (version 21.11.1.8105, build id: 3CD890B84455123690A5C1FA040744E6D5606EF9) (from thread 1184) (query_id: 0df5bbc8-1c02-4150-ae3f-831eb83967d0) Received signal Aborted (6)
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:17.796426 [ 22771 ] {} <Fatal> BaseDaemon: 
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:17.799269 [ 22771 ] {} <Fatal> BaseDaemon: Stack trace: 0x7fea4ad1e18b 0x7fea4acfd859 0x31fc61aa 0x31509f0e 0x3150ac0e 0x219adde0 0x219b008d 0x22c54af6 0x22c516db 0x22c509c8 0x23ff3910 0x23fee7a0 0x2582f984 0x25855da0 0x2cd25d2f 0x2cd26a21 0x2d01cfe6 0x2d0164fa 0x7fea4aed3609 0x7fea4adfa293
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:17.839371 [ 22771 ] {} <Fatal> BaseDaemon: 3. gsignal @ 0x4618b in /usr/lib/x86_64-linux-gnu/libc-2.31.so
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:17.887459 [ 22771 ] {} <Fatal> BaseDaemon: 4. abort @ 0x25859 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:18.358134 [ 22771 ] {} <Fatal> BaseDaemon: 5.1. inlined from ./obj-x86_64-linux-gnu/../contrib/libcxx/include/string:1444: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__is_long() const
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:18.360867 [ 22771 ] {} <Fatal> BaseDaemon: 5.2. inlined from ../contrib/libcxx/include/string:1538: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__get_pointer() const
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:18.362911 [ 22771 ] {} <Fatal> BaseDaemon: 5.3. inlined from ../contrib/libcxx/include/string:1264: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::data() const
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:18.363727 [ 22771 ] {} <Fatal> BaseDaemon: 5.4. inlined from ../contrib/libcxx/include/string:1262: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::c_str() const
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:18.366246 [ 22771 ] {} <Fatal> BaseDaemon: 5.5. inlined from ../contrib/rocksdb/port/port_posix.cc:51: rocksdb::port::PthreadCall(char const*, int)
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:18.367026 [ 22771 ] {} <Fatal> BaseDaemon: 5. ../contrib/rocksdb/port/port_posix.cc:77: rocksdb::port::Mutex::~Mutex() @ 0x31fc61aa in /usr/bin/clickhouse
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:20.655199 [ 22771 ] {} <Fatal> BaseDaemon: 6. ./obj-x86_64-linux-gnu/../contrib/rocksdb/db/db_impl/db_impl.cc:721: rocksdb::DBImpl::~DBImpl() @ 0x31509f0e in /usr/bin/clickhouse
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:22.584279 [ 22744 ] {} <Fatal> BaseDaemon: 3. ./obj-x86_64-linux-gnu/../contrib/rocksdb/db/db_impl/db_impl.cc:3242: rocksdb::DBImpl::GetOptions(rocksdb::ColumnFamilyHandle*) const @ 0x31539d06 in /usr/bin/clickhouse
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:24.257962 [ 22771 ] {} <Fatal> BaseDaemon: 7. ./obj-x86_64-linux-gnu/../contrib/rocksdb/db/db_impl/db_impl.cc:716: rocksdb::DBImpl::~DBImpl() @ 0x3150ac0e in /usr/bin/clickhouse
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:25.652398 [ 22744 ] {} <Fatal> BaseDaemon: 4. ./obj-x86_64-linux-gnu/../contrib/rocksdb/include/rocksdb/db.h:1259: rocksdb::DB::GetOptions() const @ 0x315870e9 in /usr/bin/clickhouse
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:26.439372 [ 22771 ] {} <Fatal> BaseDaemon: 8. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:0: DB::StorageEmbeddedRocksDB::initDb() @ 0x219adde0 in /usr/bin/clickhouse
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:26.579350 [ 22744 ] {} <Fatal> BaseDaemon: 5. ./obj-x86_64-linux-gnu/../src/Storages/RocksDB/StorageEmbeddedRocksDB.cpp:463: DB::StorageEmbeddedRocksDB::getRocksDBStatistics() const @ 0x219b3422 in /usr/bin/clickhouse
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:27.284973 [ 22771 ] {} <Fatal> BaseDaemon: 9. ./obj-x86_64-linux-gnu/../src/Storages/RocksDB/StorageEmbeddedRocksDB.cpp:0: DB::StorageEmbeddedRocksDB::truncate(std::__1::shared_ptr<DB::IAST> const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, std::__1::shared_ptr<DB::Context const>, DB::TableExclusiveLockHolder&) @ 0x219b008d in /usr/bin/clickhouse
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:28.119433 [ 22744 ] {} <Fatal> BaseDaemon: 6. ./obj-x86_64-linux-gnu/../src/Storages/RocksDB/StorageSystemRocksDB.cpp:0: DB::StorageSystemRocksDB::fillData(std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >&, std::__1::shared_ptr<DB::Context const>, DB::SelectQueryInfo const&) const @ 0x219a71b5 in /usr/bin/clickhouse
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:28.536641 [ 22771 ] {} <Fatal> BaseDaemon: 10. ./obj-x86_64-linux-gnu/../src/Interpreters/InterpreterDropQuery.cpp:207: DB::InterpreterDropQuery::executeToTableImpl(DB::ASTDropQuery&, std::__1::shared_ptr<DB::IDatabase>&, StrongTypedef<wide::integer<128ul, unsigned int>, DB::UUIDTag>&) @ 0x22c54af6 in /usr/bin/clickhouse
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:28.841604 [ 22771 ] {} <Fatal> BaseDaemon: 11. ./obj-x86_64-linux-gnu/../src/Interpreters/InterpreterDropQuery.cpp:86: DB::InterpreterDropQuery::executeToTable(DB::ASTDropQuery&) @ 0x22c516db in /usr/bin/clickhouse
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:28.946739 [ 22771 ] {} <Fatal> BaseDaemon: 12. ./obj-x86_64-linux-gnu/../src/Interpreters/InterpreterDropQuery.cpp:0: DB::InterpreterDropQuery::execute() @ 0x22c509c8 in /usr/bin/clickhouse
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:29.687136 [ 22744 ] {} <Fatal> BaseDaemon: 7.1. inlined from ./obj-x86_64-linux-gnu/../contrib/libcxx/include/vector:658: std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >::size() const
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:29.691227 [ 22744 ] {} <Fatal> BaseDaemon: 7.2. inlined from ../contrib/libcxx/include/vector:1566: std::__1::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::__1::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn> > >::at(unsigned long)
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:29.693257 [ 22744 ] {} <Fatal> BaseDaemon: 7. ../src/Storages/System/IStorageSystemOneBlock.h:63: DB::IStorageSystemOneBlock<DB::StorageSystemRocksDB>::read(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::shared_ptr<DB::StorageInMemoryMetadata const> const&, DB::SelectQueryInfo&, std::__1::shared_ptr<DB::Context const>, DB::QueryProcessingStage::Enum, unsigned long, unsigned int) @ 0x214fdd4d in /usr/bin/clickhouse
/var/log/clickhouse-server/clickhouse-server.log.2:2021.09.17 20:15:33.125039 [ 517 ] {} <Fatal> Application: Child process was terminated by signal 11.
```
const String & relative_data_path_,
        const StorageInMemoryMetadata & metadata_,
        bool attach,
        ContextPtr context_,
        const String & primary_key_)
    : IStorage(table_id_)
    , WithContext(context_->getGlobalContext())
    , primary_key{primary_key_}
{
    setInMemoryMetadata(metadata_);
    rocksdb_dir = context_->getPath() + relative_data_path_;
    if (!attach)
    {
        fs::create_directories(rocksdb_dir);
    }
    initDb();
}
void StorageEmbeddedRocksDB::truncate(const ASTPtr &, const StorageMetadataPtr & , ContextPtr, TableExclusiveLockHolder &)
{
    rocksdb_ptr->Close();
    fs::remove_all(rocksdb_dir);
    fs::create_directories(rocksdb_dir);
    initDb();
}
void StorageEmbeddedRocksDB::initDb()