Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C4ECA200B43 for ; Tue, 19 Jul 2016 22:58:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C3AE8160A76; Tue, 19 Jul 2016 20:58:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 158DB160A5C for ; Tue, 19 Jul 2016 22:58:03 +0200 (CEST) Received: (qmail 217 invoked by uid 500); 19 Jul 2016 20:58:03 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 195 invoked by uid 99); 19 Jul 2016 20:58:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jul 2016 20:58:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 7CE6F1A541C for ; Tue, 19 Jul 2016 20:58:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id nnEE6FYeWM2u for ; Tue, 19 Jul 2016 20:58:00 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 734BD5FB08 for ; Tue, 19 Jul 2016 20:57:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id u6JKvv3V008095; Tue, 19 Jul 2016 20:57:57 GMT Message-Id: <201607192057.u6JKvv3V008095@ip-10-146-233-104.ec2.internal> Date: Tue, 19 Jul 2016 20:57:56 +0000 From: "Tim Armstrong (Code Review)" To: impala-cr@cloudera.com, dev@impala.incubator.apache.org CC: Taras Bobrovytsky Reply-To: tarmstrong@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-CR=5D=28cdh5-trunk=29_IMPALA-3764=3A_fuzz_test_HDFS_scanners=0A?= X-Gerrit-Change-Id: I50cf43195a7c582caa02c85ae400ea2256fa3a3b X-Gerrit-ChangeURL: X-Gerrit-Commit: 263c27319430efdb8329877d1a7a6abee8d95fa7 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.2 archived-at: Tue, 19 Jul 2016 20:58:05 -0000 Tim Armstrong has uploaded a new patch set (#5). Change subject: IMPALA-3764: fuzz test HDFS scanners ...................................................................... IMPALA-3764: fuzz test HDFS scanners This adds a test that performs some simple fuzz testing of HDFS scanners. It creates a copy of a given HDFS table, with each file in the table corrupted in a random way: either a single byte is set to a random value, or the file is truncated to a random length. It then runs a query that scans the whole table with several different batch_size settings. I made some effort to make the failures reproducible by explicitly seeding the random number generator, and providing a mechanism to override the seed. The fuzzer has found crashes resulting from corrupted or truncated input files for RCFile, SequenceFile, Parquet, and Text LZO so far. Avro only had a small buffer read overrun detected by ASAN. Includes fixes for Parquet crashes found by the fuzzer and a small buffer overrun in Avro. Initially it is only enabled for Avro, Parquet, and uncompressed text. As follow-up work we should fix the bugs in the other scanners and enable the test for them. We also don't implement abort_on_error=0 correctly in Parquet: for some file formats, corrupt headers result in the query being aborted, so an exception will xfail the test. Testing: Ran the test with exploration_strategy=exhaustive in a loop locally with both DEBUG and ASAN builds. It's been running successfully for a few hours now without hitting any crashes or test failures after I made the fixes included in the patch. Also ran exhaustive private build and core ASAN build. Change-Id: I50cf43195a7c582caa02c85ae400ea2256fa3a3b --- M be/src/exec/base-sequence-scanner.cc M be/src/exec/hdfs-parquet-scanner.cc M be/src/exec/parquet-column-readers.cc M be/src/exec/parquet-column-readers.h M be/src/exec/parquet-metadata-utils.cc M be/src/exec/parquet-metadata-utils.h M be/src/runtime/disk-io-mgr.cc A be/src/runtime/scoped-buffer.h M be/src/util/bit-stream-utils.h M be/src/util/bit-stream-utils.inline.h M be/src/util/compress.cc M be/src/util/dict-encoding.h M be/src/util/dict-test.cc M be/src/util/rle-encoding.h M be/src/util/rle-test.cc M testdata/workloads/functional-query/queries/QueryTest/parquet.test M tests/common/impala_test_suite.py M tests/query_test/test_scanners.py 18 files changed, 362 insertions(+), 44 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/48/3448/5 -- To view, visit http://gerrit.cloudera.org:8080/3448 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I50cf43195a7c582caa02c85ae400ea2256fa3a3b Gerrit-PatchSet: 5 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Tim Armstrong Gerrit-Reviewer: Taras Bobrovytsky Gerrit-Reviewer: Tim Armstrong