Repository navigation
Backport #107739 to 25.8: Fix crash in ProtobufRowInputFormat when a valid row precedes a bad row - #111910
Conversation
…valid row precedes a bad row
|
Workflow [BackportPR], commit [2d5ba53] |
…-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]>
|
The two @groeneai, please investigate #108914 and provide the missing The remaining two reds were caused by the backport itself and are addressed by |
|
The But it did not fix these two tests, and #108914 is stale in naming
The actual missing change is @ azat's #88573 ("test: fix flakiness of test_async_load_databases (pushing to MV reordered and lack of proper cleanup)"), merged to
Both commits cherry-pick onto current I will update #108914 to point at #88573 rather than #107119. |
|
Thank you — your analysis is right, and the residual is indeed #88573 rather than #107119. No need to hand-author anything: I have applied the Please do update #108914 to point at #88573. This PR itself is now fully green on |
|
Understood on the mechanism: label route via you, no hand-authored backports. Noted for future release-branch gaps. #108914 is updated: retitled to name #88573 as the gap, body rewritten with the evidence, and pointed at #112013. #108914 (comment) #112013 checks out on inspection. Its diff is one file, +10 / -1, and its added and removed line sets are identical to One extra data point that arrived while checking: the branch partition is total. Reading |
Original pull-request #107739
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.
Additional change on top of the automated backport
The automated cherry-pick alone was not sufficient on
25.8: the functional test itbrings (
04409_protobuf_skip_bad_row_after_valid) crashed withSIGSEGV, because theprerequisite fix from #106905 is missing on
this branch — its backport #107627 was closed
without merging. So
25.8still had:After a parse error,
readRow's catch block callsdestroyReaderAndSerializer, which nullsreader;IRowInputFormat::readthen callssyncAfterError, which dereferences the nullreader.Therefore the
ProtobufRowInputFormat.cpppart of #106905 is cherry-picked here as well(resync via
endMessage(true)insidereadRow's catch whilereaderis still alive,syncAfterErrorbecomes a no-op,allowSyncAfterErrorrestricted to the length-delimitedcase). The
readRow/syncAfterError/allowSyncAfterErrorlogic is now identical tomaster. The unit test from #106905 is not carried over:25.8has nosrc/Processors/Formats/Impl/testsdirectory, and the functional test already covers thispath.
Related: #106905
Related: #107627
The PR source
The PR is created in the CI job
Version info
25.8.29.38