You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2024/12/24 07:52:00 UTC
[jira] [Commented] (YARN-11732) Potential NPE when calling SchedulerNode#reservedContainer for CapacityScheduler
[ https://issues.apache.org/jira/browse/YARN-11732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17908030#comment-17908030 ]
ASF GitHub Bot commented on YARN-11732:
---------------------------------------
zuston commented on PR #7065:
URL: https://github.com/apache/hadoop/pull/7065#issuecomment-2560793651
Nice catch! I encounter the same problem. @TaoYang526
> Potential NPE when calling SchedulerNode#reservedContainer for CapacityScheduler
> --------------------------------------------------------------------------------
>
> Key: YARN-11732
> URL: https://issues.apache.org/jira/browse/YARN-11732
> Project: Hadoop YARN
> Issue Type: Bug
> Components: capacityscheduler
> Affects Versions: 3.4.0, 3.2.4, 3.3.6, 3.5.0
> Reporter: Tao Yang
> Assignee: Tao Yang
> Priority: Major
> Labels: pull-request-available
> Fix For: 3.3.7, 3.4.1, 3.5.0
>
>
> I found some places calling *SchedulerNode#getReservedContainer* to get reservedContainer (returned value) but not do sanity(not-null) check before calling internal methods of it, which can have a risk to raise NullPointerException if it's null.
> Most of these places have a premise that node has reserved container a few moments ago, but may getting null by calling *SchedulerNode#getReservedContainer* in the next moment, since the reservedContainer can be updated to null concurrently in scheduling and monitoring(preemption) thread. So that not-null check should be done before calling internal methods of the reservedContainer.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org