Qpid
  1. Qpid
  2. QPID-4949

C++ broker may crash on shutdown

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.22
    • Fix Version/s: 0.23
    • Component/s: C++ Broker
    • Labels:
      None

      Description

      The C++ broker may crash during shutdown. The resulting core file shows an attempt to send a QMF event message during the Broker class destructor.

        Activity

        Hide
        Ken Giusti added a comment -

        The crash stack dump:

        #0 0x00000000 in ?? ()
        #1 0x05f1fc79 in qpid::management::ManagementAgent::sendBuffer(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, qpid::types::Variant, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, qpid::types::Variant> > > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::shared_ptr<qpid::broker::Exchange>, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long) () from /usr/lib/libqpidbroker.so.9
        #2 0x05f308ba in qpid::management::ManagementAgent::raiseEvent(qpid::management::ManagementEvent const&, qpid::management::ManagementAgent::severity_t) () from /usr/lib/libqpidbroker.so.9
        #3 0x05e66e0a in qpid::broker::ExchangeRegistry::destroy(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/libqpidbroker.so.9
        #4 0x05e80142 in qpid::broker::Link::~Link() () from /usr/lib/libqpidbroker.so.9
        #5 0x05e8e658 in ?? () from /usr/lib/libqpidbroker.so.9
        #6 0x05e8efb7 in std::_Rb_tree<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::shared_ptr<qpid::broker::Link> >, std::_Select1st<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::shared_ptr<qpid::broker::Link> > >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::shared_ptr<qpid::broker::Link> > > >::_M_erase(std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::shared_ptr<qpid::broker::Link> > >*) () from /usr/lib/libqpidbroker.so.9
        #7 0x05e8c207 in qpid::broker::LinkRegistry::~LinkRegistry() () from /usr/lib/libqpidbroker.so.9
        #8 0x05db29bb in qpid::broker::Broker::~Broker() () from /usr/lib/libqpidbroker.so.9
        #9 0x05dcfe65 in ?? () from /usr/lib/libqpidbroker.so.9

        Show
        Ken Giusti added a comment - The crash stack dump: #0 0x00000000 in ?? () #1 0x05f1fc79 in qpid::management::ManagementAgent::sendBuffer(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, qpid::types::Variant, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, qpid::types::Variant> > > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::shared_ptr<qpid::broker::Exchange>, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long long) () from /usr/lib/libqpidbroker.so.9 #2 0x05f308ba in qpid::management::ManagementAgent::raiseEvent(qpid::management::ManagementEvent const&, qpid::management::ManagementAgent::severity_t) () from /usr/lib/libqpidbroker.so.9 #3 0x05e66e0a in qpid::broker::ExchangeRegistry::destroy(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/libqpidbroker.so.9 #4 0x05e80142 in qpid::broker::Link::~Link() () from /usr/lib/libqpidbroker.so.9 #5 0x05e8e658 in ?? () from /usr/lib/libqpidbroker.so.9 #6 0x05e8efb7 in std::_Rb_tree<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::shared_ptr<qpid::broker::Link> >, std::_Select1st<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::shared_ptr<qpid::broker::Link> > >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::shared_ptr<qpid::broker::Link> > > >::_M_erase(std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::shared_ptr<qpid::broker::Link> > >*) () from /usr/lib/libqpidbroker.so.9 #7 0x05e8c207 in qpid::broker::LinkRegistry::~LinkRegistry() () from /usr/lib/libqpidbroker.so.9 #8 0x05db29bb in qpid::broker::Broker::~Broker() () from /usr/lib/libqpidbroker.so.9 #9 0x05dcfe65 in ?? () from /usr/lib/libqpidbroker.so.9
        Hide
        ASF subversion and git services added a comment -

        Commit 1496630 from Ken Giusti
        [ https://svn.apache.org/r1496630 ]

        QPID-4949: explicitly delete the management agent during the Broker destructor

        Show
        ASF subversion and git services added a comment - Commit 1496630 from Ken Giusti [ https://svn.apache.org/r1496630 ] QPID-4949 : explicitly delete the management agent during the Broker destructor
        Hide
        Ken Giusti added a comment -

        http://svn.apache.org/viewvc?view=revision&revision=1496630

        Explicitly delete the management agent early in the Broker class destructor. Once the broker's poller is stopped, the management agent can no longer publish messages, so it is no longer relevant.

        Otherwise, components of the broker will attempt to generate management event messages while the broker has been partially deleted (unknown state).

        Show
        Ken Giusti added a comment - http://svn.apache.org/viewvc?view=revision&revision=1496630 Explicitly delete the management agent early in the Broker class destructor. Once the broker's poller is stopped, the management agent can no longer publish messages, so it is no longer relevant. Otherwise, components of the broker will attempt to generate management event messages while the broker has been partially deleted (unknown state).
        Hide
        Justin Ross added a comment -
        Show
        Justin Ross added a comment - Released in Qpid 0.24, http://qpid.apache.org/releases/qpid-0.24/index.html

          People

          • Assignee:
            Ken Giusti
            Reporter:
            Ken Giusti
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development