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

Todd Lipcon commented on HADOOP-9183:
-------------------------------------

I think this patch re-introduces a race. If I add the following sleep statement:
{code}
     ZooKeeper zk = new ZooKeeper(zkHostPort, zkSessionTimeout, watcher);
+    try {
+      Thread.sleep(1000);
+    } catch (InterruptedException e) {
+      Thread.currentThread().interrupt();
+    }
     watcher.setZooKeeperRef(zk);
{code}
Then the tests all fail.

We need the watcher to block any "forwarding" until the zk reference has been 
set.
                
> Potential deadlock in ActiveStandbyElector
> ------------------------------------------
>
>                 Key: HADOOP-9183
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9183
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: ha
>    Affects Versions: 2.0.2-alpha
>            Reporter: Tom White
>            Assignee: Tom White
>         Attachments: 2_jcarder_result_1.png, 3_jcarder_result_0.png, 
> HADOOP-9183.patch, HADOOP-9183.patch
>
>
> A jcarder run found a potential deadlock in the locking of 
> ActiveStandbyElector and ActiveStandbyElector.WatcherWithClientRef. No 
> deadlock has been seen in practice, this is just a theoretical possibility at 
> the moment.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to