[ 
https://issues.apache.org/jira/browse/YARN-12063?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shilun Fan resolved YARN-12063.
-------------------------------
    Fix Version/s: 3.4.4
                   3.5.1
                   3.6.0
     Hadoop Flags: Reviewed
       Resolution: Fixed

> FairScheduler update thread can spin forever in ComputeFairShares when a 
> reservation queue's weight is changed concurrently
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-12063
>                 URL: https://issues.apache.org/jira/browse/YARN-12063
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: resourcemanager
>            Reporter: dzcxzl
>            Assignee: dzcxzl
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 3.4.4, 3.5.1, 3.6.0
>
>
> {{TestFairSchedulerPlanFollower}} intermittently hangs in GitHub Actions 
> until the job hits the 6h limit, for example:
>  * [https://github.com/cxzl25/hadoop/actions/runs/43359069221]
>  * [https://github.com/cxzl25/hadoop/actions/runs/43401202274]
> Looping the test in the CI image reproduced the hang in 5 of 558 runs. The 
> thread dumps are identical. The update thread spins in {{ComputeFairShares}} 
> while holding the read lock of the plan queue, and the test thread waits for 
> the write lock of the same queue:
> {code:java}
> "SchedulerUpdateThread" RUNNABLE (cpu=342s, elapsed=344s)
>   at 
> ...fair.policies.ComputeFairShares.computeSharesInternal(ComputeFairShares.java:144)
>   at ...fair.FSParentQueue.updateInternal(FSParentQueue.java:98)
>   at ...fair.FairScheduler.update(FairScheduler.java:368)
> "main" WAITING
>   at ...fair.FSParentQueue.addChildQueue(FSParentQueue.java:77)
>   at 
> ...reservation.FairSchedulerPlanFollower.addReservationQueue(FairSchedulerPlanFollower.java:73)
>   at 
> ...reservation.AbstractSchedulerPlanFollower.synchronizePlan(AbstractSchedulerPlanFollower.java:157)
> {code}
>  
> {{FairScheduler#setEntitlement}} changes the weight of a reservation queue 
> without holding the scheduler lock, while {{FairScheduler#update}} computes 
> fair shares under the write lock. {{ComputeFairShares#computeSharesInternal}} 
> first sets aside the schedulables whose weight is 0, then doubles the 
> weight-to-resource ratio until the resources used reach the total. If the 
> plan follower sets the weight of the default reservation queue to 0 between 
> those two steps, every share stays 0 and the loop never ends.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

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

Reply via email to