Bug 1120689 - clustered qpids broker segfaults during shutdown in qpid::broker::tryAutoDeleteImpl
Summary: clustered qpids broker segfaults during shutdown in qpid::broker::tryAutoDele...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 2.5
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: messaging-bugs
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-17 12:50 UTC by Pavel Moravec
Modified: 2014-07-17 13:02 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Pavel Moravec 2014-07-17 12:50:43 UTC
Description of problem:
Having a simple topic subscriber connected, an attempt to shutdown a clustered broker might cause broker shutdown


Version-Release number of selected component (if applicable):
0.18-20


How reproducible:
100%


Steps to Reproduce:
qpidd --trace --cluster-name=A &
qpid-receive -a "qmf.default.topic/direct.$(uuidgen); { node: { type: topic }, link: { x-declare: { auto-delete: true, exclusive: true, passive:true } } }" -f &
pkill qpidd


Actual results:
[1]-  Segmentation fault      (core dumped) qpidd --trace --cluster-name=A


Expected results:
No segfault


Additional info:
backtrace:
#0  0x0000000001511178 in ?? ()
#1  0x00007fbfe6c1edcc in qpid::broker::tryAutoDeleteImpl (broker=..., queue=..., connectionId="10.34.1.124:5672-10.34.1.124:38273", userId="anonymous") at qpid/broker/Queue.cpp:1536
#2  0x00007fbfe6c1f128 in qpid::broker::Queue::tryAutoDelete (broker=..., queue=<value optimized out>, connectionId="10.34.1.124:5672-10.34.1.124:38273", userId="anonymous")
    at qpid/broker/Queue.cpp:1573
#3  0x00007fbfe6c5eec0 in qpid::broker::SessionAdapter::QueueHandlerImpl::destroyExclusiveQueues (this=0x7fbfd8001f28) at qpid/broker/SessionAdapter.cpp:228
#4  0x00007fbfe6c5f335 in qpid::broker::SessionAdapter::QueueHandlerImpl::~QueueHandlerImpl (this=0x7fbfd8001f28, __in_chrg=<value optimized out>) at qpid/broker/SessionAdapter.cpp:216
#5  0x00007fbfe6c6d72e in ~SessionAdapter (this=0x7fbfd8001b90, __in_chrg=<value optimized out>) at qpid/broker/SessionAdapter.h:55
#6  qpid::broker::SessionState::~SessionState (this=0x7fbfd8001b90, __in_chrg=<value optimized out>) at qpid/broker/SessionState.cpp:88
#7  0x00007fbfe6c6da29 in qpid::broker::SessionState::~SessionState (this=0x7fbfd8001b90, __in_chrg=<value optimized out>) at qpid/broker/SessionState.cpp:88
#8  0x00007fbfe6c69930 in ~auto_ptr (this=0x7fbfd8002300, __in_chrg=<value optimized out>) at /usr/include/c++/4.4.7/backward/auto_ptr.h:168
#9  qpid::broker::SessionHandler::~SessionHandler (this=0x7fbfd8002300, __in_chrg=<value optimized out>) at qpid/broker/SessionHandler.cpp:42
#10 0x00007fbfe6c699f9 in qpid::broker::SessionHandler::~SessionHandler (this=0x7fbfd8002300, __in_chrg=<value optimized out>) at qpid/broker/SessionHandler.cpp:42
#11 0x00007fbfe6babf6f in checked_delete<qpid::broker::SessionHandler const> (this=0x155c590, __in_chrg=<value optimized out>) at /usr/include/boost/checked_delete.hpp:34
#12 delete_clone<qpid::broker::SessionHandler> (this=0x155c590, __in_chrg=<value optimized out>) at /usr/include/boost/ptr_container/clone_allocator.hpp:56
#13 deallocate_clone<qpid::broker::SessionHandler> (this=0x155c590, __in_chrg=<value optimized out>) at /usr/include/boost/ptr_container/clone_allocator.hpp:74
#14 deallocate_clone (this=0x155c590, __in_chrg=<value optimized out>) at /usr/include/boost/ptr_container/detail/reversible_ptr_container.hpp:126
#15 null_policy_deallocate_clone (this=0x155c590, __in_chrg=<value optimized out>) at /usr/include/boost/ptr_container/detail/reversible_ptr_container.hpp:276
#16 remove<boost::ptr_map_iterator<std::_Rb_tree_iterator<std::pair<unsigned short const, void*> >, unsigned short, qpid::broker::SessionHandler* const> > (this=0x155c590, 
    __in_chrg=<value optimized out>) at /usr/include/boost/ptr_container/detail/reversible_ptr_container.hpp:250
