Return-Path: X-Original-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9A41211C96 for ; Thu, 12 Jun 2014 15:38:02 +0000 (UTC) Received: (qmail 66439 invoked by uid 500); 12 Jun 2014 15:38:02 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 66398 invoked by uid 500); 12 Jun 2014 15:38:02 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: yarn-issues@hadoop.apache.org Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 66387 invoked by uid 99); 12 Jun 2014 15:38:02 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jun 2014 15:38:02 +0000 Date: Thu, 12 Jun 2014 15:38:02 +0000 (UTC) From: "Tsuyoshi OZAWA (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-2148) TestNMClient failed due more exit code values added and passed to AM MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/YARN-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14029270#comment-14029270 ] Tsuyoshi OZAWA commented on YARN-2148: -------------------------------------- [~zjshen] [~leftnoteasy], thank you for the points. {quote} Previously, I have 0 here because it is possible that the container finishes so quickly that kill command even hasn't be processed. However, CLEANUP_CONTAINER is executed on another thread. Before it is executed, the container has already exit as normal, with the exit code 0. {quote} I'm checking whether this case can happen. Please wait a moment. {quote} It seems that we still have 137 and 143 in ExitCode. We need to make sure the container will not exit with these two codes here. {quote} Is this because that the signal is sent from {{ContainerLaunch#cleanupContainer()}}(SIGTERM) and {{DelayedProcessKiller#run()}}(SIGKILL), right? If the answer is positive, {{ContainerImpl#exitCode}} is set in the {{KillTransition#transition}} before container's being signaled. Therefore, both cases are covered. {code} @SuppressWarnings("unchecked") // dispatcher not typed public void cleanupContainer() throws IOException { ... final Signal signal = sleepDelayBeforeSigKill > 0 ? Signal.TERM : Signal.KILL; } {code} > TestNMClient failed due more exit code values added and passed to AM > -------------------------------------------------------------------- > > Key: YARN-2148 > URL: https://issues.apache.org/jira/browse/YARN-2148 > Project: Hadoop YARN > Issue Type: Bug > Components: client > Affects Versions: 3.0.0, 2.5.0 > Reporter: Wangda Tan > Assignee: Wangda Tan > Fix For: 2.5.0 > > Attachments: YARN-2148.patch > > > Currently, TestNMClient will be failed in trunk, see https://builds.apache.org/job/PreCommit-YARN-Build/3959/testReport/junit/org.apache.hadoop.yarn.client.api.impl/TestNMClient/testNMClient/ > {code} > java.lang.AssertionError: null > at org.junit.Assert.fail(Assert.java:86) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertTrue(Assert.java:52) > at org.apache.hadoop.yarn.client.api.impl.TestNMClient.testGetContainerStatus(TestNMClient.java:385) > at org.apache.hadoop.yarn.client.api.impl.TestNMClient.testContainerManagement(TestNMClient.java:347) > at org.apache.hadoop.yarn.client.api.impl.TestNMClient.testNMClient(TestNMClient.java:226) > {code} > Test cases in TestNMClient uses following code to verify exit code of COMPLETED containers > {code} > testGetContainerStatus(container, i, ContainerState.COMPLETE, > "Container killed by the ApplicationMaster.", Arrays.asList( > new Integer[] {137, 143, 0})); > {code} > But YARN-2091 added logic to make exit code reflecting the actual status, so exit code of the "killed by ApplicationMaster" will be -105, > {code} > if (container.hasDefaultExitCode()) { > container.exitCode = exitEvent.getExitCode(); > } > {code} > We should update test case as well. -- This message was sent by Atlassian JIRA (v6.2#6252)