You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Damien Diederen (Jira)" <ji...@apache.org> on 2021/01/06 10:58:00 UTC

[jira] [Commented] (ZOOKEEPER-3192) zoo_multi/zoo_amulti crash

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-3192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17259604#comment-17259604 ] 

Damien Diederen commented on ZOOKEEPER-3192:
--------------------------------------------

Hi [~wangjiandtc],

Thank you for the report.  This is a Windows-only issue, so I am downgrading this from blocker for now.  A patch would be welcome, in case you feel like contributing one!

> zoo_multi/zoo_amulti crash
> --------------------------
>
>                 Key: ZOOKEEPER-3192
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3192
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.4.13
>         Environment: VS2013 Building (/MD)
>            Reporter: Jian Wang
>            Priority: Blocker
>
> In the zoo_amulti function (zookeeper.c) , it seems an initialization problem.
> {code:java}
> struct RequestHeader h = { STRUCT_INITIALIZER(xid, get_xid()), STRUCT_INITIALIZER(type, ZOO_MULTI_OP) };
> struct MultiHeader mh = { STRUCT_INITIALIZER(type, -1), STRUCT_INITIALIZER(done, 1), STRUCT_INITIALIZER(err, -1) };
> struct oarchive *oa = create_buffer_oarchive();
> completion_head_t clist = { 0 };
> {code}
> variable "clist" 's member cond and lock are not initialized correctly. They should be initialized by pthread_cond_init and pthread_mutex_init. Otherwise zoo_amulti would crash when queue_completion was called witch calls pthread_cond_boardcast using clist->cond



--
This message was sent by Atlassian Jira
(v8.3.4#803005)