jianjin qin created YARN-10765:
----------------------------------

             Summary: Fair scheduler continuous scheduling thread crashes while 
sorting nodes
                 Key: YARN-10765
                 URL: https://issues.apache.org/jira/browse/YARN-10765
             Project: Hadoop YARN
          Issue Type: Bug
          Components: scheduler
    Affects Versions: 2.7.1, 2.7.0
            Reporter: jianjin qin
             Fix For: 3.0.0
         Attachments: 
0001-fix-fair-scheduler-continuous-scheduling-thread-cras.patch

NodeAvailableResourceComparator use variable nodes which contains to compare, 
but nodeIdList is not same with nodes.keySet() during sort. when node removed 
before sort, such as n2,n3 are removed, compare(n2, n3)=1 and compare(n3, 
n2)=1, this violates the reflexivity of comparator, we may get the exception: 
java.lang.IllegalArgumentException: Comparison method violates its general 
contract!
{code:java}
2021-01-19 10:22:55,102 ERROR 
org.apache.hadoop.yarn.YarnUncaughtExceptionHandler: Thread 
Thread[FairSchedulerContinuousScheduling,5,main] threw an Exception.
java.lang.IllegalArgumentException: Comparison method violates its general 
contract!
        at java.util.TimSort.mergeLo(TimSort.java:747)
        at java.util.TimSort.mergeAt(TimSort.java:483)
        at java.util.TimSort.mergeCollapse(TimSort.java:410)
        at java.util.TimSort.sort(TimSort.java:214)
        at java.util.TimSort.sort(TimSort.java:173)
        at java.util.Arrays.sort(Arrays.java:659)
        at java.util.Collections.sort(Collections.java:217)
        at 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler.continuousSchedulingAttempt(FairScheduler.java:1069)
        at 
org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler$ContinuousSchedulingThread.run(FairScheduler.java:322)
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to