Skip to content

recently released 25.8.22 stopped works with google over s3 disks #103232

Closed

Description

@Slach

Company or project name

No response

Describe what's wrong

following config stop works in clickhouse/clickchouse-server:25.8.12, but successfully works with clickhouse/clickchouse-server:25.8.11

/etc/clickhouse-server/config.d/storage_configuration_gcs.xml

<yandex>
  <storage_configuration>
    <disks>
      <disk_gcs>
        <type>s3</type>
        <endpoint>https://storage.googleapis.com/${QA_GCS_OVER_S3_BUCKET}</endpoint>
        <access_key_id>${QA_GCS_OVER_S3_ACCESS_KEY}</access_key_id>
        <secret_access_key>${QA_GCS_OVER_S3_SECRET_KEY}</secret_access_key>
        <!-- to avoid slow startup -->
        <send_metadata>false</send_metadata>
        <support_batch_delete>false</support_batch_delete>
      </disk_gcs>
    </disks>
    <policies>
      <gcs_only>
          <volumes>
              <gcs_only>
                  <disk>disk_gcs</disk>
              </gcs_only>
          </volumes>
      </gcs_only>
    </policies>
  </storage_configuration>
</yandex>

Does it reproduce on the most recent release?

Yes

How to reproduce

create following docker-compose.yaml

services:
  clickhouse:
    image: clickhouse/clickhouse-server:${CLICKHOUSE_VERSION:-25.8.12}
    configs:
      - source: storage_configuration_gcs
        target: /etc/clickhouse-server/config.d/storage_configuration_gcs.xml

configs:
  storage_configuration_gcs:
    content: |
      <yandex>
        <storage_configuration>
          <disks>
            <disk_gcs>
              <type>s3</type>
              <endpoint>https://storage.googleapis.com/${QA_GCS_OVER_S3_BUCKET}</endpoint>
              <access_key_id>${QA_GCS_OVER_S3_ACCESS_KEY}</access_key_id>
              <secret_access_key>${QA_GCS_OVER_S3_SECRET_KEY}</secret_access_key>
              <!-- to avoid slow startup -->
              <send_metadata>false</send_metadata>
              <support_batch_delete>false</support_batch_delete>
            </disk_gcs>
          </disks>
          <policies>
            <gcs_only>
                <volumes>
                    <gcs_only>
                        <disk>disk_gcs</disk>
                    </gcs_only>
                </volumes>
            </gcs_only>
          </policies>
        </storage_configuration>
      </yandex>   

Expected behavior

Server successful run

Error message and/or stacktrace

2026.04.19 19:28:53.909030 [ 151 ] {} <Error> Application: Code: 499. DB::Exception: Response checksums mismatch This error happened for S3 disk: While checking access for disk disk_gcs. (S3_ERROR), Stack trace (when copying this message, always include the lines below):

\0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x0000000010ec6870
S1. DB::Exception::Exception(String const&, int, String, bool) @ 0x000000000fc60d58
W2. DB::S3Exception::S3Exception(String const&, Aws::S3::S3Errors) @ 0x0000000013cc9870
|3. DB::ReadBufferFromS3::sendRequest(unsigned long, unsigned long, std::optional<unsigned long>) const @ 0x0000000013cf10ac
94. DB::ReadBufferFromS3::nextImpl() @ 0x0000000013ceda00
/5. DB::ReadBuffer::next() @ 0x0000000010f903b4
E6. DB::ReadBufferFromRemoteFSGather::nextImpl() @ 0x0000000014767a20
/7. DB::ReadBuffer::next() @ 0x0000000010f903b4
f8. DB::ThreadPoolRemoteFSReader::execute(DB::IAsynchronousReader::Request, bool) @ 0x0000000013832ed4
`9. DB::ThreadPoolRemoteFSReader::execute(DB::IAsynchronousReader::Request) @ 0x0000000013833410
G10. DB::AsynchronousBoundedReadBuffer::nextImpl() @ 0x00000000139d22b8
011. DB::ReadBuffer::next() @ 0x0000000010f903b4
J12. DB::ReadBuffer::readStrict(char*, unsigned long) @ 0x0000000010f8f53c
C13. DB::IDisk::checkAccessImpl(String const&) @ 0x000000001471d4ac
214. DB::IDisk::startup(bool) @ 0x000000001471c9f0
I15. std::shared_ptr<DB::IDisk> std::__function::__policy_invoker<std::shared_ptr<DB::IDisk> (String const&, Poco::Util::AbstractConfiguration const&, String const&, std::shared_ptr<DB::Context const>, std::map<String, std::shared_ptr<DB::IDisk>, std::less<String>, std::allocator<std::pair<String const, std::shared_ptr<DB::IDisk>>>> const&, bool, bool)>::__call_impl[abi:ne190107]<std::__function::__default_alloc_func<DB::registerDiskObjectStorage(DB::DiskFactory&, bool)::$_0, std::shared_ptr<DB::IDisk> (String const&, Poco::Util::AbstractConfiguration const&, String const&, std::shared_ptr<DB::Context const>, std::map<String, std::shared_ptr<DB::IDisk>, std::less<String>, std::allocator<std::pair<String const, std::shared_ptr<DB::IDisk>>>> const&, bool, bool)>>(std::__function::__policy_storage const*, String const&, Poco::Util::AbstractConfiguration const&, String const&, std::shared_ptr<DB::Context const>&&, std::map<String, std::shared_ptr<DB::IDisk>, std::less<String>, std::allocator<std::pair<String const, std::shared_ptr<DB::IDisk>>>> const&, bool, bool) @ 0x000000001477ed54
�16. DB::DiskFactory::create(String const&, Poco::Util::AbstractConfiguration const&, String const&, std::shared_ptr<DB::Context const>, std::map<String, std::shared_ptr<DB::IDisk>, std::less<String>, std::allocator<std::pair<String const, std::shared_ptr<DB::IDisk>>>> const&, bool, bool, std::unordered_set<String, std::hash<String>, std::equal_to<String>, std::allocator<String>> const&) const @ 0x0000000014701c48
�17. DB::DiskSelector::initialize(Poco::Util::AbstractConfiguration const&, String const&, std::shared_ptr<DB::Context const>, std::function<bool (Poco::Util::AbstractConfiguration const&, String const&, String const&)>) @ 0x0000000014720704
Z18. DB::Context::getDiskSelector(std::lock_guard<std::mutex>&) const @ 0x0000000014fa2c88
V19. DB::Context::getDisksMap(std::lock_guard<std::mutex>&) const @ 0x0000000014fa30dc
>20. DB::Context::getDatabaseDisk() const @ 0x0000000014f74fc0
`21. DB::DatabaseMemory::removeDataPath(std::shared_ptr<DB::Context const>) @ 0x000000001452f984
o22. DB::DatabaseMemory::DatabaseMemory(String const&, std::shared_ptr<DB::Context const>) @ 0x000000001452f74c
S23. DB::DatabaseCatalog::initializeAndLoadTemporaryDatabase() @ 0x00000000150777ec
^24. DB::Server::main(std::vector<String, std::allocator<String>> const&) @ 0x00000000111f19d8
825. Poco::Util::Application::run() @ 0x000000001b40807c
+26. DB::Server::run() @ 0x00000000111de1b8
@27. mainEntryClickHouseServer(int, char**) @ 0x00000000111db408

Additional context

No response

Activity

  1. added
    potential bug
    on Apr 21, 2026
  2. Slach commented on Apr 25, 2026

    @Slach
    ContributorAuthor

    Root cause analysis

    The regression was introduced in 25.8.22 by PR #100582, which bumped aws-sdk-cpp to 1.11.771.

    The new SDK changed the default checksum behavior:

    • requestChecksumCalculation → WHEN_SUPPORTED (sends x-amz-checksum-algorithm: CRC32 header on every request)
    • responseChecksumValidation → WHEN_SUPPORTED (validates response checksums whenever the server returns them)

    GCS's S3-compatible API does not fully support AWS Flexible Checksums (CRC32). When the SDK sends a x-amz-checksum-algorithm: CRC32 header, GCS returns a checksum value that the SDK considers invalid → Response checksums mismatch.

    Two follow-up commits (7bae0d151ff, a872767a75c) tried to fix related MD5 behavior by overriding ShouldComputeContentMd5() and RequestChecksumRequired() in PutObjectRequest, DeleteObjectRequest, DeleteObjectsRequest, but they did not fix GetChecksumAlgorithmName(), which is what triggers CRC32 flexible checksum mode.

    Why 26.3 works

    Commit 659369ead95 ("Fix very weird issue") explicitly disables the new SDK defaults in PocoHTTPClientConfiguration:

    checksumConfig.requestChecksumCalculation = Aws::Client::RequestChecksumCalculation::WHEN_REQUIRED;
    checksumConfig.responseChecksumValidation = Aws::Client::ResponseChecksumValidation::WHEN_REQUIRED;

    This commit was merged into 25.10.x and 26.3.x, but was never backported to 25.8.

    Summary

    Version SDK WHEN_REQUIRED fix Works with GCS over S3
    25.8.21 pre-1.11.771 not needed ✅
    25.8.22 1.11.771 ❌ missing ❌
    25.10.x+ 1.11.771 ✅ present ✅
    26.3.x 1.11.771 ✅ present ✅

    Fix

    Backport commit 659369ead95 to the 25.8 branch.

  3. thevar1able commented on May 12, 2026

    @thevar1able
    Member

    Resolved in #103542

  4. added
    bug
    and removed
    potential bug
    on May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions