Repository navigation
Backport #106905 to 25.8: Fix crash in ProtobufRowInputFormat::syncAfterError on null reader - #107627
Closed
robot-clickhouse wants to merge 1 commit into
Closed
robot-clickhouse wants to merge 1 commit into
robot-clickhouse wants to merge 1 commit into
Conversation
…terError on null reader
Contributor
|
Workflow [BackportPR], commit [dc21c5f] |
alexey-milovidov
added a commit
that referenced
this pull request
Jul 26, 2026
…-contained The functional test added by #107739 (`04409_protobuf_skip_bad_row_after_valid`) crashed with `SIGSEGV` on `25.8` because the prerequisite fix from #106905 is missing on this branch: its backport #107627 was closed without merging, so `25.8` still has void ProtobufRowInputFormat::syncAfterError() { reader->endMessage(true); } After a parse error, `readRow`'s catch block calls `destroyReaderAndSerializer`, which nulls `reader`. `IRowInputFormat::read` then calls `syncAfterError`, which dereferences the null `reader` -> `SIGSEGV`. The `setColumns` fix backported here is therefore necessary but not sufficient on `25.8`. Cherry-pick the `ProtobufRowInputFormat.cpp` part of #106905 (`cda04909d946c83546b4a9073ddf7032e9616669`): resync via `endMessage(true)` inside `readRow`'s catch while `reader` is still alive, make `syncAfterError` a no-op, and restrict `allowSyncAfterError` to the length-delimited case. The resulting `readRow` / `syncAfterError` / `allowSyncAfterError` logic is now byte-identical to `master`. The unit test from #106905 is not carried over: `25.8` has no `src/Processors/Formats/Impl/tests` directory, and the functional test `04409_protobuf_skip_bad_row_after_valid` already covers this path. Original pull-request: #107739 Prerequisite pull-request: #106905 Related: #107627 CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=111910&sha=latest&name_0=BackportPR&name_1=Stateless%20tests%20(amd_asan%2C%20distributed%20plan%2C%20parallel%2C%202%2F2) Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.
Original pull-request #106905
Cherry-pick pull-request #107626
This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.
The PR source
The PR is created in the CI job