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

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

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

IMPALA-14533: Fix crash in ASAN/TSAN builds due to nullptr 
TcmallocMetric::BYTES_IN_USE

Impala uses SanitizerMallocMetric::BYTES_ALLOCATED instead of
TcmallocMetric::BYTES_IN_USE in ASAN or TSAN builds. However, the
admissiond logic in IMPALA-14493 still uses uninitialized
TcmallocMetric::BYTES_IN_USE under these builds, leading to a
nullptr crash.

To fix this issue, we will use SanitizerMallocMetric::BYTES_ALLOCATED
instead for ASAN and TSAN builds in admission controller, which is
the same logic in memory-metrics.cc to use a different metric for
those builds.

Tests:
Passed ASAN and TSAN builds testing.
Passed core tests.

Change-Id: Ic4fbdc134ea302f7302d177d073eb49136ba775c
Reviewed-on: http://gerrit.cloudera.org:8080/23646
Reviewed-by: Michael Smith <[email protected]>
Tested-by: Michael Smith <[email protected]>


> AdmissionD Crash in ASAN/TSAN builds on TcmallocMetric::BYTES_IN_USE
> --------------------------------------------------------------------
>
>                 Key: IMPALA-14533
>                 URL: https://issues.apache.org/jira/browse/IMPALA-14533
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>    Affects Versions: Impala 5.0.0
>            Reporter: Yida Wu
>            Assignee: Yida Wu
>            Priority: Major
>             Fix For: Impala 5.0.0
>
>
> In IMPALA-14493, the TcmallocMetric::BYTES_IN_USE metric is used to safeguard 
> memory usage in admissiond, preventing potential OOM issues. However, in ASAN 
> or TSAN builds, the code uses SanitizerMallocMetric::BYTES_ALLOCATED instead 
> of TcmallocMetric::BYTES_IN_USE (as shown here 
> [https://github.com/apache/impala/blob/2688e30ae51d90de6d9e061b75a2f7bc4af24892/be/src/util/memory-metrics.cc#L113],
>  ). As a result, using an uninitialized metric TcmallocMetric::BYTES_IN_USE, 
> leading to a crash.



--
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