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] [Updated] (CURATOR-79) InterProcessMutex doesn't clean up after interrupt
Date Wed, 27 Nov 2013 04:29:35 GMT

     [ https://issues.apache.org/jira/browse/CURATOR-79?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Orcun Simsek updated CURATOR-79:
--------------------------------

    Description: 
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.

{code}

{code}

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)


  was:
If the current thread is interrupted while acquiring the InterProcessMutex, a new node for
the lock is created, InterruptException is thrown, and node is not deleted afterwards. Thus
causing a deadlock.

Curator should check the Interrupted state, and do the proper clean up.

This issue was original discussed on: https://groups.google.com/forum/#!topic/curator-users/9ii5of8SbdQ



> 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
>            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.
> {code}
> {code}
> 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.1#6144)

Mime
View raw message