[
https://issues.apache.org/jira/browse/MAPREDUCE-3519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13166065#comment-13166065
]
Ravi Gummadi commented on MAPREDUCE-3519:
-----------------------------------------
Changing Configuration.java to have a ReadWriteLock and affecting everybody
(not just hadoop-mapreduce-project) seems to be complex and needs more thinking
in terms of dependencies because almost every class in hadoop uses
Configuration. We can move to this model of ReadWriteLock in the long run (if
possible).
In the short term, I don't see a simple way to handle this deadlock without
removing the synchronized(conf) blocks in the methods in
LocalDirsHandlerService.java.
Further, I don't see an issue/problem in removing these synchronized(conf)
blocks in LocalDirsHandlerService.java. Everywhere else in hadoop source code
there are no such synchronization blocks when reading from OR writing to
configuration object(s). As the methods in Configuration.java like getProps()
are already synchronized and the actual setting of a property using
Configuration.properties.setProperty() and getting the value of a property
using Configuration.properties.getProperty() seem to be atomic, I don't see an
issue in removing these synchronized(conf) blocks from
LocalDirsHandlerService.java.
Please provide your comments/suggestions.
> Deadlock in LocalDirsHandlerService and ShuffleHandler
> ------------------------------------------------------
>
> Key: MAPREDUCE-3519
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-3519
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: mrv2, nodemanager
> Affects Versions: 0.23.1, 0.24.0
> Reporter: Ravi Gummadi
> Assignee: Ravi Gummadi
> Fix For: 0.23.1
>
> Attachments: 3519.patch, deadlock.txt
>
>
> MAPREDUCE-3121 cloned Configuration object in LocalDirsHandlerService.init()
> to avoid others to access that configuration object. But since it is set in
> the base class of LocalDirsHandlerService using super.init(conf), it is
> reflected and is accessible to some other services. This is causing a
> deadlock when accessing this configuration object from
> LocalDirsHandlerService and ShuffleHandler along with AllocatorPerContext
> object.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira