Skip to content

Fix integration test for RocksDB#29341

Merged
alexey-milovidov merged 3 commits intomasterfrom
fix-rocksdb-test
Sep 25, 2021
Merged

Fix integration test for RocksDB#29341
alexey-milovidov merged 3 commits intomasterfrom
fix-rocksdb-test

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Sep 24, 2021
@alexey-milovidov
Copy link
Copy Markdown
Member Author

#29347

@alexey-milovidov
Copy link
Copy Markdown
Member Author

@azat See the "Remove trash" commits. I have no idea why these tests are flaky and I need your help.

@alexey-milovidov alexey-milovidov self-assigned this Sep 25, 2021
@alexey-milovidov alexey-milovidov merged commit 0bd9626 into master Sep 25, 2021
@alexey-milovidov alexey-milovidov deleted the fix-rocksdb-test branch September 25, 2021 22:06
@azat
Copy link
Copy Markdown
Member

azat commented Sep 26, 2021

@azat See the "Remove trash" commits. I have no idea why these tests are flaky and I need your help.

The problem here is that the server crashed after restart, so the problem is real and it is in the server (precisely in rocksdb) not in tests, will take a look.

@azat
Copy link
Copy Markdown
Member

azat commented Sep 26, 2021

The problem had been fixed in facebook/rocksdb@c4a503f

azat added a commit to azat/ClickHouse that referenced this pull request Sep 26, 2021
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: ClickHouse/rocksdb#13
Fixes: ClickHouse#29341
@azat
Copy link
Copy Markdown
Member

azat commented Sep 26, 2021

The fix is here - #29393

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants