You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Venkat B <bv...@gmail.com> on 2017/11/22 04:30:44 UTC

Qpid Proton 0.18.1 - libuv.c

Good day,

In the proactor implementation,  uv_mutex_lock is called without first
initializing the mutex with uv_mutex_init.  This works fine on linux but on
Mac OS X, the uv_mutex_lock fails & calls abort().
Below patch fixes the issue, I will appreciate if same can be applied.

Regards,
Venkat

diff -ru qpid-proton-0.18.1_new/proton-c/src/proactor/libuv.c
qpid-proton-0.18.1/proton-c/src/proactor/libuv.c
--- qpid-proton-0.18.1_new/proton-c/src/proactor/libuv.c    2017-10-31
18:16:02.000000000 +0530
+++ qpid-proton-0.18.1/proton-c/src/proactor/libuv.c    2017-11-20
13:08:32.000000000 +0530
@@ -305,6 +305,7 @@
   work_init(&pc->work, p,  T_CONNECTION);
   pc->next = pconnection_unqueued;
   pc->write.data = &pc->work;
+  uv_mutex_init(&pc->lock);
   if (server) {
     pn_transport_set_server(pc->driver.transport);
   }

Re: Qpid Proton 0.18.1 - libuv.c

Posted by Venkat B <bv...@gmail.com>.
Good day Roddie,

Thanks for your reply & the pointers to the information.

Regards,
Venkat

On Thu, Nov 23, 2017 at 6:42 AM, Roddie Kieley <rk...@gmail.com> wrote:

> Hi Venkat, there are indeed issues on Mac OS X with the mutex
> initialization and
> destruction as you indicate. A pull request with the required fixes,
> including the
> update below is located here [1] which was generated from the work on
> PROTON-522 and commented upon at [2].
>
> While the changes have not made it to master yet, there is now an issue
> logged,
> PROTON-1684, documenting the problem at [3] with a target fix version of
> 0.19.0.
>
>
> Roddie
> ---
> [1] -
> https://github.com/apache/qpid-proton/pull/129/commits/
> 63e2a052e5ebf9b29ea64f30f952fd56adb9b9d1#diff-
> 68220cdc99750102b47b42d421079707
> [2] -
> https://issues.apache.org/jira/browse/PROTON-522?
> focusedCommentId=16171590&page=com.atlassian.jira.
> plugin.system.issuetabpanels:comment-tabpanel#comment-16171590
> [3] - https://issues.apache.org/jira/browse/PROTON-1694
>
> On Wed, Nov 22, 2017 at 1:00 AM, Venkat B <bv...@gmail.com> wrote:
>
> > Good day,
> >
> > In the proactor implementation,  uv_mutex_lock is called without first
> > initializing the mutex with uv_mutex_init.  This works fine on linux but
> on
> > Mac OS X, the uv_mutex_lock fails & calls abort().
> > Below patch fixes the issue, I will appreciate if same can be applied.
> >
> > Regards,
> > Venkat
> >
> > diff -ru qpid-proton-0.18.1_new/proton-c/src/proactor/libuv.c
> > qpid-proton-0.18.1/proton-c/src/proactor/libuv.c
> > --- qpid-proton-0.18.1_new/proton-c/src/proactor/libuv.c    2017-10-31
> > 18:16:02.000000000 +0530
> > +++ qpid-proton-0.18.1/proton-c/src/proactor/libuv.c    2017-11-20
> > 13:08:32.000000000 +0530
> > @@ -305,6 +305,7 @@
> >    work_init(&pc->work, p,  T_CONNECTION);
> >    pc->next = pconnection_unqueued;
> >    pc->write.data = &pc->work;
> > +  uv_mutex_init(&pc->lock);
> >    if (server) {
> >      pn_transport_set_server(pc->driver.transport);
> >    }
> >
>

Re: Qpid Proton 0.18.1 - libuv.c

Posted by Roddie Kieley <rk...@gmail.com>.
Hi Venkat, there are indeed issues on Mac OS X with the mutex
initialization and
destruction as you indicate. A pull request with the required fixes,
including the
update below is located here [1] which was generated from the work on
PROTON-522 and commented upon at [2].

While the changes have not made it to master yet, there is now an issue
logged,
PROTON-1684, documenting the problem at [3] with a target fix version of
0.19.0.


Roddie
---
[1] -
https://github.com/apache/qpid-proton/pull/129/commits/63e2a052e5ebf9b29ea64f30f952fd56adb9b9d1#diff-68220cdc99750102b47b42d421079707
[2] -
https://issues.apache.org/jira/browse/PROTON-522?focusedCommentId=16171590&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16171590
[3] - https://issues.apache.org/jira/browse/PROTON-1694

On Wed, Nov 22, 2017 at 1:00 AM, Venkat B <bv...@gmail.com> wrote:

> Good day,
>
> In the proactor implementation,  uv_mutex_lock is called without first
> initializing the mutex with uv_mutex_init.  This works fine on linux but on
> Mac OS X, the uv_mutex_lock fails & calls abort().
> Below patch fixes the issue, I will appreciate if same can be applied.
>
> Regards,
> Venkat
>
> diff -ru qpid-proton-0.18.1_new/proton-c/src/proactor/libuv.c
> qpid-proton-0.18.1/proton-c/src/proactor/libuv.c
> --- qpid-proton-0.18.1_new/proton-c/src/proactor/libuv.c    2017-10-31
> 18:16:02.000000000 +0530
> +++ qpid-proton-0.18.1/proton-c/src/proactor/libuv.c    2017-11-20
> 13:08:32.000000000 +0530
> @@ -305,6 +305,7 @@
>    work_init(&pc->work, p,  T_CONNECTION);
>    pc->next = pconnection_unqueued;
>    pc->write.data = &pc->work;
> +  uv_mutex_init(&pc->lock);
>    if (server) {
>      pn_transport_set_server(pc->driver.transport);
>    }
>