Skip to content

Fix segfault due to bad cast in SerializationInfoTuple - #100509

Merged
mstetsyuk merged 4 commits into
masterfrom
fix-segfault-serialization-info
Mar 24, 2026
Merged

mstetsyuk merged 4 commits into
masterfrom
fix-segfault-serialization-info

Conversation

@mstetsyuk

@mstetsyuk mstetsyuk commented Mar 23, 2026 •

Copy link
Copy Markdown
Member

Linked issues

Changelog category (leave one):

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

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

Fixes segfault where SerializationInfoTuple::add does assert_cast on a plain SerializationInfo reference while merging parts after ALTER MODIFY COLUMN changed a column from a non-Tuple type to a Tuple.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.4.1.212
  • Backported to: 26.3.1.892, 26.2.6.20

@clickhouse-gh

clickhouse-gh Bot commented Mar 23, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [47fed59]

Summary: ❌

job_name test_name status info comment
Stateless tests (amd_tsan, parallel, 1/2) failure
04004_integral_col_comparison_with_float_key_condition FAIL cidb
Unit tests (asan_ubsan) error

AI Review

Summary

This PR prevents an exception in SerializationInfoTuple when metadata from pre-ALTER parts is merged after changing a column from String to Tuple(String, String). The cast hardening in SerializationInfoTuple::add/replaceData and the new regression test are aligned with the reported incident. I did not find blockers or majors in the changed lines.

Missing context
  • ⚠️ No CI logs or CI report links were provided in this review task, so runtime coverage beyond static review and test intent could not be verified here.
ClickHouse Rules
Item Status Notes
Deletion logging ➖
Serialization versioning ➖
Core-area scrutiny ✅
No test removal ✅
Experimental gate ➖
No magic constants ✅
Backward compatibility ✅
SettingsChangesHistory.cpp ➖
PR metadata quality ✅
Safe rollout ✅
Compilation time ✅
Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added pr-critical-bugfix pr-must-backport Pull request should be backported intentionally. Use this label with great care! labels Mar 23, 2026
@hanfei1991 hanfei1991 self-assigned this Mar 23, 2026
@clickhouse-gh

clickhouse-gh Bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.10% 84.10% +0.00%
Functions 24.50% 24.50% +0.00%
Branches 76.60% 76.60% +0.00%

PR changed lines: PR changed-lines coverage: 83.33% (25/30, 0 noise lines excluded)
Diff coverage report
Uncovered code

@mstetsyuk
mstetsyuk added this pull request to the merge queue Mar 24, 2026
Merged via the queue into master with commit 8ed6f59 Mar 24, 2026
146 of 148 checks passed
@mstetsyuk
mstetsyuk deleted the fix-segfault-serialization-info branch March 24, 2026 15:50
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 24, 2026
@robot-ch-test-poll robot-ch-test-poll added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Mar 24, 2026
robot-clickhouse added a commit that referenced this pull request Mar 24, 2026
robot-clickhouse added a commit that referenced this pull request Mar 24, 2026
robot-clickhouse added a commit that referenced this pull request Mar 24, 2026
robot-clickhouse added a commit that referenced this pull request Mar 24, 2026
robot-clickhouse added a commit that referenced this pull request Mar 24, 2026
robot-clickhouse added a commit that referenced this pull request Mar 24, 2026
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Mar 24, 2026
clickhouse-gh Bot added a commit that referenced this pull request Mar 24, 2026
Backport #100509 to 26.2: Fix segfault due to bad cast in `SerializationInfoTuple`
clickhouse-gh Bot added a commit that referenced this pull request Mar 24, 2026
Backport #100509 to 26.3: Fix segfault due to bad cast in `SerializationInfoTuple`
@watson-ch watson-ch Bot added v25.12-must-backport and removed pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR labels May 19, 2026
@watson-ch

watson-ch Bot commented May 19, 2026

Copy link
Copy Markdown

Backport labels have been automatically added based on https://github.com/ClickHouse/clickhouse-core-incidents/issues/1494

Labels added:

  • v25.12-must-backport

These labels ensure backport PRs are properly created for each affected release version. The release automation will create backport PRs as needed based on these labels.

@robot-ch-test-poll2 robot-ch-test-poll2 added pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore labels May 19, 2026
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-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 v25.12-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants