hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wangda Tan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-7249) Fix CapacityScheduler NPE issue when a container preempted while the node is being removed
Date Mon, 25 Sep 2017 22:54:00 GMT

    [ https://issues.apache.org/jira/browse/YARN-7249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16179907#comment-16179907

Wangda Tan commented on YARN-7249:


bq. doesn't make sense if node is null, but if queue.completedContainer isn't called, won't
that leave references to the container still inside internal structures? And, for example,
won't reserved incrimination counters un-decremented?

I think it should be fine: containers are properly released when CapacityScheduler#removeNode
is called. And if parallel threads access scheduler: queue#completedContainer get invoked
with non-null but already removed node, it becomes a no-op. Please let me know if you think

> Fix CapacityScheduler NPE issue when a container preempted while the node is being removed
> ------------------------------------------------------------------------------------------
>                 Key: YARN-7249
>                 URL: https://issues.apache.org/jira/browse/YARN-7249
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 2.8.1
>            Reporter: Wangda Tan
>            Assignee: Wangda Tan
>            Priority: Blocker
>         Attachments: YARN-7249.branch-2.8.001.patch
> This issue could happen when 3 conditions satisfied:
> 1) A node is removing from scheduler.
> 2) A container running on the node is being preempted. 
> 3) A rare race condition causes scheduler pass a null node to leaf queue.
> Fix of the problem is to add a null node check inside CapacityScheduler.
> Stack trace:
> {code}
> 2017-08-31 02:51:24,748 FATAL resourcemanager.ResourceManager (ResourceManager.java:run(714))
- Error in handling event type KILL_RESERVED_CONTAINER to the scheduler 
> java.lang.NullPointerException 
> at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.LeafQueue.completedContainer(LeafQueue.java:1308)

> at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.completedContainerInternal(CapacityScheduler.java:1469)

> at org.apache.hadoop.yarn.server.resourcemanager.scheduler.AbstractYarnScheduler.completedContainer(AbstractYarnScheduler.java:497)

> at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.killReservedContainer(CapacityScheduler.java:1505)

> at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.handle(CapacityScheduler.java:1341)

> at org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler.handle(CapacityScheduler.java:127)

> at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$SchedulerEventDispatcher$EventProcessor.run(ResourceManager.java:705)

> {code}
> This is an issue only existed in 2.8.x

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org

View raw message