#17 remove<boost::ptr_map_iterator<std::_Rb_tree_iterator<std::pair<unsigned short const, void*> >, unsigned short, qpid::broker::SessionHandler* const> > (this=0x155c590, 
    __in_chrg=<value optimized out>) at /usr/include/boost/ptr_container/detail/reversible_ptr_container.hpp:257
#18 remove_all (this=0x155c590, __in_chrg=<value optimized out>) at /usr/include/boost/ptr_container/detail/reversible_ptr_container.hpp:218
#19 ~reversible_ptr_container (this=0x155c590, __in_chrg=<value optimized out>) at /usr/include/boost/ptr_container/detail/reversible_ptr_container.hpp:465
#20 ~associative_ptr_container (this=0x155c590, __in_chrg=<value optimized out>) at /usr/include/boost/ptr_container/detail/associative_ptr_container.hpp:34
#21 ~ptr_map_adapter_base (this=0x155c590, __in_chrg=<value optimized out>) at /usr/include/boost/ptr_container/ptr_map_adapter.hpp:130
#22 ~ptr_map_adapter (this=0x155c590, __in_chrg=<value optimized out>) at /usr/include/boost/ptr_container/ptr_map_adapter.hpp:388
#23 ~ptr_map (this=0x155c590, __in_chrg=<value optimized out>) at /usr/include/boost/ptr_container/ptr_map.hpp:36
#24 qpid::broker::Connection::~Connection (this=0x155c590, __in_chrg=<value optimized out>) at qpid/broker/Connection.cpp:160
#25 0x00007fbfe6bac5e9 in qpid::broker::Connection::~Connection (this=0x155c590, __in_chrg=<value optimized out>) at qpid/broker/Connection.cpp:160
#26 0x00007fbfe2d44a97 in reset (this=0x155eab0, __in_chrg=<value optimized out>) at /usr/include/c++/4.4.7/backward/auto_ptr.h:242
#27 qpid::cluster::Connection::~Connection (this=0x155eab0, __in_chrg=<value optimized out>) at qpid/cluster/Connection.cpp:192
#28 0x00007fbfe2d45739 in qpid::cluster::Connection::~Connection (this=0x155eab0, __in_chrg=<value optimized out>) at qpid/cluster/Connection.cpp:193
#29 0x00007fbfe2d2171b in release (this=0x150cfb8, __x=0x7fbfd8000e10) at qpid/RefCounted.h:42
#30 intrusive_ptr_release (this=0x150cfb8, __x=0x7fbfd8000e10) at qpid/RefCounted.h:54
#31 ~intrusive_ptr (this=0x150cfb8, __x=0x7fbfd8000e10) at /usr/include/boost/smart_ptr/intrusive_ptr.hpp:101
#32 ~pair (this=0x150cfb8, __x=0x7fbfd8000e10) at /usr/include/c++/4.4.7/bits/stl_pair.h:68
#33 destroy (this=0x150cfb8, __x=0x7fbfd8000e10) at /usr/include/c++/4.4.7/ext/new_allocator.h:115
#34 _M_destroy_node (this=0x150cfb8, __x=0x7fbfd8000e10) at /usr/include/c++/4.4.7/bits/stl_tree.h:383
#35 std::_Rb_tree<qpid::cluster::ConnectionId, std::pair<qpid::cluster::ConnectionId const, boost::intrusive_ptr<qpid::cluster::Connection> >, std::_Select1st<std::pair<qpid::cluster::ConnectionId const, boost::intrusive_ptr<qpid::cluster::Connection> > >, std::less<qpid::cluster::ConnectionId>, std::allocator<std::pair<qpid::cluster::ConnectionId const, boost::intrusive_ptr<qpid::cluster::Connection> > > >::_M_erase (this=0x150cfb8, __x=0x7fbfd8000e10) at /usr/include/c++/4.4.7/bits/stl_tree.h:972
#36 0x00007fbfe2d1cc73 in ~_Rb_tree (this=0x150c640, __in_chrg=<value optimized out>) at /usr/include/c++/4.4.7/bits/stl_tree.h:614
#37 ~map (this=0x150c640, __in_chrg=<value optimized out>) at /usr/include/c++/4.4.7/bits/stl_map.h:87
#38 qpid::cluster::Cluster::~Cluster (this=0x150c640, __in_chrg=<value optimized out>) at qpid/cluster/Cluster.cpp:316
#39 0x00007fbfe2d1d569 in qpid::cluster::Cluster::~Cluster (this=0x150c640, __in_chrg=<value optimized out>) at qpid/cluster/Cluster.cpp:316
#40 0x00007fbfe2d10efd in qpid::cluster::Cluster::brokerShutdown (this=0x150c640) at qpid/cluster/Cluster.cpp:842
#41 0x00007fbfe67208c8 in operator() (f=<value optimized out>) at /usr/include/boost/function/function_template.hpp:1013
#42 qpid::(anonymous namespace)::invoke(boost::function<void()>) (f=<value optimized out>) at qpid/Plugin.cpp:38
---Type <return> to continue, or q <return> to quit---
#43 0x00007fbfe6720c23 in for_each<__gnu_cxx::__normal_iterator<boost::function<void()>*, std::vector<boost::function<void()>, std::allocator<boost::function<void()> > > >, void (*)(boost::function<void()>)> (this=0x1500fa8) at /usr/include/c++/4.4.7/bits/stl_algo.h:4200
#44 qpid::Plugin::Target::finalize (this=0x1500fa8) at qpid/Plugin.cpp:45
#45 0x00007fbfe6b92070 in qpid::broker::Broker::~Broker (this=0x1500fa0, __in_chrg=<value optimized out>) at qpid/broker/Broker.cpp:453
#46 0x00007fbfe6b92cf9 in qpid::broker::Broker::~Broker (this=0x1500fa0, __in_chrg=<value optimized out>) at qpid/broker/Broker.cpp:458
#47 0x000000000040dee7 in release (this=<value optimized out>, options=<value optimized out>) at qpid/RefCounted.h:42
#48 intrusive_ptr_release (this=<value optimized out>, options=<value optimized out>) at qpid/RefCounted.h:54
#49 ~intrusive_ptr (this=<value optimized out>, options=<value optimized out>) at /usr/include/boost/smart_ptr/intrusive_ptr.hpp:101
#50 qpid::broker::QpiddBroker::execute (this=<value optimized out>, options=<value optimized out>) at posix/QpiddBroker.cpp:206
#51 0x000000000040aa46 in qpid::broker::run_broker (argc=10, argv=0x7fff715d4398, hidden=<value optimized out>) at qpidd.cpp:106
#52 0x00007fbfe4b80d1d in __libc_start_main (main=0x40d740 <main(int, char**)>, argc=10, ubp_av=0x7fff715d4398, init=<value optimized out>, fini=<value optimized out>, 
    rtld_fini=<value optimized out>, stack_end=0x7fff715d4388) at libc-start.c:226
#53 0x000000000040a2b9 in _start ()


Note You need to log in before you can comment on or make changes to this bug.