[jira] [Commented] (IMPALA-8833) Check failed: bit_width <= sizeof(T) * 8 (40 vs. 32) in BatchedBitReader::UnpackBatch()

2019-08-08 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/IMPALA-8833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16903101#comment-16903101
 ] 

ASF subversion and git services commented on IMPALA-8833:
-

Commit ef796639451af63bc9f4dbdc2a79bfc2f5048a93 in impala's branch 
refs/heads/master from Daniel Becker
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=ef79663 ]

IMPALA-8840: Check failed: num_bytes <= sizeof(T) (5 vs. 4)

The actual DCHECK failure was fixed by the change for IMPALA-8833.

Added a DCHECK to RleBatchDecoder so that it does not accept bit widths
higher than the width of its type parameter.

Also preventing UnpackAndDecodeValues from using higher bit widths than
32, the width of the dictionary index type, with a static assert. This
also reduces compile time because the compiler does not have to generate
code for invalid bit widths.

Change-Id: I93461ba2cabb5ec7e0b65dcd62844fcbfa597d16
Reviewed-on: http://gerrit.cloudera.org:8080/14029
Reviewed-by: Csaba Ringhofer 
Tested-by: Impala Public Jenkins 


> Check failed: bit_width <= sizeof(T) * 8 (40 vs. 32)  in 
> BatchedBitReader::UnpackBatch()
> 
>
> Key: IMPALA-8833
> URL: https://issues.apache.org/jira/browse/IMPALA-8833
> Project: IMPALA
>  Issue Type: Bug
>  Components: Backend
>Affects Versions: Impala 3.3.0
>Reporter: Tim Armstrong
>Assignee: Daniel Becker
>Priority: Blocker
>  Labels: broken-build, crash, flaky
> Fix For: Impala 3.3.0
>
>
> {noformat}
> F0801 21:24:10.571285 15993 bit-stream-utils.inline.h:126] 
> d04ba69d5da8ffd1:a9045b820001] Check failed: bit_width <= sizeof(T) * 8 
> (40 vs. 32) 
> *** Check failure stack trace: ***
> @  0x52f63ac  google::LogMessage::Fail()
> @  0x52f7c51  google::LogMessage::SendToLog()
> @  0x52f5d86  google::LogMessage::Flush()
> @  0x52f934d  google::LogMessageFatal::~LogMessageFatal()
> @  0x2b265b5  impala::BatchedBitReader::UnpackBatch<>()
> @  0x2ae8623  impala::RleBatchDecoder<>::FillLiteralBuffer()
> @  0x2b2cadb  impala::RleBatchDecoder<>::DecodeLiteralValues<>()
> @  0x2b27bfb  impala::DictDecoder<>::DecodeNextValue()
> @  0x2b16fed  
> impala::ScalarColumnReader<>::ReadSlotsNoConversion()
> @  0x2ac7252  impala::ScalarColumnReader<>::ReadSlots()
> @  0x2a76cef  
> impala::ScalarColumnReader<>::MaterializeValueBatchRepeatedDefLevel()
> @  0x2a58faa  impala::ScalarColumnReader<>::ReadValueBatch<>()
> @  0x2a20e8e  
> impala::ScalarColumnReader<>::ReadNonRepeatedValueBatch()
> @  0x29b189c  impala::HdfsParquetScanner::AssembleRows()
> @  0x29ac6de  impala::HdfsParquetScanner::GetNextInternal()
> @  0x29aa656  impala::HdfsParquetScanner::ProcessSplit()
> @  0x249172d  impala::HdfsScanNode::ProcessSplit()
> @  0x2490902  impala::HdfsScanNode::ScannerThread()
> @  0x248fc8b  
> _ZZN6impala12HdfsScanNode22ThreadTokenAvailableCbEPNS_18ThreadResourcePoolEENKUlvE_clEv
> @  0x2492253  
> {noformat}
> https://jenkins.impala.io/job/ubuntu-16.04-from-scratch/6915
> Log lines around the failure:
> {noformat}
> [gw5] PASSED 
> query_test/test_scanners.py::TestParquet::test_bad_compression_codec[protocol:
>  beeswax | exec_option: {'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
> 'abort_on_error': 1, 'debug_action': None, 'exec_single_node_rows_threshold': 
> 0} | table_format: parquet/none]
> query_test/test_nested_types.py::TestMaxNestingDepth::test_load_hive_table[protocol:
>  beeswax | exec_option: {'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
> 'abort_on_error': 1, 'exec_single_node_rows_threshold': 0} | table_format: 
> parquet/none]
> query_test/test_scanners.py::TestParquet::test_bad_compression_codec[protocol:
>  beeswax | exec_option: {'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': True, 
> 'abort_on_error': 1, 'debug_action': 
> '-1:OPEN:SET_DENY_RESERVATION_PROBABILITY@0.5', 
> 'exec_single_node_rows_threshold': 0} | table_format: parquet/none]
> [gw1] PASSED 
> query_test/test_tpcds_queries.py::TestTpcdsQuery::test_tpcds_q7[protocol: 
> beeswax | exec_option: {'decimal_v2': 0, 'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
> 'abort_on_error': 1, 'exec_single_node_rows_threshold': 0} | table_format: 
> parquet/none]
> query_test/test_tpcds_queries.py::TestTpcdsQuery::test_tpcds_q8[protocol: 
> beeswax | exec_option: {'decimal_v2': 0, 'batch_size': 0, 'num_nodes': 

[jira] [Commented] (IMPALA-8833) Check failed: bit_width <= sizeof(T) * 8 (40 vs. 32) in BatchedBitReader::UnpackBatch()

2019-08-06 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/IMPALA-8833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16901669#comment-16901669
 ] 

ASF subversion and git services commented on IMPALA-8833:
-

Commit 33f1e86ce3dc5e278b804004671062f46d42d90e in impala's branch 
refs/heads/master from Daniel Becker
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=33f1e86 ]

IMPALA-8833: Check failed in BatchedBitReader::UnpackBatch()

After raising the maximum bit width for bit packing to 64 bits,
DictDecoder accepted bit widths between 32 and 64, but internally it
uses 32 bit integers and unpacking ran into a DCHECK.

Adding a check to DictDecoder to catch if the bit width is higher than
32.

Testing:
  Added a test that asserts that DictDecoder accepts bit widths 0-32
  and rejects higher bit widths which could still be unpacked
  otherwise.

Change-Id: I4cba3338a93f8287c24abbe3ad9bfcbfa756bca4
Reviewed-on: http://gerrit.cloudera.org:8080/14019
Tested-by: Impala Public Jenkins 
Reviewed-by: Tim Armstrong 


> Check failed: bit_width <= sizeof(T) * 8 (40 vs. 32)  in 
> BatchedBitReader::UnpackBatch()
> 
>
> Key: IMPALA-8833
> URL: https://issues.apache.org/jira/browse/IMPALA-8833
> Project: IMPALA
>  Issue Type: Bug
>  Components: Backend
>Affects Versions: Impala 3.3.0
>Reporter: Tim Armstrong
>Assignee: Daniel Becker
>Priority: Blocker
>  Labels: broken-build, crash, flaky
>
> {noformat}
> F0801 21:24:10.571285 15993 bit-stream-utils.inline.h:126] 
> d04ba69d5da8ffd1:a9045b820001] Check failed: bit_width <= sizeof(T) * 8 
> (40 vs. 32) 
> *** Check failure stack trace: ***
> @  0x52f63ac  google::LogMessage::Fail()
> @  0x52f7c51  google::LogMessage::SendToLog()
> @  0x52f5d86  google::LogMessage::Flush()
> @  0x52f934d  google::LogMessageFatal::~LogMessageFatal()
> @  0x2b265b5  impala::BatchedBitReader::UnpackBatch<>()
> @  0x2ae8623  impala::RleBatchDecoder<>::FillLiteralBuffer()
> @  0x2b2cadb  impala::RleBatchDecoder<>::DecodeLiteralValues<>()
> @  0x2b27bfb  impala::DictDecoder<>::DecodeNextValue()
> @  0x2b16fed  
> impala::ScalarColumnReader<>::ReadSlotsNoConversion()
> @  0x2ac7252  impala::ScalarColumnReader<>::ReadSlots()
> @  0x2a76cef  
> impala::ScalarColumnReader<>::MaterializeValueBatchRepeatedDefLevel()
> @  0x2a58faa  impala::ScalarColumnReader<>::ReadValueBatch<>()
> @  0x2a20e8e  
> impala::ScalarColumnReader<>::ReadNonRepeatedValueBatch()
> @  0x29b189c  impala::HdfsParquetScanner::AssembleRows()
> @  0x29ac6de  impala::HdfsParquetScanner::GetNextInternal()
> @  0x29aa656  impala::HdfsParquetScanner::ProcessSplit()
> @  0x249172d  impala::HdfsScanNode::ProcessSplit()
> @  0x2490902  impala::HdfsScanNode::ScannerThread()
> @  0x248fc8b  
> _ZZN6impala12HdfsScanNode22ThreadTokenAvailableCbEPNS_18ThreadResourcePoolEENKUlvE_clEv
> @  0x2492253  
> {noformat}
> https://jenkins.impala.io/job/ubuntu-16.04-from-scratch/6915
> Log lines around the failure:
> {noformat}
> [gw5] PASSED 
> query_test/test_scanners.py::TestParquet::test_bad_compression_codec[protocol:
>  beeswax | exec_option: {'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
> 'abort_on_error': 1, 'debug_action': None, 'exec_single_node_rows_threshold': 
> 0} | table_format: parquet/none]
> query_test/test_nested_types.py::TestMaxNestingDepth::test_load_hive_table[protocol:
>  beeswax | exec_option: {'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
> 'abort_on_error': 1, 'exec_single_node_rows_threshold': 0} | table_format: 
> parquet/none]
> query_test/test_scanners.py::TestParquet::test_bad_compression_codec[protocol:
>  beeswax | exec_option: {'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': True, 
> 'abort_on_error': 1, 'debug_action': 
> '-1:OPEN:SET_DENY_RESERVATION_PROBABILITY@0.5', 
> 'exec_single_node_rows_threshold': 0} | table_format: parquet/none]
> [gw1] PASSED 
> query_test/test_tpcds_queries.py::TestTpcdsQuery::test_tpcds_q7[protocol: 
> beeswax | exec_option: {'decimal_v2': 0, 'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
> 'abort_on_error': 1, 'exec_single_node_rows_threshold': 0} | table_format: 
> parquet/none]
> query_test/test_tpcds_queries.py::TestTpcdsQuery::test_tpcds_q8[protocol: 
> beeswax | exec_option: {'decimal_v2': 0, 'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 

[jira] [Commented] (IMPALA-8833) Check failed: bit_width <= sizeof(T) * 8 (40 vs. 32) in BatchedBitReader::UnpackBatch()

2019-08-06 Thread Daniel Becker (JIRA)


[ 
https://issues.apache.org/jira/browse/IMPALA-8833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16901092#comment-16901092
 ] 

Daniel Becker commented on IMPALA-8833:
---

[https://gerrit.cloudera.org/#/c/14019/]

> Check failed: bit_width <= sizeof(T) * 8 (40 vs. 32)  in 
> BatchedBitReader::UnpackBatch()
> 
>
> Key: IMPALA-8833
> URL: https://issues.apache.org/jira/browse/IMPALA-8833
> Project: IMPALA
>  Issue Type: Bug
>  Components: Backend
>Affects Versions: Impala 3.3.0
>Reporter: Tim Armstrong
>Assignee: Daniel Becker
>Priority: Blocker
>  Labels: broken-build, crash, flaky
>
> {noformat}
> F0801 21:24:10.571285 15993 bit-stream-utils.inline.h:126] 
> d04ba69d5da8ffd1:a9045b820001] Check failed: bit_width <= sizeof(T) * 8 
> (40 vs. 32) 
> *** Check failure stack trace: ***
> @  0x52f63ac  google::LogMessage::Fail()
> @  0x52f7c51  google::LogMessage::SendToLog()
> @  0x52f5d86  google::LogMessage::Flush()
> @  0x52f934d  google::LogMessageFatal::~LogMessageFatal()
> @  0x2b265b5  impala::BatchedBitReader::UnpackBatch<>()
> @  0x2ae8623  impala::RleBatchDecoder<>::FillLiteralBuffer()
> @  0x2b2cadb  impala::RleBatchDecoder<>::DecodeLiteralValues<>()
> @  0x2b27bfb  impala::DictDecoder<>::DecodeNextValue()
> @  0x2b16fed  
> impala::ScalarColumnReader<>::ReadSlotsNoConversion()
> @  0x2ac7252  impala::ScalarColumnReader<>::ReadSlots()
> @  0x2a76cef  
> impala::ScalarColumnReader<>::MaterializeValueBatchRepeatedDefLevel()
> @  0x2a58faa  impala::ScalarColumnReader<>::ReadValueBatch<>()
> @  0x2a20e8e  
> impala::ScalarColumnReader<>::ReadNonRepeatedValueBatch()
> @  0x29b189c  impala::HdfsParquetScanner::AssembleRows()
> @  0x29ac6de  impala::HdfsParquetScanner::GetNextInternal()
> @  0x29aa656  impala::HdfsParquetScanner::ProcessSplit()
> @  0x249172d  impala::HdfsScanNode::ProcessSplit()
> @  0x2490902  impala::HdfsScanNode::ScannerThread()
> @  0x248fc8b  
> _ZZN6impala12HdfsScanNode22ThreadTokenAvailableCbEPNS_18ThreadResourcePoolEENKUlvE_clEv
> @  0x2492253  
> {noformat}
> https://jenkins.impala.io/job/ubuntu-16.04-from-scratch/6915
> Log lines around the failure:
> {noformat}
> [gw5] PASSED 
> query_test/test_scanners.py::TestParquet::test_bad_compression_codec[protocol:
>  beeswax | exec_option: {'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
> 'abort_on_error': 1, 'debug_action': None, 'exec_single_node_rows_threshold': 
> 0} | table_format: parquet/none]
> query_test/test_nested_types.py::TestMaxNestingDepth::test_load_hive_table[protocol:
>  beeswax | exec_option: {'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
> 'abort_on_error': 1, 'exec_single_node_rows_threshold': 0} | table_format: 
> parquet/none]
> query_test/test_scanners.py::TestParquet::test_bad_compression_codec[protocol:
>  beeswax | exec_option: {'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': True, 
> 'abort_on_error': 1, 'debug_action': 
> '-1:OPEN:SET_DENY_RESERVATION_PROBABILITY@0.5', 
> 'exec_single_node_rows_threshold': 0} | table_format: parquet/none]
> [gw1] PASSED 
> query_test/test_tpcds_queries.py::TestTpcdsQuery::test_tpcds_q7[protocol: 
> beeswax | exec_option: {'decimal_v2': 0, 'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
> 'abort_on_error': 1, 'exec_single_node_rows_threshold': 0} | table_format: 
> parquet/none]
> query_test/test_tpcds_queries.py::TestTpcdsQuery::test_tpcds_q8[protocol: 
> beeswax | exec_option: {'decimal_v2': 0, 'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
> 'abort_on_error': 1, 'exec_single_node_rows_threshold': 0} | table_format: 
> parquet/none]
> [gw1] PASSED 
> query_test/test_tpcds_queries.py::TestTpcdsQuery::test_tpcds_q8[protocol: 
> beeswax | exec_option: {'decimal_v2': 0, 'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
> 'abort_on_error': 1, 'exec_single_node_rows_threshold': 0} | table_format: 
> parquet/none]
> query_test/test_tpcds_queries.py::TestTpcdsQuery::test_tpcds_q10a[protocol: 
> beeswax | exec_option: {'decimal_v2': 0, 'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
> 'abort_on_error': 1, 'exec_single_node_rows_threshold': 0} | table_format: 
> parquet/none]
> [gw10] PASSED 
> 

[jira] [Commented] (IMPALA-8833) Check failed: bit_width <= sizeof(T) * 8 (40 vs. 32) in BatchedBitReader::UnpackBatch()

2019-08-06 Thread Daniel Becker (JIRA)


[ 
https://issues.apache.org/jira/browse/IMPALA-8833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16900972#comment-16900972
 ] 

Daniel Becker commented on IMPALA-8833:
---

The problem seems to be here:

[https://github.com/apache/impala/blob/bbe064ec194aff4ecf1e794bd4071df4ea4be166/be/src/util/dict-encoding.h#L256]

The dict decoder checks the bit width. So far the maximum bit width for bit 
packing was 32 and bit widths like 40 were caught here. Now that the maximum is 
64, it is not caught but when the decoder tries to write it to a uint32_t it 
DCHECKs.

> Check failed: bit_width <= sizeof(T) * 8 (40 vs. 32)  in 
> BatchedBitReader::UnpackBatch()
> 
>
> Key: IMPALA-8833
> URL: https://issues.apache.org/jira/browse/IMPALA-8833
> Project: IMPALA
>  Issue Type: Bug
>  Components: Backend
>Affects Versions: Impala 3.3.0
>Reporter: Tim Armstrong
>Assignee: Daniel Becker
>Priority: Blocker
>  Labels: broken-build, crash, flaky
>
> {noformat}
> F0801 21:24:10.571285 15993 bit-stream-utils.inline.h:126] 
> d04ba69d5da8ffd1:a9045b820001] Check failed: bit_width <= sizeof(T) * 8 
> (40 vs. 32) 
> *** Check failure stack trace: ***
> @  0x52f63ac  google::LogMessage::Fail()
> @  0x52f7c51  google::LogMessage::SendToLog()
> @  0x52f5d86  google::LogMessage::Flush()
> @  0x52f934d  google::LogMessageFatal::~LogMessageFatal()
> @  0x2b265b5  impala::BatchedBitReader::UnpackBatch<>()
> @  0x2ae8623  impala::RleBatchDecoder<>::FillLiteralBuffer()
> @  0x2b2cadb  impala::RleBatchDecoder<>::DecodeLiteralValues<>()
> @  0x2b27bfb  impala::DictDecoder<>::DecodeNextValue()
> @  0x2b16fed  
> impala::ScalarColumnReader<>::ReadSlotsNoConversion()
> @  0x2ac7252  impala::ScalarColumnReader<>::ReadSlots()
> @  0x2a76cef  
> impala::ScalarColumnReader<>::MaterializeValueBatchRepeatedDefLevel()
> @  0x2a58faa  impala::ScalarColumnReader<>::ReadValueBatch<>()
> @  0x2a20e8e  
> impala::ScalarColumnReader<>::ReadNonRepeatedValueBatch()
> @  0x29b189c  impala::HdfsParquetScanner::AssembleRows()
> @  0x29ac6de  impala::HdfsParquetScanner::GetNextInternal()
> @  0x29aa656  impala::HdfsParquetScanner::ProcessSplit()
> @  0x249172d  impala::HdfsScanNode::ProcessSplit()
> @  0x2490902  impala::HdfsScanNode::ScannerThread()
> @  0x248fc8b  
> _ZZN6impala12HdfsScanNode22ThreadTokenAvailableCbEPNS_18ThreadResourcePoolEENKUlvE_clEv
> @  0x2492253  
> {noformat}
> https://jenkins.impala.io/job/ubuntu-16.04-from-scratch/6915
> Log lines around the failure:
> {noformat}
> [gw5] PASSED 
> query_test/test_scanners.py::TestParquet::test_bad_compression_codec[protocol:
>  beeswax | exec_option: {'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
> 'abort_on_error': 1, 'debug_action': None, 'exec_single_node_rows_threshold': 
> 0} | table_format: parquet/none]
> query_test/test_nested_types.py::TestMaxNestingDepth::test_load_hive_table[protocol:
>  beeswax | exec_option: {'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
> 'abort_on_error': 1, 'exec_single_node_rows_threshold': 0} | table_format: 
> parquet/none]
> query_test/test_scanners.py::TestParquet::test_bad_compression_codec[protocol:
>  beeswax | exec_option: {'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': True, 
> 'abort_on_error': 1, 'debug_action': 
> '-1:OPEN:SET_DENY_RESERVATION_PROBABILITY@0.5', 
> 'exec_single_node_rows_threshold': 0} | table_format: parquet/none]
> [gw1] PASSED 
> query_test/test_tpcds_queries.py::TestTpcdsQuery::test_tpcds_q7[protocol: 
> beeswax | exec_option: {'decimal_v2': 0, 'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
> 'abort_on_error': 1, 'exec_single_node_rows_threshold': 0} | table_format: 
> parquet/none]
> query_test/test_tpcds_queries.py::TestTpcdsQuery::test_tpcds_q8[protocol: 
> beeswax | exec_option: {'decimal_v2': 0, 'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
> 'abort_on_error': 1, 'exec_single_node_rows_threshold': 0} | table_format: 
> parquet/none]
> [gw1] PASSED 
> query_test/test_tpcds_queries.py::TestTpcdsQuery::test_tpcds_q8[protocol: 
> beeswax | exec_option: {'decimal_v2': 0, 'batch_size': 0, 'num_nodes': 0, 
> 'disable_codegen_rows_threshold': 0, 'disable_codegen': False, 
> 'abort_on_error': 1, 'exec_single_node_rows_threshold': 0} | table_format: 
> parquet/none]
>