Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 99589 invoked from network); 14 May 2008 06:58:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 May 2008 06:58:23 -0000 Received: (qmail 73481 invoked by uid 500); 14 May 2008 06:58:22 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 73398 invoked by uid 500); 14 May 2008 06:58:22 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 73279 invoked by uid 99); 14 May 2008 06:58:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 May 2008 23:58:21 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 May 2008 06:57:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CA4E6234C11F for ; Tue, 13 May 2008 23:57:55 -0700 (PDT) Message-ID: <322208798.1210748275827.JavaMail.jira@brutus> Date: Tue, 13 May 2008 23:57:55 -0700 (PDT) From: "Zheng Shao (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Updated: (HADOOP-3370) failed tasks may stay forever in TaskTracker.runningJobs In-Reply-To: <1415486499.1210329535874.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-3370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Zheng Shao updated HADOOP-3370: ------------------------------- Status: Patch Available (was: Open) > failed tasks may stay forever in TaskTracker.runningJobs > -------------------------------------------------------- > > Key: HADOOP-3370 > URL: https://issues.apache.org/jira/browse/HADOOP-3370 > Project: Hadoop Core > Issue Type: Bug > Components: mapred > Affects Versions: 0.17.0 > Reporter: Zheng Shao > Assignee: Zheng Shao > Priority: Critical > Fix For: 0.18.0 > > Attachments: 3370-1.patch, 3370-2.patch > > > The net effect of this is that, with a long-running TaskTracker, it takes long long time for ReduceTasks on that TaskTracker to fetch map outputs - TaskTracker does that for all reduce tasks in TaskTracker .runningJobs, including those stale ReduceTasks. There is a 5-second delay between 2 requests, which makes it a long time for a running reducetask to get the map output locations, when there are tens of stale ReduceTasks. Of course this also blows up the memory but that is not a too big problem at its rate. > I've verified the bug by adding an html table for TaskTracker.runningJobs on TaskTracker http interface, on a 2-node machine, with a single mapper single reducer job, in which mapper succeeds and reducer fails. I can still see the ReduceTask in TaskTracker.runningJobs, while it's not in the first 2 tables (TaskTracker.tasks and TaskTracker.runningTasks). > Details: > TaskRunner.run() will call TaskTracker.reportTaskFinished() when the task fails, > which calls TaskTracker.TaskInProgress.taskFinished, > which calls TaskTracker.TaskInProgress.cleanup(), > which calls TaskTracker.tasks.remove(taskId). > In short, it remove a failed task from TaskTracker.tasks, but not TaskTracker.runningJobs. > Then the failure is reported to JobTracker. > JobTracker.heartbeat will call processHeartbeat, > which calls updateTaskStatuses, > which calls tip.getJob().updateTaskStatus, > which calls JobInProgress.failedTask, > which calls JobTracker.markCompletedTaskAttempt, > which puts the task to trackerToMarkedTasksMap, > and then JobTracker.heartbeat will call removeMarkedTasks, > which call removeTaskEntry, > which removes it from trackerToTaskMap. > JobTracker.heartbeat will also call JobTracker.getTasksToKill, > which reads from trackerToTaskMap for pairs, > and ask tracker to KILL the task or job of the task. > In the case there is only one task for a specific job on a specific tracker > and that task failed (NOTE: and that task is not the last failed try of the > job - otherwise JobTracker.getTasksToKill will pick it up before > removeMarkedTasks comes in and remove it from trackerToTaskMap), the task > tracker will not receive the KILL task or KILL job message from the JobTracker. > As a result, the task will remain in TaskTracker.runningJobs forever. > Solution: > Remove the task from TaskTracker.runningJobs at the same time when we remove it from TaskTracker.tasks. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.