[fix](parquet) Fix SIGSEGV on nullptr ColumnArray::data when query is cancelled during Parquet read - #66619
Open
LemonCL wants to merge 3 commits into
Open
[fix](parquet) Fix SIGSEGV on nullptr ColumnArray::data when query is cancelled during Parquet read#66619LemonCL wants to merge 3 commits into
LemonCL wants to merge 3 commits into
Conversation
… cancelled during Parquet read When reading Parquet external tables with nested columns (e.g. ARRAY), ScalarColumnReader::read_column_data() moves doris_column into resolved_column for the direct-read optimization path. If the query is cancelled (KILL/timeout) between the move and _converter->convert(), the EndOfFile error skips convert(), leaving doris_column permanently nullptr. For nested readers, doris_column aliases ColumnArray::data. The nullptr breaks the column invariant and crashes in Block::clear_column_data() -> ColumnArray::is_exclusive() with SIGSEGV. Add a DEFER guard to move resolved_column back into doris_column on the error/unwind path, ensuring the column array data pointer is never left as nullptr. Crash stack: ColumnArray::is_exclusive() @0x0 ColumnNullable::is_exclusive() Block::clear_column_data() ParquetReader::get_next_block() (EOF branch) IcebergTableReader::get_next_block_inner()
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
TPC-H: Total hot run time: 29140 ms |
Contributor
TPC-DS: Total hot run time: 157914 ms |
Contributor
ClickBench: Total hot run time: 23.77 s |
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.
When reading Parquet external tables with nested columns (e.g. ARRAY), ScalarColumnReader::read_column_data() moves doris_column into resolved_column for the direct-read optimization path. If the query is cancelled (KILL/timeout) between the move and _converter->convert(), the EndOfFile error skips convert(), leaving doris_column permanently nullptr.
For nested readers, doris_column aliases ColumnArray::data. The nullptr breaks the column invariant and crashes in Block::clear_column_data() -> ColumnArray::is_exclusive() with SIGSEGV.
Add a DEFER guard to move resolved_column back into doris_column on the error/unwind path, ensuring the column array data pointer is never left as nullptr.
Crash stack:
ColumnArray::is_exclusive() @0x0
ColumnNullable::is_exclusive()
Block::clear_column_data()
ParquetReader::get_next_block() (EOF branch)
IcebergTableReader::get_next_block_inner()
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)