Carry the crc32c TSan fix onto v11.8.1 - #35
Merged
thevar1able merged 1 commit intoSep 8, 2026
Merged
Conversation
The global `bool pmull_runtime_flag` is written from `IsFastCrc32Supported` and `Choose_Extend` without synchronization, causing a TSan report when multiple RocksDB instances are opened concurrently. Make it `std::atomic<bool>` with relaxed ordering, since it is always set to the same value. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> (cherry picked from commit dabb7ba)
alexey-milovidov
pushed a commit
to original-brownbear/ClickHouse
that referenced
this pull request
Sep 21, 2026
The submodule now points to `ClickHouse/v11.8.1` in the ClickHouse fork (ClickHouse/rocksdb#35), which is upstream tag `v11.8.1` plus the existing ClickHouse patch that makes `pmull_runtime_flag` in `crc32c` a `std::atomic<bool>` (TSan fix from ClickHouse/rocksdb#29), exactly as the previous `ClickHouse/v10.10.fb` pin did. Adaptations: - `contrib/rocksdb-cmake/CMakeLists.txt`: add the 13 library sources that upstream added to `LIB_SOURCES` between v10.10.1 and v11.8.1 (blob partition manager, blob gen2 format, blob write batch transformer, `version_util`, read-path blob resolver, multi-scan index iterator, coroutine stats and I/O dispatcher, copy engine, sorted run builder, trie index). - `StorageEmbeddedRocksDB`: RocksDB 11.0 removed the raw `DB *` overloads of `DB::Open` and `DB::OpenForReadOnly`; use the `std::unique_ptr<DB>` overloads instead. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-picks dabb7ba ("Fix data race on
pmull_runtime_flagin crc32c") fromClickHouse/v10.10.fbonto upstream tagv11.8.1. The patch turns the globalbool pmull_runtime_flaginutil/crc32c.cc/util/crc32c_arm64.ccinto anstd::atomic<bool>, fixing the TSan report seen when several RocksDB instances are opened concurrently (ClickHouse commit 4bb21056e6). It applied without conflicts; upstream v11.8.1 does not contain an equivalent fix.Once merged, ClickHouse's
contrib/rocksdbsubmodule is bumped to this branch head.