curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Orcun Simsek (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CURATOR-79) InterProcessMutex doesn't clean up after interrupt
Date Tue, 05 Aug 2014 19:04:13 GMT

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

Orcun Simsek edited comment on CURATOR-79 at 8/5/14 7:03 PM:
-------------------------------------------------------------

Sorry about that. I have updated the test above.

The first run throws the interrupted exception. Test passes but data is not cleared.

The second run gets in a deadlock.

We're still hitting this in prod environment quite often.


was (Author: ortschun):
Sorry about that. I have updated the test above.

The first run throws the interrupted exception. Test passes but data is not cleared.

The second run gets in a deadlock.

> InterProcessMutex doesn't clean up after interrupt
> --------------------------------------------------
>
>                 Key: CURATOR-79
>                 URL: https://issues.apache.org/jira/browse/CURATOR-79
>             Project: Apache Curator
>          Issue Type: Bug
>    Affects Versions: 2.0.0-incubating, 2.1.0-incubating, 2.2.0-incubating, 2.3.0
>            Reporter: Orcun Simsek
>            Assignee: Jordan Zimmerman
>
> InterProcessMutex can deadlock if a thread is interrupted during acquire().  Specifically,
CreateBuilderImpl.pathInForeground submits a create request to ZooKeeper, and an InterruptedException
is thrown after the node is created in ZK but before ZK.create returns. ZK.create propagates
a non-KeeperException, so Curator assumes the create has failed, but does not retry, and the
node is now orphaned. At some point in the future, the node becomes the next in the acquisition
sequence, but is not reclaimed as the ZK session has not expired.
> <stack trace attached in comments below>
> Curator should catch the InterruptedException and other non-KeeperExceptions, and delete
the created node before propagating these exceptions.
> (as originally discussed on https://groups.google.com/forum/#!topic/curator-users/9ii5of8SbdQ)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message