Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Go][Parquet] Panic while reading corrupted parquet file #43605

Closed
don4get opened this issue Aug 7, 2024 · 1 comment
Closed

[Go][Parquet] Panic while reading corrupted parquet file #43605

don4get opened this issue Aug 7, 2024 · 1 comment

Comments

@don4get
Copy link

don4get commented Aug 7, 2024

While reading a corrupted file, ReadTable panics, due to uncaught panic in this goroutine.

Full message is the following:

panic: runtime error: index out of range [0] with length 0

goroutine 250 [running]:
github.com/apache/arrow/go/v18/parquet/internal/utils.unpack32Avx2({0x1a4f460, 0xc005f89a70}, {0xc002188000, 0x7?, 0x1?}, 0x0)
        /home/xxxxxxxx/go/pkg/mod/github.com/apache/arrow/go/[email protected]/parquet/internal/utils/bit_packing_avx2_amd64.go:49 +0x225
github.com/apache/arrow/go/v18/parquet/internal/utils.(*BitReader).GetBatchIndex(0xc017c54608, 0x0, {0xc002188000, 0x400, 0x400})
        /home/xxxxxxxx/go/pkg/mod/github.com/apache/arrow/go/[email protected]/parquet/internal/utils/bit_reader.go:230 +0x236
github.com/apache/arrow/go/v18/parquet/internal/utils.(*RleDecoder).GetBatchWithDictInt32(0xc003a27780, {0x1a621d8, 0xc005f89350}, {0xc05b8f0000, 0x52c2, 0x8000})
        /home/xxxxxxxx/go/pkg/mod/github.com/apache/arrow/go/[email protected]/parquet/internal/utils/typed_rle_dict.gen.go:198 +0x136
github.com/apache/arrow/go/v18/parquet/internal/utils.(*RleDecoder).GetBatchWithDictSpacedInt32(0x6?, {0x1a621d8?, 0xc005f89350?}, {0xc05b8f0000?, 0x1?, 0xa325a?}, 0xc002c87f80?, {0xc0057f0c00, 0x1000, 0x1000}, ...)
        /home/xxxxxxxx/go/pkg/mod/github.com/apache/arrow/go/[email protected]/parquet/internal/utils/typed_rle_dict.gen.go:30 +0x105
github.com/apache/arrow/go/v18/parquet/internal/utils.(*RleDecoder).GetBatchWithDictSpaced(0x160f2c0?, {0x1a621d8?, 0xc005f89350?}, {0x15e9f00?, 0xc018ee9bb0?}, 0xc018ee9b40?, {0xc0057f0c00?, 0xc2ff00?, 0x1571acf?}, 0x0)
        /home/xxxxxxxx/go/pkg/mod/github.com/apache/arrow/go/[email protected]/parquet/internal/utils/rle.go:436 +0x1b8
github.com/apache/arrow/go/v18/parquet/internal/encoding.(*dictDecoder).decodeSpaced(0xc003eae600, {0x15e9f00?, 0xc018ee9bb0?}, 0xc05b8e8580?, {0xc0057f0c00?, 0x5a8?, 0xc0057f1658?}, 0x702a35070b88?)
        /home/xxxxxxxx/go/pkg/mod/github.com/apache/arrow/go/[email protected]/parquet/internal/encoding/decoder.go:152 +0x55
github.com/apache/arrow/go/v18/parquet/internal/encoding.(*DictInt32Decoder).DecodeSpaced(0x2c48de0?, {0xc05b8f0000?, 0x2d3e?, 0x52c0?}, 0xc05b8e8580?, {0xc0057f0c00?, 0xc018ee9cc8?, 0xc6b9a3?}, 0x1a6d8b0?)
        /home/xxxxxxxx/go/pkg/mod/github.com/apache/arrow/go/[email protected]/parquet/internal/encoding/typed_encoder.gen.go:217 +0x6f
github.com/apache/arrow/go/v18/parquet/file.(*primitiveRecordReader).ReadValuesSpaced(0xc05b8de000?, 0x52c2, 0x0)
        /home/xxxxxxxx/go/pkg/mod/github.com/apache/arrow/go/[email protected]/parquet/file/record_reader.go:281 +0xc7b
github.com/apache/arrow/go/v18/parquet/file.(*recordReader).ReadRecordData(0xc0039d9440, 0x52c2)
        /home/xxxxxxxx/go/pkg/mod/github.com/apache/arrow/go/[email protected]/parquet/file/record_reader.go:548 +0x2a5
github.com/apache/arrow/go/v18/parquet/file.(*recordReader).ReadRecords(0xc0039d9440, 0x52c2)
        /home/xxxxxxxx/go/pkg/mod/github.com/apache/arrow/go/[email protected]/parquet/file/record_reader.go:632 +0x2e5
github.com/apache/arrow/go/v18/parquet/pqarrow.(*leafReader).LoadBatch(0xc0039d9860, 0x52c2)
        /home/xxxxxxxx/go/pkg/mod/github.com/apache/arrow/go/[email protected]/parquet/pqarrow/column_readers.go:104 +0xce
github.com/apache/arrow/go/v18/parquet/pqarrow.(*ColumnReader).NextBatch(0xc003984450, 0x52c2)
        /home/xxxxxxxx/go/pkg/mod/github.com/apache/arrow/go/[email protected]/parquet/pqarrow/file_reader.go:132 +0x28
github.com/apache/arrow/go/v18/parquet/pqarrow.(*FileReader).ReadColumn(0xc018ee9f60?, {0xc000744380?, 0xc003ad01e0?, 0x0?}, 0xc0037587b0?)
        /home/xxxxxxxx/go/pkg/mod/github.com/apache/arrow/go/[email protected]/parquet/pqarrow/file_reader.go:248 +0x55
github.com/apache/arrow/go/v18/parquet/pqarrow.(*FileReader).ReadRowGroups.func1()
        /home/xxxxxxxx/go/pkg/mod/github.com/apache/arrow/go/[email protected]/parquet/pqarrow/file_reader.go:342 +0xd7
created by github.com/apache/arrow/go/v18/parquet/pqarrow.(*FileReader).ReadRowGroups in goroutine 11
        /home/xxxxxxxx/go/pkg/mod/github.com/apache/arrow/go/[email protected]/parquet/pqarrow/file_reader.go:333 +0x3ca
exit status 2

Component(s)

Go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants