[ https://issues.apache.org/jira/browse/ZOOKEEPER-890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920619#action_12920619 ]
Patrick Hunt commented on ZOOKEEPER-890: ---------------------------------------- Should this issue be closed then? (also sounds like 2 other issues should be opened which were detailed in the comments - docs and python) > C client invokes watcher callbacks multiple times > ------------------------------------------------- > > Key: ZOOKEEPER-890 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-890 > Project: Zookeeper > Issue Type: Bug > Components: c client > Affects Versions: 3.3.1 > Environment: Mac OS X 10.6.5 > Reporter: Austin Shoemaker > Priority: Critical > Attachments: watcher_twice.c, ZOOKEEPER-890.patch > > > Code using the C client assumes that watcher callbacks are called exactly > once. If the watcher is called more than once, the process will likely > overwrite freed memory and/or crash. > collect_session_watchers (zk_hashtable.c) gathers watchers from > active_node_watchers, active_exist_watchers, and active_child_watchers > without removing them. This results in watchers being invoked more than once. > Test code is attached that reproduces the bug, along with a proposed patch. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.