You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Tianyi Wang (Code Review)" <ge...@cloudera.org> on 2018/01/09 20:02:27 UTC

[Impala-ASF-CR] IMPALA-6353: Fix crash in snappy decompressor

Tianyi Wang has uploaded this change for review. ( http://gerrit.cloudera.org:8080/8977


Change subject: IMPALA-6353: Fix crash in snappy decompressor
......................................................................

IMPALA-6353: Fix crash in snappy decompressor

SnappyDecompressor::MaxOutputLen assumes the input pointer to be
non-null. It's not true when the parquet file is corrupted and the
compressed_page_size field in a page header is 0. This patch handles
this error instead of failing a DCHECK.

Testing: A bad parquet file with 0 compressed_page_size is added. It
crashes impala without this patch.

Change-Id: I0d42937aab92a74f8e104d2f7fcd64dc24f6a500
---
M be/src/util/decompress.cc
M testdata/data/README
A testdata/data/bad_compressed_dict_page_size.parq
M testdata/datasets/functional/functional_schema_template.sql
M testdata/datasets/functional/schema_constraints.csv
M testdata/workloads/functional-query/queries/QueryTest/parquet.test
6 files changed, 25 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/77/8977/1
-- 
To view, visit http://gerrit.cloudera.org:8080/8977
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d42937aab92a74f8e104d2f7fcd64dc24f6a500
Gerrit-Change-Number: 8977
Gerrit-PatchSet: 1
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>

[Impala-ASF-CR] IMPALA-6353: Fix crash in snappy decompressor

Posted by "Tim Armstrong (Code Review)" <ge...@cloudera.org>.
Tim Armstrong has posted comments on this change. ( http://gerrit.cloudera.org:8080/8977 )

Change subject: IMPALA-6353: Fix crash in snappy decompressor
......................................................................


Patch Set 2: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/8977
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d42937aab92a74f8e104d2f7fcd64dc24f6a500
Gerrit-Change-Number: 8977
Gerrit-PatchSet: 2
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Tue, 16 Jan 2018 19:06:36 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-6353: Fix crash in snappy decompressor

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/8977 )

Change subject: IMPALA-6353: Fix crash in snappy decompressor
......................................................................


Patch Set 2:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/1734/


-- 
To view, visit http://gerrit.cloudera.org:8080/8977
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d42937aab92a74f8e104d2f7fcd64dc24f6a500
Gerrit-Change-Number: 8977
Gerrit-PatchSet: 2
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Wed, 17 Jan 2018 00:34:07 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-6353: Fix crash in snappy decompressor

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/8977 )

Change subject: IMPALA-6353: Fix crash in snappy decompressor
......................................................................


Patch Set 2: Verified+1


-- 
To view, visit http://gerrit.cloudera.org:8080/8977
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d42937aab92a74f8e104d2f7fcd64dc24f6a500
Gerrit-Change-Number: 8977
Gerrit-PatchSet: 2
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Wed, 17 Jan 2018 04:18:23 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-6353: Fix crash in snappy decompressor

Posted by "Tim Armstrong (Code Review)" <ge...@cloudera.org>.
Tim Armstrong has posted comments on this change. ( http://gerrit.cloudera.org:8080/8977 )

Change subject: IMPALA-6353: Fix crash in snappy decompressor
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8977/1/testdata/datasets/functional/functional_schema_template.sql
File testdata/datasets/functional/functional_schema_template.sql:

http://gerrit.cloudera.org:8080/#/c/8977/1/testdata/datasets/functional/functional_schema_template.sql@1650
PS1, Line 1650: -- Parquet file with invalid (0) compressed_page_size in a dict page.
We've mostly been loading files like this dynamically, e.g. see test_corrupt_rle_counts(). This avoids the need to reload data for just this one test.



-- 
To view, visit http://gerrit.cloudera.org:8080/8977
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d42937aab92a74f8e104d2f7fcd64dc24f6a500
Gerrit-Change-Number: 8977
Gerrit-PatchSet: 1
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Tue, 09 Jan 2018 20:15:16 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-6353: Fix crash in snappy decompressor

Posted by "Tianyi Wang (Code Review)" <ge...@cloudera.org>.
Tianyi Wang has uploaded a new patch set (#2). ( http://gerrit.cloudera.org:8080/8977 )

Change subject: IMPALA-6353: Fix crash in snappy decompressor
......................................................................

IMPALA-6353: Fix crash in snappy decompressor

SnappyDecompressor::MaxOutputLen assumes the input pointer to be
non-null. It's not true when the parquet file is corrupted and the
compressed_page_size field in a page header is 0. This patch handles
this error instead of failing a DCHECK.

Testing: A bad parquet file with 0 compressed_page_size is added. It
crashes impala without this patch.

Change-Id: I0d42937aab92a74f8e104d2f7fcd64dc24f6a500
---
M be/src/util/decompress.cc
M testdata/data/README
A testdata/data/bad_compressed_dict_page_size.parquet
A testdata/workloads/functional-query/queries/QueryTest/parquet-bad-compressed-dict-page-size.test
M tests/query_test/test_scanners.py
5 files changed, 26 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/77/8977/2
-- 
To view, visit http://gerrit.cloudera.org:8080/8977
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0d42937aab92a74f8e104d2f7fcd64dc24f6a500
Gerrit-Change-Number: 8977
Gerrit-PatchSet: 2
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>

[Impala-ASF-CR] IMPALA-6353: Fix crash in snappy decompressor

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/8977 )

Change subject: IMPALA-6353: Fix crash in snappy decompressor
......................................................................

IMPALA-6353: Fix crash in snappy decompressor

SnappyDecompressor::MaxOutputLen assumes the input pointer to be
non-null. It's not true when the parquet file is corrupted and the
compressed_page_size field in a page header is 0. This patch handles
this error instead of failing a DCHECK.

Testing: A bad parquet file with 0 compressed_page_size is added. It
crashes impala without this patch.

Change-Id: I0d42937aab92a74f8e104d2f7fcd64dc24f6a500
Reviewed-on: http://gerrit.cloudera.org:8080/8977
Reviewed-by: Tim Armstrong <ta...@cloudera.com>
Tested-by: Impala Public Jenkins
---
M be/src/util/decompress.cc
M testdata/data/README
A testdata/data/bad_compressed_dict_page_size.parquet
A testdata/workloads/functional-query/queries/QueryTest/parquet-bad-compressed-dict-page-size.test
M tests/query_test/test_scanners.py
5 files changed, 26 insertions(+), 0 deletions(-)

Approvals:
  Tim Armstrong: Looks good to me, approved
  Impala Public Jenkins: Verified

-- 
To view, visit http://gerrit.cloudera.org:8080/8977
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0d42937aab92a74f8e104d2f7fcd64dc24f6a500
Gerrit-Change-Number: 8977
Gerrit-PatchSet: 3
Gerrit-Owner: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>