hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amareshwari Sriramadasu (JIRA)" <j...@apache.org>
Subject [jira] Commented: (MAPREDUCE-1342) Potential JT deadlock in faulty TT tracking
Date Thu, 07 Jan 2010 07:33:54 GMT

    [ https://issues.apache.org/jira/browse/MAPREDUCE-1342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12797545#action_12797545
] 

Amareshwari Sriramadasu commented on MAPREDUCE-1342:
----------------------------------------------------

JobTracker.FaultyTrackerInfo.isBlacklisted is called, holding taskTrackers lock, from methods
JobTracker.activeTaskTrackers(), JobTracker.blacklistedTaskTrackers(), JobTracker.removeTracker(),
JobTracker.taskTrackerNames(), JobTracker.updateTaskTrackerStatus(). But methods FaultyTrackerInfo.{remove/add}HostCapacity
hold the lock on potentiallyFaultyTrackers and then lock taskTrackers. Moreover all the callers
of FaultyTrackerInfo.{remove/add}HostCapacity hold JobTracker lock. 
Discussed offline with Amar and Jothi, and we think that we should maintain the order that
taskTrackers lock first, then potentiallyFaultyTrackers lock in methods {remove/add}HostCapacity
also. Since, those methods already hold JobTracker lock, this code change should not introduce
any side-effects.

Thoughts?

> 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, mapreduce-1342-2.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.


Mime
View raw message