Skip to content

Fix crash in case of const and non-const blocks in one INSERT#86230

Merged
azat merged 1 commit intoClickHouse:masterfrom
azat:fix-insert-squashing-const-block
Aug 27, 2025
Merged

Fix crash in case of const and non-const blocks in one INSERT#86230
azat merged 1 commit intoClickHouse:masterfrom
azat:fix-insert-squashing-const-block

Conversation

@azat
Copy link
Copy Markdown
Member

@azat azat commented Aug 26, 2025

Squashing cannot work with different const and non-const blocks, but #81161 removed MaterializingTransform before squashing, and so it may lead to crash or "Too large size (18446462643291305296) passed to allocator. It indicates an error." error.

Changelog category (leave one):

  • Critical Bug Fix (crash, data loss, RBAC) or LOGICAL_ERROR

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Fix crash in case of const and non-const blocks in one INSERT

@Algunenano thanks for bisect
@yariks5s thanks for a repro!

@azat azat requested review from CheSema and Michicosun August 26, 2025 18:00
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Aug 26, 2025

Workflow [PR], commit [05c7f51]

Summary:

job_name test_name status info comment
Build (fuzzers) error
Stateless tests (amd_binary, old analyzer, s3 storage, DatabaseReplicated, sequential) failure
01154_move_partition_long FAIL
Stateless tests (amd_debug, parallel) failure
01086_odbc_roundtrip FAIL
Stateless tests (amd_debug, distributed plan, s3 storage, parallel) failure
01086_odbc_roundtrip FAIL

@clickhouse-gh clickhouse-gh bot added pr-critical-bugfix pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-cloud labels Aug 26, 2025
@azat azat force-pushed the fix-insert-squashing-const-block branch 2 times, most recently from f7f4b02 to 06fd38b Compare August 26, 2025 21:00
@Michicosun Michicosun self-assigned this Aug 26, 2025
@azat azat force-pushed the fix-insert-squashing-const-block branch from 06fd38b to 13c5c43 Compare August 26, 2025 21:41
Squashing cannot work with different const and non-const blocks, but ClickHouse#81161
removed `MaterializingTransform` before squashing, and so it may lead to
crash or "Too large size (18446462643291305296) passed to allocator. It
indicates an error." error.
@azat azat force-pushed the fix-insert-squashing-const-block branch from 13c5c43 to 05c7f51 Compare August 27, 2025 11:40
@azat
Copy link
Copy Markdown
Member Author

azat commented Aug 27, 2025

  • Build failures - chcache issues - [ERROR chcache] Failed to upload to ClickHouse: bad response: Code: 439. DB::Exception: Cannot schedule a task: failed to start the thread (threads=1, jobs=1). (CANNOT_SCHEDULE_TASK) (version 25.6.2.5971 (official build)) - now you can see familiar errors even during build

@azat azat enabled auto-merge August 27, 2025 16:53
@azat azat added this pull request to the merge queue Aug 27, 2025
Merged via the queue into ClickHouse:master with commit 3b22197 Aug 27, 2025
119 of 122 checks passed
@azat azat deleted the fix-insert-squashing-const-block branch August 27, 2025 17:10
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 27, 2025
@robot-clickhouse robot-clickhouse added pr-backports-created-cloud deprecated label, NOOP pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR labels Aug 27, 2025
robot-clickhouse-ci-2 added a commit that referenced this pull request Aug 27, 2025
Cherry pick #86230 to 25.6: Fix crash in case of const and non-const blocks in one INSERT
robot-clickhouse added a commit that referenced this pull request Aug 27, 2025
robot-clickhouse-ci-2 added a commit that referenced this pull request Aug 27, 2025
Cherry pick #86230 to 25.7: Fix crash in case of const and non-const blocks in one INSERT
robot-clickhouse added a commit that referenced this pull request Aug 27, 2025
robot-clickhouse-ci-2 added a commit that referenced this pull request Aug 27, 2025
Cherry pick #86230 to 25.8: Fix crash in case of const and non-const blocks in one INSERT
robot-clickhouse added a commit that referenced this pull request Aug 27, 2025
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Aug 27, 2025
clickhouse-gh bot added a commit that referenced this pull request Aug 27, 2025
Backport #86230 to 25.7: Fix crash in case of const and non-const blocks in one INSERT
clickhouse-gh bot added a commit that referenced this pull request Aug 27, 2025
Backport #86230 to 25.6: Fix crash in case of const and non-const blocks in one INSERT
azat added a commit that referenced this pull request Aug 28, 2025
Backport #86230 to 25.8: Fix crash in case of const and non-const blocks in one INSERT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-backports-created-cloud deprecated label, NOOP pr-critical-bugfix pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants