qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carl Trieloff <cctriel...@redhat.com>
Subject Re: C++ Broker: segfault in TopicExchange::isBound()
Date Tue, 30 Jun 2009 20:43:21 GMT

Rob,

are you able to do a

'thread apply all bt'

on the core. That will allow us to reason through your theory with you

Carl.


rspringer@mail.etinternational.com wrote:
> All,
> We've been using Qpid M4 and 0.5 internally, both with C++, and have been
> seeing occasional segfaults within the broker.  They all seem to occur
> inside TopicExchange::isBound() (the one with 3 parameters, not 2).
>
> Looking at the access patterns in this function, and judging by the
> core dumps, it appears that multiple threads may access and modify
> the class member "bindings" simultaneously, which seems like it
> has the potential to cause a segfault.
>
> Since this is a race condition (if we're right), it's hard to
> say for sure that the problem has been resolved, but since doing
> the below, we've not had a segfault (roughly 5 hours so far,
> rather than every 2-3 hours or so).
>  - We added locks to all accesses of bindings throughout the
>    file.  I believe the new ones were limited to isBound.
>  - This may not be necessary at all, but to be safe (while
>    we were investigating the problem), we changed all lock
>    types from RWlock::ScopedLocks to Mutex::ScopedLocks, to avoid
>    being tripped up by pthread (read/write) mutex semantics.
>
> We wanted to get the opinion of the experienced Qpid developers
> on this list before opening a bug, but again, so far it seems to
> be much more stable (we're hammering on Session::exchangeBound()
> in our testing, which may be why we're seeing it in the first place).
>
> I'm not sure if the other exchange types have the same problem or not.
>
> Thanks!
> -Rob
>
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>   


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Mime
View raw message