[jira] Updated: (ZOOKEEPER-63) Race condition in client close() operation

2008-08-01 Thread Benjamin Reed (JIRA)

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

Benjamin Reed updated ZOOKEEPER-63:
---

Attachment: patch_ZOOKEEPER-63.patch

I've fixed the patch to not duplicate the logic in submitRequest

 Race condition in client close() operation
 --

 Key: ZOOKEEPER-63
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-63
 Project: Zookeeper
  Issue Type: Bug
  Components: java client
Reporter: Patrick Hunt
Assignee: james strachan
 Attachments: patch_ZOOKEEPER-63.patch, patch_ZOOKEEPER-63.patch


 There is a race condition in the java close operation on ZooKeeper.java.
 Client is sending a disconnect request to the server. Server will close any 
 open connections with the client when it receives this. If the client has not 
 yet shutdown it's subthreads (event/send threads for example) these threads 
 may consider the condition an error. We see this alot in the tests where the 
 clients output error logs because they are unaware that a disconnection has 
 been requested by the client.
 Ben mentioned: perhaps we just have to change state to closed (on client) 
 before sending disconnect request.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-63) Race condition in client close() operation

2008-08-01 Thread Benjamin Reed (JIRA)

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

Benjamin Reed updated ZOOKEEPER-63:
---

Status: Patch Available  (was: Open)

 Race condition in client close() operation
 --

 Key: ZOOKEEPER-63
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-63
 Project: Zookeeper
  Issue Type: Bug
  Components: java client
Reporter: Patrick Hunt
Assignee: james strachan
 Attachments: patch_ZOOKEEPER-63.patch


 There is a race condition in the java close operation on ZooKeeper.java.
 Client is sending a disconnect request to the server. Server will close any 
 open connections with the client when it receives this. If the client has not 
 yet shutdown it's subthreads (event/send threads for example) these threads 
 may consider the condition an error. We see this alot in the tests where the 
 clients output error logs because they are unaware that a disconnection has 
 been requested by the client.
 Ben mentioned: perhaps we just have to change state to closed (on client) 
 before sending disconnect request.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-63) Race condition in client close() operation

2008-08-01 Thread Patrick Hunt (JIRA)

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

Patrick Hunt updated ZOOKEEPER-63:
--

Status: Open  (was: Patch Available)

-1 on the patch, still have the stated unresolved issues with this change:

1) there is still the stated race condition
2) what is causing the underlying hang? this should not be happening and needs 
to be addressed directly, may even be related to item 1

3) if the timeout is reached a warning should be issued in the log

I suspect we should split this patch out to it's own jira and make it blocked 
by this, perhaps that would make it more clear.


 Race condition in client close() operation
 --

 Key: ZOOKEEPER-63
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-63
 Project: Zookeeper
  Issue Type: Bug
  Components: java client
Reporter: Patrick Hunt
Assignee: james strachan
 Attachments: patch_ZOOKEEPER-63.patch


 There is a race condition in the java close operation on ZooKeeper.java.
 Client is sending a disconnect request to the server. Server will close any 
 open connections with the client when it receives this. If the client has not 
 yet shutdown it's subthreads (event/send threads for example) these threads 
 may consider the condition an error. We see this alot in the tests where the 
 clients output error logs because they are unaware that a disconnection has 
 been requested by the client.
 Ben mentioned: perhaps we just have to change state to closed (on client) 
 before sending disconnect request.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-63) Race condition in client close() operation

2008-07-23 Thread james strachan (JIRA)

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

james strachan updated ZOOKEEPER-63:


Attachment: patch_ZOOKEEPER-63.patch

This patch avoids the close() method blocking forever. It waits just once, up 
to the closeTimeout so if the socket is blocked or some other strangeness is 
going on, the calling thread will only wait up to the timeout (which defaults 
to 2 seconds).

BTW this patch fixes the hang I was having in the test case to ZOOKEEPER-78

 Race condition in client close() operation
 --

 Key: ZOOKEEPER-63
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-63
 Project: Zookeeper
  Issue Type: Bug
  Components: java client
Reporter: Patrick Hunt
Assignee: Benjamin Reed
 Attachments: patch_ZOOKEEPER-63.patch


 There is a race condition in the java close operation on ZooKeeper.java.
 Client is sending a disconnect request to the server. Server will close any 
 open connections with the client when it receives this. If the client has not 
 yet shutdown it's subthreads (event/send threads for example) these threads 
 may consider the condition an error. We see this alot in the tests where the 
 clients output error logs because they are unaware that a disconnection has 
 been requested by the client.
 Ben mentioned: perhaps we just have to change state to closed (on client) 
 before sending disconnect request.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-63) Race condition in client close() operation

2008-07-23 Thread james strachan (JIRA)

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

james strachan updated ZOOKEEPER-63:


Status: Patch Available  (was: Open)

about to attach a patch

 Race condition in client close() operation
 --

 Key: ZOOKEEPER-63
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-63
 Project: Zookeeper
  Issue Type: Bug
  Components: java client
Reporter: Patrick Hunt
Assignee: Benjamin Reed
 Attachments: patch_ZOOKEEPER-63.patch


 There is a race condition in the java close operation on ZooKeeper.java.
 Client is sending a disconnect request to the server. Server will close any 
 open connections with the client when it receives this. If the client has not 
 yet shutdown it's subthreads (event/send threads for example) these threads 
 may consider the condition an error. We see this alot in the tests where the 
 clients output error logs because they are unaware that a disconnection has 
 been requested by the client.
 Ben mentioned: perhaps we just have to change state to closed (on client) 
 before sending disconnect request.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.