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

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

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

IMPALA-14392: Fix a crash in AdmissionD in GetQueryStatus PrintId()

The GetQueryStatus RPC could crash due to a use-after-free error
when accessing the reqest. When a query was rejected, the
function would call RespondAndReleaseRpc(), which can free the "req"
object, and then attempt to access req->query_id() for logging and
to delete the entry from the admission_state_map_.

This commit fixes the crash by moving the call to
RespondAndReleaseRpc() to the end of the function. This change
aligns this function with others like
AdmissionControlService::ReleaseQuery(), which also deletes from
admission_state_map_ before RespondAndReleaseRpc(), it ensures
that all logic is completed before the RPC resources are released.

Tests:
Reproduced the issue by running 100 times
TestAdmissionControllerStressWithACService::test_mem_limit, and
after the change, it can successfully run 100 times.
Passed exhaustive tests.

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


> Admissiond throw minidump in 
> TestAdmissionControllerStressWithACService::test_mem_limit
> ---------------------------------------------------------------------------------------
>
>                 Key: IMPALA-14392
>                 URL: https://issues.apache.org/jira/browse/IMPALA-14392
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>    Affects Versions: Impala 5.0.0
>            Reporter: Riza Suminto
>            Assignee: Yida Wu
>            Priority: Major
>              Labels: broken-build
>         Attachments: 
> admissiond.impala-ec2-rhel92-m6i-4xlarge-ondemand-18c2.vpc.cloudera.com.jenkins.log.INFO.20250903-023352.3367489
>
>
> Dedicated admissiond crash and throw minidump when running 
> TestAdmissionControllerStressWithACService::test_mem_limit at downstream 
> build.
> These are the latest few lines from the 
> [^admissiond.impala-ec2-rhel92-m6i-4xlarge-ondemand-18c2.vpc.cloudera.com.jenkins.log.INFO.20250903-023352.3367489]
> {noformat}
> I20250903 02:33:59.825834 3367989 admission-control-service.cc:216] Query 
> f543ccf96f7ccb52:c6d4565300000000 was rejected. Removing admission state to 
> free resources.
> I20250903 02:33:59.825913 3367986 admission-control-service.cc:216] Query 
> d44780017c3efb00:d72f792000000000 was rejected. Removing admission state to 
> free resources.
> I20250903 02:33:59.825930 3368000 admission-control-service.cc:216] Query 
> 664e8cffb1f95c4b:b7dd2c0200000000 was rejected. Removing admission state to 
> free resources.
> I20250903 02:33:59.826218 3367999 admission-control-service.cc:216] Query 
> d6493fc5a494d328:b8e9d75b00000000 was rejected. Removing admission state to 
> free resources.
> I20250903 02:33:59.826261 3368000 admission-controller.cc:1929] Unable to 
> find host c3450df0951de6e5:dcdf8b2fddc2bab1 to cleanup queries for.
> I20250903 02:33:59.826359 3368000 admission-controller.cc:1929] Unable to 
> find host 9e48d81585775885:4ce36caebdaad3aa to cleanup queries Minidump in 
> thread [3367992]rpc worker running query 0000000000000000:0000000000000000, 
> fragment instance 0000000000000000:0000000000000000
> Wrote minidump to 
> /data/jenkins/workspace/impala-cdw-master-staging-exhaustive-release/repos/Impala/logs/custom_cluster_tests/minidumps/admissiond/dc09fed3-5a53-4e36-873796ba-6ac5896a.dmp
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  SIGSEGV (0xb) at pc=0x0000000001d19cdf, pid=3367489, tid=0x00007f55563e5640
> #
> # JRE version: OpenJDK Runtime Environment (8.0_462-b08) (build 1.8.0_462-b08)
> # Java VM: OpenJDK 64-Bit Server VM (25.462-b08 mixed mode linux-amd64 
> compressed oops)
> # Problematic frame:
> # C  [admissiond+0x1919cdf]  impala::PrintId(impala::UniqueIdPB const&, 
> std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> 
> > const&)+0x26f
> #
> # Core dump written. Default location: 
> /data0/jenkins/workspace/impala-cdw-master-staging-exhaustive-release/repos/Impala/tests/core
>  or core.3367489
> #
> # An error report file with more information is saved as:
> # 
> /data/jenkins/workspace/impala-cdw-master-staging-exhaustive-release/repos/Impala/logs/hs_err_pid3367489.log
> #
> # If you would like to submit a bug report, please visit:
> #   https://access.redhat.com/support/cases/
> #{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