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

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

Commit 07b8aaf6c57b6050e81def05561fcc37dba77052 in impala's branch 
refs/heads/master from [[email protected]]
[ https://git-wip-us.apache.org/repos/asf?p=impala.git;h=07b8aaf ]

IMPALA-7851: fix underflow in ReserveSpace()

The (num_rows - start_idx) calculation was incorrect because
num_rows is *not* inclusive of start_idx - it is the number
of rows after start_idx to add to the output batch rather than
one past the last row to add.

(run_rows - start_idx) could then be negative, which results in
an underflow when it is implicitly converted to uint32_t.

The underflow could result in reserving huge amounts of memory in the
vector, which resulted in various misbehaviour such as hangs.

Testing:
Looped the test under ASAN. Before the fix it hung reliably. After it
succeeds quickly.

Change-Id: Iaec944f2149a6b9b605a5a885357fd54754dc046
Reviewed-on: http://gerrit.cloudera.org:8080/11976
Reviewed-by: Thomas Marshall <[email protected]>
Tested-by: Tim Armstrong <[email protected]>


> TestFetchFirst::test_query_stmts_v6 hang during core asan build
> ---------------------------------------------------------------
>
>                 Key: IMPALA-7851
>                 URL: https://issues.apache.org/jira/browse/IMPALA-7851
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>    Affects Versions: Impala 3.2.0
>            Reporter: Bikramjeet Vig
>            Assignee: Tim Armstrong
>            Priority: Blocker
>              Labels: broken-build
>
> {noformat}
> 22:11:44 hs2/test_fetch_first.py::TestFetchFirst::test_parallel_insert <- 
> ../../../../../../../data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/tests/hs2/hs2_test_suite.py
>  PASSED
> 22:11:44 hs2/test_fetch_first.py::TestFetchFirst::test_non_query_stmts <- 
> ../../../../../../../data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/tests/hs2/hs2_test_suite.py
>  PASSED
> 22:11:44 hs2/test_fetch_first.py::TestFetchFirst::test_constant_query_stmts 
> <- 
> ../../../../../../../data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/tests/hs2/hs2_test_suite.py
>  PASSED
> 22:11:44 hs2/test_fetch_first.py::TestFetchFirst::test_query_stmts_v1 <- 
> ../../../../../../../data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/tests/hs2/hs2_test_suite.py
>  PASSED
> 20:12:39 hs2/test_fetch_first.py::TestFetchFirst::test_query_stmts_v6 <- 
> ../../../../../../../data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/tests/hs2/hs2_test_suite.py
>  Build timed out (after 1,440 minutes). 
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to