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

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

Commit 51530a618d79bc7b765852a32e60f4b54b7407cb in impala's branch 
refs/heads/master from Yida Wu
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=51530a618 ]

IMPALA-15030: Fix query-profile-redaction-test failed in UBSAN test

In recent UBSAN builds, we observed test failures crashing with a
SIGSEGV for query-profile-redaction-test. We only see this crash
happen when evaluating ANALYZED_RE, likely because it is the regex
with the most deep recursion.

UBSAN itself does not directly cause the crash, but it may add
extra instrumentation that increases stack usage for each function
call. The std::regex relied heavily on deep recursive parsing, which
likely resulted in a stack overflow under UBSAN builds.

This patch uses RE2 for resolving this issue. Unlike std::regex
implementation, the RE2 avoids recursive backtracking during regex
evaluation, so more predictable stack and memory usage. To minimize
risk and scope, this patch only replaces ANALYZED_RE with RE2 to
pass the UBSAN build and leaves the remaining regexes unchanged.

Tests:
Passed UBSAN tests.

Change-Id: I9eb1e73e5498761d57e593ef06da2711bfaec19d
Reviewed-on: http://gerrit.cloudera.org:8080/24341
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> query-profile-redaction-test failed in UBSAN test
> -------------------------------------------------
>
>                 Key: IMPALA-15030
>                 URL: https://issues.apache.org/jira/browse/IMPALA-15030
>             Project: IMPALA
>          Issue Type: Bug
>            Reporter: Xuebin Su
>            Assignee: Gokul Kolady
>            Priority: Critical
>
> {noformat}
> Note: Google Test filter = QueryProfileRedactionTest.*
> [==========] Running 9 tests from 1 test suite.
> [----------] Global test environment set-up.
> [----------] 9 tests from QueryProfileRedactionTest
> [ RUN      ] QueryProfileRedactionTest.RedactedProfileMatchesGoldenForTpcds72
> 26/05/19 00:33:05 INFO util.JvmPauseMonitor: Starting JVM pause monitor
> /data/jenkins/workspace/impala-asf-master-core-ubsan/repos/Impala/be/build/debug//service/query-profile-redaction-test:
>  line 10: 1531247 Segmentation fault      (core dumped) 
> ${IMPALA_HOME}/bin/run-jvm-binary.sh 
> ${IMPALA_HOME}/be/build/latest/service/unifiedbetests 
> --gtest_filter=${GTEST_FILTER} 
> --gtest_output=xml:${IMPALA_BE_TEST_LOGS_DIR}/${TEST_EXEC_NAME}.xml 
> -log_filename="${TEST_EXEC_NAME}" "$@"
> Traceback (most recent call last):
>   File 
> "/data/jenkins/workspace/impala-asf-master-core-ubsan/repos/Impala/bin/junitxml_prune_notrun.py",
>  line 72, in <module>
>     if __name__ == "__main__": main()
>   File 
> "/data/jenkins/workspace/impala-asf-master-core-ubsan/repos/Impala/bin/junitxml_prune_notrun.py",
>  line 69, in main
>     junitxml_prune_notrun(options.filename)
>   File 
> "/data/jenkins/workspace/impala-asf-master-core-ubsan/repos/Impala/bin/junitxml_prune_notrun.py",
>  line 32, in junitxml_prune_notrun
>     root = tree.parse(junitxml_filename)
>   File "/usr/lib64/python3.6/xml/etree/ElementTree.py", line 586, in parse
>     source = open(source, "rb")
> FileNotFoundError: [Errno 2] No such file or directory: 
> '/data/jenkins/workspace/impala-asf-master-core-ubsan/repos/Impala/logs/be_tests/query-profile-redaction-test.xml'{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to