[jira] [Commented] (YARN-2945) FSLeafQueue should hold lock before and after sorting runnableApps in assignContainer
[ https://issues.apache.org/jira/browse/YARN-2945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14250420#comment-14250420 ] Karthik Kambatla commented on YARN-2945: +1. Checking this in. FSLeafQueue should hold lock before and after sorting runnableApps in assignContainer - Key: YARN-2945 URL: https://issues.apache.org/jira/browse/YARN-2945 Project: Hadoop YARN Issue Type: Bug Reporter: Tsuyoshi OZAWA Assignee: Tsuyoshi OZAWA Attachments: YARN-2945.001.patch, YARN-2945.002.patch After YARN-2910, assignContainer hold WriteLock while sorting and ReadLock while referencing runnableApps. This can cause interrupted assignment of containers regardless of the policy. {code} writeLock.lock(); try { Collections.sort(runnableApps, comparator); } finally { writeLock.unlock(); } readLock.lock(); try { for (FSAppAttempt sched : runnableApps) { if (SchedulerAppUtils.isBlacklisted(sched, node, LOG)) { continue; } assigned = sched.assignContainer(node); if (!assigned.equals(Resources.none())) { break; } } } finally { readLock.unlock(); } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (YARN-2945) FSLeafQueue should hold lock before and after sorting runnableApps in assignContainer
[ https://issues.apache.org/jira/browse/YARN-2945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14240945#comment-14240945 ] Hadoop QA commented on YARN-2945: - {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12686222/YARN-2945.001.patch against trunk revision 2e98ad3. {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:red}-1 tests included{color}. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 javadoc{color}. There were no new javadoc warning messages. {color:green}+1 eclipse:eclipse{color}. The patch built with eclipse:eclipse. {color:red}-1 findbugs{color}. The patch appears to introduce 15 new Findbugs (version 2.0.3) warnings. {color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings. {color:red}-1 core tests{color}. The patch failed these unit tests in hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager: org.apache.hadoop.yarn.server.resourcemanager.TestClientRMTokens org.apache.hadoop.yarn.server.resourcemanager.security.TestRMDelegationTokens org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.TestFairSchedulerQueueACLs org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.TestContainerAllocation org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCapacitySchedulerQueueACLs org.apache.hadoop.yarn.server.resourcemanager.TestApplicationACLs org.apache.hadoop.yarn.server.resourcemanager.TestWorkPreservingRMRestart org.apache.hadoop.yarn.server.resourcemanager.TestMoveApplication org.apache.hadoop.yarn.server.resourcemanager.TestRM org.apache.hadoop.yarn.server.resourcemanager.TestClientRMService The following test timeouts occurred in hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager: org.apache.hadoop.yarn.server.resourcemanager.security.TestClientToAMTokens org.apache.hadoop.yarn.server.resourcemanager.TestRMRestart org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.TestFairScheduler Test results: https://builds.apache.org/job/PreCommit-YARN-Build/6070//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-YARN-Build/6070//artifact/patchprocess/newPatchFindbugsWarningshadoop-yarn-server-resourcemanager.html Console output: https://builds.apache.org/job/PreCommit-YARN-Build/6070//console This message is automatically generated. FSLeafQueue should hold lock before and after sorting runnableApps in assignContainer - Key: YARN-2945 URL: https://issues.apache.org/jira/browse/YARN-2945 Project: Hadoop YARN Issue Type: Bug Reporter: Tsuyoshi OZAWA Assignee: Tsuyoshi OZAWA Attachments: YARN-2945.001.patch After YARN-2910, assignContainer hold WriteLock while sorting and ReadLock while referencing runnableApps. This can cause interrupted assignment of containers regardless of the policy. {code} writeLock.lock(); try { Collections.sort(runnableApps, comparator); } finally { writeLock.unlock(); } readLock.lock(); try { for (FSAppAttempt sched : runnableApps) { if (SchedulerAppUtils.isBlacklisted(sched, node, LOG)) { continue; } assigned = sched.assignContainer(node); if (!assigned.equals(Resources.none())) { break; } } } finally { readLock.unlock(); } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (YARN-2945) FSLeafQueue should hold lock before and after sorting runnableApps in assignContainer
[ https://issues.apache.org/jira/browse/YARN-2945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14241508#comment-14241508 ] Karthik Kambatla commented on YARN-2945: Other committers: please hold off on committing this until I get a chance to take a close look. During the course of YARN-2910, we ended up with a deadlock when we held the equivalent of write lock over the entire block. While it is true in theory, the queue might become unsorted but that should be okay in practice. Actually, we have been considering sorting only periodically for better performance. FSLeafQueue should hold lock before and after sorting runnableApps in assignContainer - Key: YARN-2945 URL: https://issues.apache.org/jira/browse/YARN-2945 Project: Hadoop YARN Issue Type: Bug Reporter: Tsuyoshi OZAWA Assignee: Tsuyoshi OZAWA Attachments: YARN-2945.001.patch After YARN-2910, assignContainer hold WriteLock while sorting and ReadLock while referencing runnableApps. This can cause interrupted assignment of containers regardless of the policy. {code} writeLock.lock(); try { Collections.sort(runnableApps, comparator); } finally { writeLock.unlock(); } readLock.lock(); try { for (FSAppAttempt sched : runnableApps) { if (SchedulerAppUtils.isBlacklisted(sched, node, LOG)) { continue; } assigned = sched.assignContainer(node); if (!assigned.equals(Resources.none())) { break; } } } finally { readLock.unlock(); } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (YARN-2945) FSLeafQueue should hold lock before and after sorting runnableApps in assignContainer
[ https://issues.apache.org/jira/browse/YARN-2945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14241740#comment-14241740 ] Tsuyoshi OZAWA commented on YARN-2945: -- Thanks for your comment. It make sense to me, but it can be confusing for readers of the code. How about adding comments of the hack? In addition to that, periodic sort is also better approach - the semantics of FS preserved in during a period. It should be done on this JIRA? FSLeafQueue should hold lock before and after sorting runnableApps in assignContainer - Key: YARN-2945 URL: https://issues.apache.org/jira/browse/YARN-2945 Project: Hadoop YARN Issue Type: Bug Reporter: Tsuyoshi OZAWA Assignee: Tsuyoshi OZAWA Attachments: YARN-2945.001.patch After YARN-2910, assignContainer hold WriteLock while sorting and ReadLock while referencing runnableApps. This can cause interrupted assignment of containers regardless of the policy. {code} writeLock.lock(); try { Collections.sort(runnableApps, comparator); } finally { writeLock.unlock(); } readLock.lock(); try { for (FSAppAttempt sched : runnableApps) { if (SchedulerAppUtils.isBlacklisted(sched, node, LOG)) { continue; } assigned = sched.assignContainer(node); if (!assigned.equals(Resources.none())) { break; } } } finally { readLock.unlock(); } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (YARN-2945) FSLeafQueue should hold lock before and after sorting runnableApps in assignContainer
[ https://issues.apache.org/jira/browse/YARN-2945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14241757#comment-14241757 ] Karthik Kambatla commented on YARN-2945: I am comfortable with adding comments here in this JIRA. We need to tread carefully with periodic sort, might need to make other data-structure changes in conjunction. FSLeafQueue should hold lock before and after sorting runnableApps in assignContainer - Key: YARN-2945 URL: https://issues.apache.org/jira/browse/YARN-2945 Project: Hadoop YARN Issue Type: Bug Reporter: Tsuyoshi OZAWA Assignee: Tsuyoshi OZAWA Attachments: YARN-2945.001.patch After YARN-2910, assignContainer hold WriteLock while sorting and ReadLock while referencing runnableApps. This can cause interrupted assignment of containers regardless of the policy. {code} writeLock.lock(); try { Collections.sort(runnableApps, comparator); } finally { writeLock.unlock(); } readLock.lock(); try { for (FSAppAttempt sched : runnableApps) { if (SchedulerAppUtils.isBlacklisted(sched, node, LOG)) { continue; } assigned = sched.assignContainer(node); if (!assigned.equals(Resources.none())) { break; } } } finally { readLock.unlock(); } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (YARN-2945) FSLeafQueue should hold lock before and after sorting runnableApps in assignContainer
[ https://issues.apache.org/jira/browse/YARN-2945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14241908#comment-14241908 ] Hadoop QA commented on YARN-2945: - {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12686378/YARN-2945.002.patch against trunk revision a7c6c71. {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:red}-1 tests included{color}. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 javadoc{color}. There were no new javadoc warning messages. {color:green}+1 eclipse:eclipse{color}. The patch built with eclipse:eclipse. {color:red}-1 findbugs{color}. The patch appears to introduce 15 new Findbugs (version 2.0.3) warnings. {color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings. {color:red}-1 core tests{color}. The patch failed these unit tests in hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager: org.apache.hadoop.yarn.server.resourcemanager.TestRM org.apache.hadoop.yarn.server.resourcemanager.TestRMRestart org.apache.hadoop.yarn.server.resourcemanager.TestWorkPreservingRMRestart Test results: https://builds.apache.org/job/PreCommit-YARN-Build/6076//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-YARN-Build/6076//artifact/patchprocess/newPatchFindbugsWarningshadoop-yarn-server-resourcemanager.html Console output: https://builds.apache.org/job/PreCommit-YARN-Build/6076//console This message is automatically generated. FSLeafQueue should hold lock before and after sorting runnableApps in assignContainer - Key: YARN-2945 URL: https://issues.apache.org/jira/browse/YARN-2945 Project: Hadoop YARN Issue Type: Bug Reporter: Tsuyoshi OZAWA Assignee: Tsuyoshi OZAWA Attachments: YARN-2945.001.patch, YARN-2945.002.patch After YARN-2910, assignContainer hold WriteLock while sorting and ReadLock while referencing runnableApps. This can cause interrupted assignment of containers regardless of the policy. {code} writeLock.lock(); try { Collections.sort(runnableApps, comparator); } finally { writeLock.unlock(); } readLock.lock(); try { for (FSAppAttempt sched : runnableApps) { if (SchedulerAppUtils.isBlacklisted(sched, node, LOG)) { continue; } assigned = sched.assignContainer(node); if (!assigned.equals(Resources.none())) { break; } } } finally { readLock.unlock(); } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (YARN-2945) FSLeafQueue should hold lock before and after sorting runnableApps in assignContainer
[ https://issues.apache.org/jira/browse/YARN-2945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14241935#comment-14241935 ] Tsuyoshi OZAWA commented on YARN-2945: -- The test failure is not related to the patch. [~kasha], could you review the patch? FSLeafQueue should hold lock before and after sorting runnableApps in assignContainer - Key: YARN-2945 URL: https://issues.apache.org/jira/browse/YARN-2945 Project: Hadoop YARN Issue Type: Bug Reporter: Tsuyoshi OZAWA Assignee: Tsuyoshi OZAWA Attachments: YARN-2945.001.patch, YARN-2945.002.patch After YARN-2910, assignContainer hold WriteLock while sorting and ReadLock while referencing runnableApps. This can cause interrupted assignment of containers regardless of the policy. {code} writeLock.lock(); try { Collections.sort(runnableApps, comparator); } finally { writeLock.unlock(); } readLock.lock(); try { for (FSAppAttempt sched : runnableApps) { if (SchedulerAppUtils.isBlacklisted(sched, node, LOG)) { continue; } assigned = sched.assignContainer(node); if (!assigned.equals(Resources.none())) { break; } } } finally { readLock.unlock(); } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (YARN-2945) FSLeafQueue should hold lock before and after sorting runnableApps in assignContainer
[ https://issues.apache.org/jira/browse/YARN-2945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14240677#comment-14240677 ] Hadoop QA commented on YARN-2945: - {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12686195/YARN-2945.1.patch against trunk revision 2e98ad3. {color:red}-1 patch{color}. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-YARN-Build/6068//console This message is automatically generated. FSLeafQueue should hold lock before and after sorting runnableApps in assignContainer - Key: YARN-2945 URL: https://issues.apache.org/jira/browse/YARN-2945 Project: Hadoop YARN Issue Type: Bug Reporter: Tsuyoshi OZAWA Assignee: Tsuyoshi OZAWA Attachments: YARN-2945.1.patch After YARN-2910, assignContainer hold WriteLock while sorting and ReadLock while referencing runnableApps. This can cause interrupted assignment of containers regardless of the policy. {code} writeLock.lock(); try { Collections.sort(runnableApps, comparator); } finally { writeLock.unlock(); } readLock.lock(); try { for (FSAppAttempt sched : runnableApps) { if (SchedulerAppUtils.isBlacklisted(sched, node, LOG)) { continue; } assigned = sched.assignContainer(node); if (!assigned.equals(Resources.none())) { break; } } } finally { readLock.unlock(); } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)