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

Nanda kumar commented on HDDS-661:
----------------------------------

[~hanishakoneru], thanks for working on this.
I'm ok with having this as a temporary fix, it is easy for someone to get into 
deadlock when {{VolumeSet}} lock is exposed outside of {{VolumeSet}} class. We 
should change the code in such a way that the lock is not exposed and the data 
structure inside {{VolumeSet}} is also protected by the lock.

> When a volume fails in datanode, VersionEndpointTask#call ends up in dead 
> lock.
> -------------------------------------------------------------------------------
>
>                 Key: HDDS-661
>                 URL: https://issues.apache.org/jira/browse/HDDS-661
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: Ozone Datanode
>            Reporter: Nanda kumar
>            Assignee: Hanisha Koneru
>            Priority: Major
>         Attachments: HDDS-661.001.patch
>
>
> When a volume fails in datanode, the call to {{VersionEndpointTask#call}} 
> ends up in dead-lock.
> {code:java}
> org.apache.hadoop.ozone.container.common.states.endpoint.VersionEndpointTask.call(VersionEndpointTask.java:78)
>     --> we acquire VolumeSet read lock here.
> org.apache.hadoop.ozone.container.common.states.endpoint.VersionEndpointTask.call(VersionEndpointTask.java:93)
>       
> org.apache.hadoop.ozone.container.common.volume.VolumeSet.failVolume(VolumeSet.java:276)
>               
> org.apache.hadoop.ozone.container.common.volume.VolumeSet.writeLock(VolumeSet.java:210)
>                     ---> we wait for VolumeSet write lock.
> {code}
> Since this thread already holds the read lock, it cannot get the write lock 
> and ends up in dead-lock.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to