You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Chris Richardson <cr...@fourc.eu> on 2016/11/02 19:38:26 UTC

Possible thread sync error in proton/qpid-cpp

Hi,

As per the subject I'm experiencing a crash which I am _reeaasonably_ sure
I've pinpointed to a problem with one of the C/C++ Qpid client libraries.
Of course I could also be doing something goofy in which case I apologise
profusely!

The problem manifests in a number of different ways including a double-free
and stack trace, an error message (when built in debug) reading
proton-c/src/object/object.c:236: pn_object_decref: Assertion
`head->refcount > 0' failed.
and a simple segfault with no further info. I've examined some core dumps
which give some further hints about the problem but I won't include results
here - instead I've tried to distil the problem down to the attached
source. Two things seem to be key - using AMQP1.0 (0-10 is fine) and
creating and closing sessions very fast while sending some message over the
link. I realise this may not be typical usage but it does happen in my
integration testing and causes my tests to crash!

The versions I've tested with are:
qpid-proton-0.9.1-rc1 / qpid-cpp-0-34
qpid-proton-0.14.0 / qpid-cpp-1.35

Compiler: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609

I've been testing against c++ broker 0.34 and 1.35 fairly indiscriminately
on the assumption it's not really relevant to the crash.

Sample code - build with eg:
g++ -g -std=c++11 -o qpid-test main.cxx  /usr/local/lib/libqpidmessaging.so
/usr/local/lib/libqpidtypes.so

Regards

-- 

*Chris Richardson*, System Architect
cr@fourc.eu


*FourC AS, Vestre Rosten 81, Trekanten, NO-7075 Tiller, Norwaywww.fourc.eu
<http://www.fourc.eu/>*

*Follow us on LinkedIn <http://bit.ly/fourcli>, Facebook
<http://bit.ly/fourcfb>, Google+ <http://bit.ly/fourcgp> and Twitter
<http://bit.ly/fourctw>!*

Re: Possible thread sync error in proton/qpid-cpp

Posted by Gordon Sim <gs...@redhat.com>.
On 02/11/16 19:38, Chris Richardson wrote:
> As per the subject I'm experiencing a crash which I am _reeaasonably_
> sure I've pinpointed to a problem with one of the C/C++ Qpid client
> libraries.

I've checked in a couple of fixes that address the issues:

https://issues.apache.org/jira/browse/QPID-7500
https://issues.apache.org/jira/browse/QPID-7501

Thanks again for reporting the issue and for the reproducer!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Possible thread sync error in proton/qpid-cpp

Posted by Gordon Sim <gs...@redhat.com>.
On 02/11/16 19:38, Chris Richardson wrote:
> Hi,
>
> As per the subject I'm experiencing a crash which I am _reeaasonably_
> sure I've pinpointed to a problem with one of the C/C++ Qpid client
> libraries. Of course I could also be doing something goofy in which case
> I apologise profusely!

No, it is indeed a bug, thanks for the reproducer! I'll have a think 
about how best to fix it.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org