Return-Path: Delivered-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Received: (qmail 19187 invoked from network); 26 Oct 2010 18:45:44 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Oct 2010 18:45:44 -0000 Received: (qmail 75717 invoked by uid 500); 26 Oct 2010 18:45:44 -0000 Delivered-To: apmail-hadoop-mapreduce-issues-archive@hadoop.apache.org Received: (qmail 75613 invoked by uid 500); 26 Oct 2010 18:45:44 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-issues@hadoop.apache.org Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 75605 invoked by uid 99); 26 Oct 2010 18:45:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Oct 2010 18:45:44 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Oct 2010 18:45:42 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o9QIjKt3022908 for ; Tue, 26 Oct 2010 18:45:21 GMT Message-ID: <26051097.85091288118720915.JavaMail.jira@thor> Date: Tue, 26 Oct 2010 14:45:20 -0400 (EDT) From: "Joydeep Sen Sarma (JIRA)" To: mapreduce-issues@hadoop.apache.org Subject: [jira] Commented: (MAPREDUCE-2157) tasklauncher threads in TaskTracker can die because of unexpected interrupts In-Reply-To: <29780790.83571288115540547.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MAPREDUCE-2157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12925083#action_12925083 ] Joydeep Sen Sarma commented on MAPREDUCE-2157: ---------------------------------------------- no i don't know the exact code path that caused this to happen. however: - we had an instance of the TaskLauncher dying. the logs indicated it died because of an interrupted condition or interrupted exception. jobs got hung because of this. - Thread.interrupted() state is a global state. any subsystem (like log4j) can set it. it's very unsafe to use this as a way of determining whether the thread should exit. we should gate thread exit on running flag. note that all the other threads in the TaskTracker check the running flag to determine thread exit condition. I used the log4j code as a potential example of a subsystem that can set the interrupted flag - i am not even sure we are using asyncappender. > tasklauncher threads in TaskTracker can die because of unexpected interrupts > ---------------------------------------------------------------------------- > > Key: MAPREDUCE-2157 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-2157 > Project: Hadoop Map/Reduce > Issue Type: Bug > Reporter: Joydeep Sen Sarma > Assignee: Joydeep Sen Sarma > Priority: Critical > > taskLauncher thread exits on interruptedException and on Interrupt conditions without checking for any shutdown flag: > while (!Thread.interrupted()) { > ... > } catch (InterruptedException e) { > return; // ALL DONE > } > } > If the interrupt happened because of reasons other than TaskTracker.close() - then the TaskTracker will look functional - but will not be able to schedule tasks anymore. worse - some tasks (that are in the launch queue) will hang indefinitely un UNASSIGNED state (the JobTracker will not even time them out). We have seen this cause jobs to hang indefinitely. > It seems that the interrupted condition can be set by log4j (of which there are many calls inside TaskLauncher). See or instance: http://logging.apache.org/log4j/1.2/xref/org/apache/log4j/AsyncAppender.html -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.