You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Patrick Hunt (JIRA)" <ji...@apache.org> on 2008/08/11 20:36:45 UTC
[jira] Updated: (ZOOKEEPER-58) Race condition on ClientCnxn.java
[ https://issues.apache.org/jira/browse/ZOOKEEPER-58?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Hunt updated ZOOKEEPER-58:
----------------------------------
Fix Version/s: 3.0.0
> Race condition on ClientCnxn.java
> ---------------------------------
>
> Key: ZOOKEEPER-58
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-58
> Project: Zookeeper
> Issue Type: Bug
> Components: java client
> Reporter: Flavio Paiva Junqueira
> Assignee: Benjamin Reed
> Fix For: 3.0.0
>
> Attachments: ZOOKEEPER-58.patch
>
>
> There is a race condition involving the ByteByffer incomingBuffer, a field of ClientCnxn.SendThread. SendThread reads a packet in two steps: first it reads the length of the packet, followed by a read of the packet itself. Each of these steps corresponds to a call to doIO() from the main loop of run(). If there is an exception or the session times out, then it may leave incomingBuffer in an inconsistent state.
> The attached patch adds code to reset incomingBuffer upon a call to SendThread.cleanup(). This method is called upon an exception on run().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.