Return-Path: Delivered-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Received: (qmail 89471 invoked from network); 4 Jan 2010 06:09:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Jan 2010 06:09:18 -0000 Received: (qmail 29426 invoked by uid 500); 4 Jan 2010 06:09:18 -0000 Delivered-To: apmail-hadoop-mapreduce-issues-archive@hadoop.apache.org Received: (qmail 29352 invoked by uid 500); 4 Jan 2010 06:09:17 -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 29342 invoked by uid 99); 4 Jan 2010 06:09:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2010 06:09:17 +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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2010 06:09:15 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8B291234C498 for ; Sun, 3 Jan 2010 22:08:54 -0800 (PST) Message-ID: <234302082.15191262585334568.JavaMail.jira@brutus.apache.org> Date: Mon, 4 Jan 2010 06:08:54 +0000 (UTC) From: "Amar Kamat (JIRA)" To: mapreduce-issues@hadoop.apache.org Subject: [jira] Commented: (MAPREDUCE-1342) Potential JT deadlock in faulty TT tracking In-Reply-To: <1039160381.1262052389396.JavaMail.jira@brutus.apache.org> 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-1342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796092#action_12796092 ] Amar Kamat commented on MAPREDUCE-1342: --------------------------------------- Simply making _potentiallyFaultyTrackers_ a concurrent HashMap and removing the *synchronized* keyword might introduce more issues. I think the reason for synchronizing on _potentiallyFaultyTrackers_ was to perform some operations in an atomic manner. Have you checked if the semantics remain same after removing the synchronized keyword? I think making _potentiallyFaultyTrackers_ as concurrent HashMap is better but might be dangerous. One other way to avoid the deadlock would be by marking few non-private apis in JobTracker.FaultyTrackerInfo as synchronized. Mainly {code} JobTracker.FaultyTrackerInfo.incrementFaults // called via Heartbeat and testcases JobTracker.FaultyTrackerInfo.markTrackerHealthy // called via Heartbeat JobTracker.FaultyTrackerInfo.shouldAssignTasksToTracker // called via Heartbeat and testcases JobTracker.FaultyTrackerInfo.isBlacklisted // called in multiple cases .. need to check JobTracker.FaultyTrackerInfo.getFaultCount // called via Heartbeat and testcases JobTracker.FaultyTrackerInfo.getReasonForBlackListing // never used! JobTracker.FaultyTrackerInfo.setNodeHealthStatus // called via Heartbeat and testcases {code} So except JobTracker.FaultyTrackerInfo.isBlacklisted(), all the calls are centrally locked on JobTracker. Hence adding the synchronized keyword in the method signature wouldnt introduce any overhead. Need to check on JobTracker.FaultyTrackerInfo.isBlacklisted(). > Potential JT deadlock in faulty TT tracking > ------------------------------------------- > > Key: MAPREDUCE-1342 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-1342 > Project: Hadoop Map/Reduce > Issue Type: Bug > Components: jobtracker > Affects Versions: 0.22.0 > Reporter: Todd Lipcon > Attachments: cycle0.png, mapreduce-1342-1.patch > > > JT$FaultyTrackersInfo.incrementFaults first locks potentiallyFaultyTrackers, and then calls blackListTracker, which calls removeHostCapacity, which locks JT.taskTrackers > On the other hand, JT.blacklistedTaskTrackers() locks taskTrackers, then calls faultyTrackers.isBlacklisted() which goes on to lock potentiallyFaultyTrackers. > I haven't produced such a deadlock, but the lock ordering here is inverted and therefore could deadlock. > Not sure if this goes back to 0.21 or just in trunk. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.