[ 
https://issues.apache.org/jira/browse/HDFS-5832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13881927#comment-13881927
 ] 

Rakesh R commented on HDFS-5832:
--------------------------------

Thanks Uma for the interest.
Looks like similar, but I could see still there is a chance of reverse locking 
in the code. 

I'm seeing the following code flow like,
- In one side, when running SafeModeMonitor thread, it is invoking 
safeMode#canLeave() by acquiring 'safeMode.this' lock and here it is asking for 
the DataNodeManger#getNumLiveDataNodes by trying to acquire 'datanodeMap' lock.
- On the other side, DN heartbeat comes and DatanodeManager#handleHeartbeat() 
has acquired 'datanodeMap' lock and calling namesystem#isInSafeMode(), which 
inturn trying to acquire 'safeModeInfo.this' lock

> Deadeadlock found in NN between SafeMode#canLeave and 
> DatanodeManager#handleHeartbeat
> -------------------------------------------------------------------------------------
>
>                 Key: HDFS-5832
>                 URL: https://issues.apache.org/jira/browse/HDFS-5832
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 3.0.0
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>            Priority: Blocker
>         Attachments: HDFS-5832.patch, jcarder_nn_deadlock.gif
>
>
> Found the deadlock during the Namenode startup. Attached jcarder report which 
> shows the cycles about the deadlock situation.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to