You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kudu.apache.org by "Alexey Serbin (JIRA)" <ji...@apache.org> on 2017/09/05 19:39:00 UTC

[jira] [Commented] (KUDU-2085) Seek past last element of a prefix-encoded binary block may crash

    [ https://issues.apache.org/jira/browse/KUDU-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16154173#comment-16154173 ] 

Alexey Serbin commented on KUDU-2085:
-------------------------------------

This test still fails time to time.

The log from one of the the latest failures:

{noformat}
[ RUN      ] TestEncoding.TestBinaryPlainBlockBuilderRoundTrip                  
I0905 11:30:56.138115 2102099968 test_util.cc:195] Using random seed: 1838166914
I0905 11:30:56.138432 2102099968 encoding-test.cc:288] Block: 000000: 3930 0000 5503 0000 0c00 0000 000c 0c0c 90..U...........
000010: 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c ................                
000020: 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 ................                
000030: 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c ................                
000040: 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c ................                
000050: 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c ................                
000060: 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c ................                
000070: 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 ................                
000080: 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c ................                
000090: 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c ................                
0000a0: 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c ................                
0000b0: 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c ................                
0000c0: 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 ................                
0000d0: 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c ................                
0000e0: 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c ................                
0000f0: 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c ................                
000100: 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c ................                
000110: 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 ................                
000120: 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c ................                
000130: 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c ................                
000140: 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c ................                
000150: 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c ................                
000160: 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 ................                
000170: 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c ................                
000180: 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c ................                
000190: 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c ................                
0001a0: 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c ................                
0001b0: 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 ................                
0001c0: 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c ................                
0001d0: 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c ................                
0001e0: 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c ................                
0001f0: 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c ................                
000200: 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 ................                
000210: 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c ................                
000220: 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c ................                
000230: 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c ................                
000240: 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c ................                
000250: 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 ................                
000260: 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c ................                
000270: 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c ................                
000280: 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c ................                
000290: 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c ................                
0002a0: 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 ................                
0002b0: 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c ................                
0002c0: 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c ................                
0002d0: 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c ................                
0002e0: 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c ................                
0002f0: 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 ................                
000300: 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c ................                
000310: 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c ................                
000320: 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c ................                
000330: 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c ................                
000340: 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 ................                
000350: 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c ................
000360: 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c ................                
000370: 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c ................                
000380: 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c ................                
000390: 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 ................                
0003a0: 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c ................                
0003b0: 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c ................                
0003c0: 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c ................                
0003d0: 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c ................                
0003e0: 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 ................                
0003f0: 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c ................                
000400: 0c0c 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c ................                
000410: 0c0c 000c 0c0c 0c00 0c0c 0c0c 000c 0c0c ................                
000420: 0c00 0c0c 0c0c 000c 0c0c 0c00 0c0c 0c0c ................                
000430: 000c 0c0c 0c00 0c00 0000                ..........                      
/Users/aserbin/Projects/kudu/src/kudu/cfile/encoding-test.cc:291: Failure       
Expected: (s.size()) > (kCount * 2u), actual: 1082 vs 1706                      
I0905 11:30:56.138628 2102099968 test_util.cc:116] -----------------------------------------------
I0905 11:30:56.138633 2102099968 test_util.cc:117] Had fatal failures, leaving test files at /private/tmp/kudutest-502/encoding-test.TestEncoding.TestBinaryPlainBlockBuilderRoundTrip.1504636256088039-16675
[  FAILED  ] TestEncoding.TestBinaryPlainBlockBuilderRoundTrip (1 ms)
{noformat}


The failure is easily reproducible: set the reported seed {{1838166914}} instead of calling SeedRandom() at encoding-test.cc:275 and run the test:

{noformat}
./bin/encoding-test --gtest_filter=TestEncoding.TestBinaryPlainBlockBuilderRoundTrip
{noformat}

> Seek past last element of a prefix-encoded binary block may crash
> -----------------------------------------------------------------
>
>                 Key: KUDU-2085
>                 URL: https://issues.apache.org/jira/browse/KUDU-2085
>             Project: Kudu
>          Issue Type: Bug
>          Components: cfile
>    Affects Versions: 1.0.1, 1.1.0, 1.2.0, 1.3.1, 1.4.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>             Fix For: 1.3.2, 1.5.0, 1.2.1, 1.4.1
>
>
> Similar to  KUDU-2049, the binary prefix block encoder has a bug when seeking past the end of the block (i.e to the offset past the last element). The bug only causes issues in very specific circumstances:
> - the number of elements in the block has to be a multiple of 16 (the "restart interval")
> -- this causes the code to interpret the "restart count" at the end of the block data as an offset instead of part of the footer.
> - this value, when interpreted as an offset, points to a piece of data in the block which, when interpreted as a varint, ends up large enough to point past the end of the block.
> This results in an error like:
> F0730 09:56:07.291882 124055 binary_prefix_block.cc:325] Check failed: _s.ok() Bad status: Corruption: Could not decode value length data at idx 32



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)