You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Mahadev konar (JIRA)" <ji...@apache.org> on 2009/05/09 02:42:45 UTC
[jira] Created: (ZOOKEEPER-396) race condition in zookeeper client
library between zookeeper_close and zoo_synchronous api
race condition in zookeeper client library between zookeeper_close and zoo_synchronous api
------------------------------------------------------------------------------------------
Key: ZOOKEEPER-396
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-396
Project: Zookeeper
Issue Type: Bug
Components: c client
Affects Versions: 3.1.1
Reporter: Mahadev konar
Assignee: Mahadev konar
Priority: Critical
There is a race condition in zoopkeeper client library wherein if the application calls zookeeper_close() and zoo_anysynchronouscall simultaneously, sometimes the zoo_sync api call gets hung waiting for a notification whcih will never come.
We might want to create another bugfix release for this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-396) race condition in zookeeper client
library between zookeeper_close and zoo_synchronous api
Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mahadev konar updated ZOOKEEPER-396:
------------------------------------
Status: Patch Available (was: Open)
> race condition in zookeeper client library between zookeeper_close and zoo_synchronous api
> ------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-396
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-396
> Project: Zookeeper
> Issue Type: Bug
> Components: c client
> Affects Versions: 3.1.1
> Reporter: Mahadev konar
> Assignee: Mahadev konar
> Priority: Critical
> Fix For: 3.2.0
>
> Attachments: test.c, ZOOKEEPER-396.patch
>
>
> There is a race condition in zoopkeeper client library wherein if the application calls zookeeper_close() and zoo_anysynchronouscall simultaneously, sometimes the zoo_sync api call gets hung waiting for a notification whcih will never come.
> We might want to create another bugfix release for this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-396) race condition in zookeeper client
library between zookeeper_close and zoo_synchronous api
Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mahadev konar updated ZOOKEEPER-396:
------------------------------------
Resolution: Fixed
Hadoop Flags: [Reviewed]
Status: Resolved (was: Patch Available)
I just committed this.
> race condition in zookeeper client library between zookeeper_close and zoo_synchronous api
> ------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-396
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-396
> Project: Zookeeper
> Issue Type: Bug
> Components: c client
> Affects Versions: 3.1.1
> Reporter: Mahadev konar
> Assignee: Mahadev konar
> Priority: Critical
> Fix For: 3.2.0
>
> Attachments: test.c, ZOOKEEPER-396.patch
>
>
> There is a race condition in zoopkeeper client library wherein if the application calls zookeeper_close() and zoo_anysynchronouscall simultaneously, sometimes the zoo_sync api call gets hung waiting for a notification whcih will never come.
> We might want to create another bugfix release for this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-396) race condition in zookeeper client
library between zookeeper_close and zoo_synchronous api
Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mahadev konar updated ZOOKEEPER-396:
------------------------------------
Attachment: ZOOKEEPER-396.patch
after some thinking and digging deep it seems that the problem is occuring after we call zookeeper_close and get use the same handle in a seperate thread to get data. Similar to FILE api in libc, the behavior of using the handle after close is called is undefined and might create problems. So, I have just updated the docs in the c code to reflect this in the docs and warn users on not doing this.
> race condition in zookeeper client library between zookeeper_close and zoo_synchronous api
> ------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-396
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-396
> Project: Zookeeper
> Issue Type: Bug
> Components: c client
> Affects Versions: 3.1.1
> Reporter: Mahadev konar
> Assignee: Mahadev konar
> Priority: Critical
> Fix For: 3.2.0
>
> Attachments: test.c, ZOOKEEPER-396.patch
>
>
> There is a race condition in zoopkeeper client library wherein if the application calls zookeeper_close() and zoo_anysynchronouscall simultaneously, sometimes the zoo_sync api call gets hung waiting for a notification whcih will never come.
> We might want to create another bugfix release for this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-396) race condition in zookeeper
client library between zookeeper_close and zoo_synchronous api
Posted by "Benjamin Reed (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716331#action_12716331 ]
Benjamin Reed commented on ZOOKEEPER-396:
-----------------------------------------
+1 looks good.
> race condition in zookeeper client library between zookeeper_close and zoo_synchronous api
> ------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-396
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-396
> Project: Zookeeper
> Issue Type: Bug
> Components: c client
> Affects Versions: 3.1.1
> Reporter: Mahadev konar
> Assignee: Mahadev konar
> Priority: Critical
> Fix For: 3.2.0
>
> Attachments: test.c, ZOOKEEPER-396.patch
>
>
> There is a race condition in zoopkeeper client library wherein if the application calls zookeeper_close() and zoo_anysynchronouscall simultaneously, sometimes the zoo_sync api call gets hung waiting for a notification whcih will never come.
> We might want to create another bugfix release for this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-396) race condition in zookeeper client
library between zookeeper_close and zoo_synchronous api
Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mahadev konar updated ZOOKEEPER-396:
------------------------------------
Fix Version/s: 3.2.0
> race condition in zookeeper client library between zookeeper_close and zoo_synchronous api
> ------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-396
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-396
> Project: Zookeeper
> Issue Type: Bug
> Components: c client
> Affects Versions: 3.1.1
> Reporter: Mahadev konar
> Assignee: Mahadev konar
> Priority: Critical
> Fix For: 3.2.0
>
>
> There is a race condition in zoopkeeper client library wherein if the application calls zookeeper_close() and zoo_anysynchronouscall simultaneously, sometimes the zoo_sync api call gets hung waiting for a notification whcih will never come.
> We might want to create another bugfix release for this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-396) race condition in zookeeper client
library between zookeeper_close and zoo_synchronous api
Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mahadev konar updated ZOOKEEPER-396:
------------------------------------
Attachment: test.c
here is a simple way to reproduce this. Doing an exists in a loop with some other thread closing the zookeeper handle. This test code will hang (sometimes in different places). We might want to have a state called closing in the client wherein we dont allow other operations to proceed as soon as a close() gets called. Also, we need to make sure that the operations that have been called before close do not hang. They should atleast get an error response.
> race condition in zookeeper client library between zookeeper_close and zoo_synchronous api
> ------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-396
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-396
> Project: Zookeeper
> Issue Type: Bug
> Components: c client
> Affects Versions: 3.1.1
> Reporter: Mahadev konar
> Assignee: Mahadev konar
> Priority: Critical
> Fix For: 3.2.0
>
> Attachments: test.c
>
>
> There is a race condition in zoopkeeper client library wherein if the application calls zookeeper_close() and zoo_anysynchronouscall simultaneously, sometimes the zoo_sync api call gets hung waiting for a notification whcih will never come.
> We might want to create another bugfix release for this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-396) race condition in zookeeper
client library between zookeeper_close and zoo_synchronous api
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718517#action_12718517 ]
Hudson commented on ZOOKEEPER-396:
----------------------------------
Integrated in ZooKeeper-trunk #343 (See [http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/343/])
> race condition in zookeeper client library between zookeeper_close and zoo_synchronous api
> ------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-396
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-396
> Project: Zookeeper
> Issue Type: Bug
> Components: c client
> Affects Versions: 3.1.1
> Reporter: Mahadev konar
> Assignee: Mahadev konar
> Priority: Critical
> Fix For: 3.2.0
>
> Attachments: test.c, ZOOKEEPER-396.patch
>
>
> There is a race condition in zoopkeeper client library wherein if the application calls zookeeper_close() and zoo_anysynchronouscall simultaneously, sometimes the zoo_sync api call gets hung waiting for a notification whcih will never come.
> We might want to create another bugfix release for this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.