hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Varun Saxena (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-2946) Deadlock in ZKRMStateStore
Date Wed, 10 Dec 2014 17:50:12 GMT

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

Varun Saxena commented on YARN-2946:
------------------------------------

[~rohithsharma], I think first approach suggested by you should resolve the issue.
Below method should not be synchronized.

{code}
 public synchronized void updateFencedState() {
    this.stateMachine.doTransition(RMStateStoreEventType.FENCED,
         new RMStateStoreEvent(RMStateStoreEventType.FENCED));
  }
{code}

Here, {{synchronized}} is unnecessary and leads to deadlock.

> Deadlock in ZKRMStateStore
> --------------------------
>
>                 Key: YARN-2946
>                 URL: https://issues.apache.org/jira/browse/YARN-2946
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager
>    Affects Versions: 2.6.0
>            Reporter: Rohith
>            Assignee: Rohith
>
> Found one deadlock in ZKRMStateStore.
> # Initial stage zkClient is null because of zk disconnected event.
> # When ZKRMstatestore#runWithCheck()  wait(zkSessionTimeout) for zkClient to re establish
zookeeper connection either via synconnected or expired event, it is highly possible that
any other thred can obtain lock on {{ZKRMStateStore.this}} from state machine transition events.
This cause Deadlock in ZKRMStateStore.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message