[jira] Updated: (ZOOKEEPER-888) c-client / zkpython: Double free corruption on node watcher

2010-10-19 Thread Henry Robinson (JIRA)

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

Henry Robinson updated ZOOKEEPER-888:
-

Resolution: Fixed
Status: Resolved  (was: Patch Available)

> c-client / zkpython: Double free corruption on node watcher
> ---
>
> Key: ZOOKEEPER-888
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-888
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client, contrib-bindings
>Affects Versions: 3.3.1
>Reporter: Lukas
>Assignee: Lukas
>Priority: Critical
> Fix For: 3.3.2, 3.4.0
>
> Attachments: resume-segfault.py, ZOOKEEPER-888-3.3.patch, 
> ZOOKEEPER-888.patch
>
>
> the c-client / zkpython wrapper invokes already freed watcher callback
> steps to reproduce:
>   0. start a zookeper server on your machine
>   1. run the attached python script
>   2. suspend the zookeeper server process (e.g. using `pkill -STOP -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
>   3. wait until the connection and the node observer fired with a session 
> event
>   4. resume the zookeeper server process  (e.g. using `pkill -CONT -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
> -> the client tries to dispatch the node observer function again, but it was 
> already freed -> double free corruption

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



[jira] Updated: (ZOOKEEPER-888) c-client / zkpython: Double free corruption on node watcher

2010-10-19 Thread Henry Robinson (JIRA)

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

Henry Robinson updated ZOOKEEPER-888:
-

Hadoop Flags: [Reviewed]

I just committed this to origin/branch-3.3 and origin/trunk. 

Thanks both!

> c-client / zkpython: Double free corruption on node watcher
> ---
>
> Key: ZOOKEEPER-888
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-888
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client, contrib-bindings
>Affects Versions: 3.3.1
>Reporter: Lukas
>Assignee: Lukas
>Priority: Critical
> Fix For: 3.3.2, 3.4.0
>
> Attachments: resume-segfault.py, ZOOKEEPER-888-3.3.patch, 
> ZOOKEEPER-888.patch
>
>
> the c-client / zkpython wrapper invokes already freed watcher callback
> steps to reproduce:
>   0. start a zookeper server on your machine
>   1. run the attached python script
>   2. suspend the zookeeper server process (e.g. using `pkill -STOP -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
>   3. wait until the connection and the node observer fired with a session 
> event
>   4. resume the zookeeper server process  (e.g. using `pkill -CONT -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
> -> the client tries to dispatch the node observer function again, but it was 
> already freed -> double free corruption

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



[jira] Updated: (ZOOKEEPER-888) c-client / zkpython: Double free corruption on node watcher

2010-10-18 Thread Austin Shoemaker (JIRA)

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

Austin Shoemaker updated ZOOKEEPER-888:
---

Attachment: ZOOKEEPER-888-3.3.patch

Patch based on the 3.3 branch attached (ZOOKEEPER-888-3.3.patch). Verified that 
unit tests pass with the changes, including the new watcher_test.

> c-client / zkpython: Double free corruption on node watcher
> ---
>
> Key: ZOOKEEPER-888
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-888
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client, contrib-bindings
>Affects Versions: 3.3.1
>Reporter: Lukas
>Assignee: Lukas
>Priority: Critical
> Fix For: 3.3.2, 3.4.0
>
> Attachments: resume-segfault.py, ZOOKEEPER-888-3.3.patch, 
> ZOOKEEPER-888.patch
>
>
> the c-client / zkpython wrapper invokes already freed watcher callback
> steps to reproduce:
>   0. start a zookeper server on your machine
>   1. run the attached python script
>   2. suspend the zookeeper server process (e.g. using `pkill -STOP -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
>   3. wait until the connection and the node observer fired with a session 
> event
>   4. resume the zookeeper server process  (e.g. using `pkill -CONT -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
> -> the client tries to dispatch the node observer function again, but it was 
> already freed -> double free corruption

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



[jira] Updated: (ZOOKEEPER-888) c-client / zkpython: Double free corruption on node watcher

2010-10-14 Thread Patrick Hunt (JIRA)

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

Patrick Hunt updated ZOOKEEPER-888:
---

Status: Patch Available  (was: Open)

> c-client / zkpython: Double free corruption on node watcher
> ---
>
> Key: ZOOKEEPER-888
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-888
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client, contrib-bindings
>Affects Versions: 3.3.1
>Reporter: Lukas
>Assignee: Lukas
>Priority: Critical
> Fix For: 3.3.2, 3.4.0
>
> Attachments: resume-segfault.py, ZOOKEEPER-888.patch
>
>
> the c-client / zkpython wrapper invokes already freed watcher callback
> steps to reproduce:
>   0. start a zookeper server on your machine
>   1. run the attached python script
>   2. suspend the zookeeper server process (e.g. using `pkill -STOP -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
>   3. wait until the connection and the node observer fired with a session 
> event
>   4. resume the zookeeper server process  (e.g. using `pkill -CONT -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
> -> the client tries to dispatch the node observer function again, but it was 
> already freed -> double free corruption

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



[jira] Updated: (ZOOKEEPER-888) c-client / zkpython: Double free corruption on node watcher

2010-10-14 Thread Austin Shoemaker (JIRA)

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

Austin Shoemaker updated ZOOKEEPER-888:
---

Attachment: ZOOKEEPER-888.patch

Updated ZOOKEEPER-888.patch with the following changes:

- Fixed zookeeper.is_unrecoverable to return the correct value, it was 
returning false in all cases.

- Added watcher_test.py to cover the issue this patch fixes. Verified that it 
crashes before patching and succeeds afterward.


> c-client / zkpython: Double free corruption on node watcher
> ---
>
> Key: ZOOKEEPER-888
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-888
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client, contrib-bindings
>Affects Versions: 3.3.1
>Reporter: Lukas
>Priority: Critical
> Fix For: 3.3.2, 3.4.0
>
> Attachments: resume-segfault.py, ZOOKEEPER-888.patch
>
>
> the c-client / zkpython wrapper invokes already freed watcher callback
> steps to reproduce:
>   0. start a zookeper server on your machine
>   1. run the attached python script
>   2. suspend the zookeeper server process (e.g. using `pkill -STOP -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
>   3. wait until the connection and the node observer fired with a session 
> event
>   4. resume the zookeeper server process  (e.g. using `pkill -CONT -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
> -> the client tries to dispatch the node observer function again, but it was 
> already freed -> double free corruption

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



[jira] Updated: (ZOOKEEPER-888) c-client / zkpython: Double free corruption on node watcher

2010-10-14 Thread Austin Shoemaker (JIRA)

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

Austin Shoemaker updated ZOOKEEPER-888:
---

Status: Open  (was: Patch Available)

> c-client / zkpython: Double free corruption on node watcher
> ---
>
> Key: ZOOKEEPER-888
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-888
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client, contrib-bindings
>Affects Versions: 3.3.1
>Reporter: Lukas
>Priority: Critical
> Fix For: 3.3.2, 3.4.0
>
> Attachments: resume-segfault.py
>
>
> the c-client / zkpython wrapper invokes already freed watcher callback
> steps to reproduce:
>   0. start a zookeper server on your machine
>   1. run the attached python script
>   2. suspend the zookeeper server process (e.g. using `pkill -STOP -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
>   3. wait until the connection and the node observer fired with a session 
> event
>   4. resume the zookeeper server process  (e.g. using `pkill -CONT -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
> -> the client tries to dispatch the node observer function again, but it was 
> already freed -> double free corruption

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



[jira] Updated: (ZOOKEEPER-888) c-client / zkpython: Double free corruption on node watcher

2010-10-14 Thread Austin Shoemaker (JIRA)

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

Austin Shoemaker updated ZOOKEEPER-888:
---

Attachment: (was: ZOOKEEPER-888.patch)

> c-client / zkpython: Double free corruption on node watcher
> ---
>
> Key: ZOOKEEPER-888
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-888
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client, contrib-bindings
>Affects Versions: 3.3.1
>Reporter: Lukas
>Priority: Critical
> Fix For: 3.3.2, 3.4.0
>
> Attachments: resume-segfault.py
>
>
> the c-client / zkpython wrapper invokes already freed watcher callback
> steps to reproduce:
>   0. start a zookeper server on your machine
>   1. run the attached python script
>   2. suspend the zookeeper server process (e.g. using `pkill -STOP -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
>   3. wait until the connection and the node observer fired with a session 
> event
>   4. resume the zookeeper server process  (e.g. using `pkill -CONT -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
> -> the client tries to dispatch the node observer function again, but it was 
> already freed -> double free corruption

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



[jira] Updated: (ZOOKEEPER-888) c-client / zkpython: Double free corruption on node watcher

2010-10-14 Thread Henry Robinson (JIRA)

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

Henry Robinson updated ZOOKEEPER-888:
-


The patch looks good to me - thanks! 

Could you add a test case that verifies the correct behaviour, if possible? (I 
appreciate it can be hard to fake unrecoverable session errors). We keep 
circling around the correct behaviour for this code block, and I'd like to 
capture it in a test suite.

> c-client / zkpython: Double free corruption on node watcher
> ---
>
> Key: ZOOKEEPER-888
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-888
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client, contrib-bindings
>Affects Versions: 3.3.1
>Reporter: Lukas
>Priority: Critical
> Fix For: 3.3.2, 3.4.0
>
> Attachments: resume-segfault.py, ZOOKEEPER-888.patch
>
>
> the c-client / zkpython wrapper invokes already freed watcher callback
> steps to reproduce:
>   0. start a zookeper server on your machine
>   1. run the attached python script
>   2. suspend the zookeeper server process (e.g. using `pkill -STOP -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
>   3. wait until the connection and the node observer fired with a session 
> event
>   4. resume the zookeeper server process  (e.g. using `pkill -CONT -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
> -> the client tries to dispatch the node observer function again, but it was 
> already freed -> double free corruption

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



[jira] Updated: (ZOOKEEPER-888) c-client / zkpython: Double free corruption on node watcher

2010-10-09 Thread Austin Shoemaker (JIRA)

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

Austin Shoemaker updated ZOOKEEPER-888:
---

Attachment: ZOOKEEPER-888.patch

Improved patch attached. Before, watcher_dispatch would unconditionally free 
non-global watcher objects.

Any number of recoverable session state change events may be sent to the 
watcher. This change frees the watcher only on the last callback- a data change 
event or unrecoverable session state change.


> c-client / zkpython: Double free corruption on node watcher
> ---
>
> Key: ZOOKEEPER-888
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-888
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client, contrib-bindings
>Affects Versions: 3.3.1
>Reporter: Lukas
>Priority: Critical
> Fix For: 3.3.2, 3.4.0
>
> Attachments: resume-segfault.py, ZOOKEEPER-888.patch
>
>
> the c-client / zkpython wrapper invokes already freed watcher callback
> steps to reproduce:
>   0. start a zookeper server on your machine
>   1. run the attached python script
>   2. suspend the zookeeper server process (e.g. using `pkill -STOP -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
>   3. wait until the connection and the node observer fired with a session 
> event
>   4. resume the zookeeper server process  (e.g. using `pkill -CONT -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
> -> the client tries to dispatch the node observer function again, but it was 
> already freed -> double free corruption

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



[jira] Updated: (ZOOKEEPER-888) c-client / zkpython: Double free corruption on node watcher

2010-10-09 Thread Austin Shoemaker (JIRA)

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

Austin Shoemaker updated ZOOKEEPER-888:
---

Attachment: (was: ZOOKEEPER-888.patch)

> c-client / zkpython: Double free corruption on node watcher
> ---
>
> Key: ZOOKEEPER-888
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-888
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client, contrib-bindings
>Affects Versions: 3.3.1
>Reporter: Lukas
>Priority: Critical
> Fix For: 3.3.2, 3.4.0
>
> Attachments: resume-segfault.py
>
>
> the c-client / zkpython wrapper invokes already freed watcher callback
> steps to reproduce:
>   0. start a zookeper server on your machine
>   1. run the attached python script
>   2. suspend the zookeeper server process (e.g. using `pkill -STOP -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
>   3. wait until the connection and the node observer fired with a session 
> event
>   4. resume the zookeeper server process  (e.g. using `pkill -CONT -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
> -> the client tries to dispatch the node observer function again, but it was 
> already freed -> double free corruption

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



[jira] Updated: (ZOOKEEPER-888) c-client / zkpython: Double free corruption on node watcher

2010-10-07 Thread Austin Shoemaker (JIRA)

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

Austin Shoemaker updated ZOOKEEPER-888:
---

Attachment: ZOOKEEPER-888.patch

Path that prevents freeing a watcher in response to a session event, per the 
feedback in ZOOKEEPER-890.

> c-client / zkpython: Double free corruption on node watcher
> ---
>
> Key: ZOOKEEPER-888
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-888
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client, contrib-bindings
>Affects Versions: 3.3.1
>Reporter: Lukas
>Priority: Critical
> Fix For: 3.3.2, 3.4.0
>
> Attachments: resume-segfault.py, ZOOKEEPER-888.patch
>
>
> the c-client / zkpython wrapper invokes already freed watcher callback
> steps to reproduce:
>   0. start a zookeper server on your machine
>   1. run the attached python script
>   2. suspend the zookeeper server process (e.g. using `pkill -STOP -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
>   3. wait until the connection and the node observer fired with a session 
> event
>   4. resume the zookeeper server process  (e.g. using `pkill -CONT -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
> -> the client tries to dispatch the node observer function again, but it was 
> already freed -> double free corruption

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



[jira] Updated: (ZOOKEEPER-888) c-client / zkpython: Double free corruption on node watcher

2010-10-06 Thread Patrick Hunt (JIRA)

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

Patrick Hunt updated ZOOKEEPER-888:
---

Fix Version/s: 3.4.0
   3.3.2

Borderline blocker, Henry any insight on this? Something that can be addressed 
for 3.3.2?

> c-client / zkpython: Double free corruption on node watcher
> ---
>
> Key: ZOOKEEPER-888
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-888
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client, contrib-bindings
>Affects Versions: 3.3.1
>Reporter: Lukas
>Priority: Critical
> Fix For: 3.3.2, 3.4.0
>
> Attachments: resume-segfault.py
>
>
> the c-client / zkpython wrapper invokes already freed watcher callback
> steps to reproduce:
>   0. start a zookeper server on your machine
>   1. run the attached python script
>   2. suspend the zookeeper server process (e.g. using `pkill -STOP -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
>   3. wait until the connection and the node observer fired with a session 
> event
>   4. resume the zookeeper server process  (e.g. using `pkill -CONT -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
> -> the client tries to dispatch the node observer function again, but it was 
> already freed -> double free corruption

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



[jira] Updated: (ZOOKEEPER-888) c-client / zkpython: Double free corruption on node watcher

2010-10-06 Thread Lukas (JIRA)

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

Lukas updated ZOOKEEPER-888:


Attachment: resume-segfault.py

Example code for triggering the bug

> c-client / zkpython: Double free corruption on node watcher
> ---
>
> Key: ZOOKEEPER-888
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-888
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client, contrib-bindings
>Affects Versions: 3.3.1
>Reporter: Lukas
>Priority: Critical
> Attachments: resume-segfault.py
>
>
> the c-client / zkpython wrapper invokes already freed watcher callback
> steps to reproduce:
>   0. start a zookeper server on your machine
>   1. run the attached python script
>   2. suspend the zookeeper server process (e.g. using `pkill -STOP -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
>   3. wait until the connection and the node observer fired with a session 
> event
>   4. resume the zookeeper server process  (e.g. using `pkill -CONT -f 
> org.apache.zookeeper.server.quorum.QuorumPeerMain` )
> -> the client tries to dispatch the node observer function again, but it was 
> already freed -> double free corruption

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