This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 480295 - The broker crashes when a standard message is sent to a LVQ
The broker crashes when a standard message is sent to a LVQ
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp (Show other bugs)
1.1
All Linux
urgent Severity high
: 1.1.1
: ---
Assigned To: Carl Trieloff
Frantisek Reznicek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-16 05:38 EST by Arnaud Simon
Modified: 2015-11-15 19:06 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-21 12:16:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Reproducer (1.07 KB, text/plain)
2009-03-02 12:10 EST, David Sommerseth
no flags Details

  None (edit)
Description Arnaud Simon 2009-01-16 05:38:26 EST
Description of problem: The broker crashes when a standard message is sent to a LVQ

Scenario to reproduce is:
- Create a LVQ queue with key foo  
- Send 10 messages with the key foo
- Send a message without a key ===> segfault

The backtrace is:
(gdb) backtrace
#0  std::_Rb_tree<std::string, std::pair<std::string const, boost::shared_ptr<qpid::framing::FieldValue> >, std::_Select1st<std::pair<std::string const, boost::shared_ptr<qpid::framing::FieldValue> > >, std::less<std::string>, std::allocator<std::pair<std::string const, boost::shared_ptr<qpid::framing::FieldValue> > > >::_M_begin ()
    at /usr/lib/gcc/i386-redhat-linux/4.3.2/../../../../include/c++/4.3.2/bits/stl_tree.h:459
#1  std::_Rb_tree<std::string, std::pair<std::string const, boost::shared_ptr<qpid::framing::FieldValue> >, std::_Select1st<std::pair<std::string const, boost::shared_ptr<qpid::framing::FieldValue> > >, std::less<std::string>, std::allocator<std::pair<std::string const, boost::shared_ptr<qpid::framing::FieldValue> > > >::find ()
    at /usr/lib/gcc/i386-redhat-linux/4.3.2/../../../../include/c++/4.3.2/bits/stl_tree.h:1405
#2  std::map<std::string, boost::shared_ptr<qpid::framing::FieldValue>, std::less<std::string>, std::allocator<std::pair<std::string const, boost::shared_ptr<qpid::framing::FieldValue> > > >::find ()
    at /usr/lib/gcc/i386-redhat-linux/4.3.2/../../../../include/c++/4.3.2/bits/stl_map.h:630
#3  qpid::framing::FieldTable::get (this=0x0, name=@0x2e5e24) at qpid/framing/FieldTable.cpp:122
#4  0x0047d713 in qpid::framing::FieldTable::getAsString (this=0x0, name=@0x2e5e24) at qpid/framing/FieldTable.cpp:144
#5  0x001de171 in qpid::broker::Queue::push (this=0xb4d00970, msg=@0xb58905cc) at qpid/broker/Queue.cpp:534
#6  0x001df37b in qpid::broker::Queue::deliver (this=0xb4d00970, msg=@0xb58905cc) at qpid/broker/Queue.cpp:163
#7  0x001f9d92 in qpid::broker::DeliverableMessage::deliverTo (this=0xb58905c4, queue=@0xb4d0117c)
    at qpid/broker/DeliverableMessage.cpp:31
#8  0x001fe6aa in qpid::broker::DirectExchange::route (this=0x8b5acc0, msg=@0xb58905c4, routingKey=@0xb5890564)
    at qpid/broker/DirectExchange.cpp:145
#9  0x0024fa54 in qpid::broker::SemanticState::route (this=0xb4d41de8, msg={p_ = 0xb4d42c68}, strategy=@0xb58905c4)
    at qpid/broker/SemanticState.cpp:387
#10 0x002503df in qpid::broker::SemanticState::handle (this=0xb4d41de8, msg={p_ = 0xb4d42c68}) at qpid/broker/SemanticState.cpp:344
#11 0x00262566 in qpid::broker::SessionState::handleContent (this=0xb4d41cc0, frame=@0xb5890d5c, id=@0xb5890704)
    at qpid/broker/SessionState.cpp:198
#12 0x0026520e in qpid::broker::SessionState::handleIn (this=0xb4d41cc0, frame=@0xb5890d5c) at qpid/broker/SessionState.cpp:230
#13 0x00265b6b in qpid::framing::Handler<qpid::framing::AMQFrame&>::MemFunRef<qpid::framing::Handler<qpid::framing::AMQFrame&>::InOutHandlerInterface, &(qpid::framing::Handler<qpid::framing::AMQFrame&>::InOutHandlerInterface::handleIn(qpid::framing::AMQFrame&))>::handle (
    this=0xb4d41dc0, t=@0xb5890d5c) at ./qpid/framing/Handler.h:67
#14 0x0046b4fe in qpid::amqp_0_10::SessionHandler::handleIn (this=0xb4d00618, f=@0xb5890d5c) at qpid/amqp_0_10/SessionHandler.cpp:92
#15 0x00265b6b in qpid::framing::Handler<qpid::framing::AMQFrame&>::MemFunRef<qpid::framing::Handler<qpid::framing::AMQFrame&>::InOutHandlerInterface, &(qpid::framing::Handler<qpid::framing::AMQFrame&>::InOutHandlerInterface::handleIn(qpid::framing::AMQFrame&))>::handle (
    this=0xb4d00620, t=@0xb5890d5c) at ./qpid/framing/Handler.h:67
#16 0x001ece77 in qpid::framing::Handler<qpid::framing::AMQFrame&>::operator() () at ./qpid/framing/Handler.h:42
#17 qpid::broker::Connection::received (this=0x8b9cfe0, frame=@0xb5890d5c) at qpid/broker/Connection.cpp:104
#18 0x001bb4d7 in qpid::amqp_0_10::Connection::decode (this=0x8b9d188, buffer=0xb4d31cb8 "\v\001", size=1327)
    at qpid/amqp_0_10/Connection.cpp:55
#19 0x00247404 in qpid::broker::SecureConnection::decode (this=0x8b5c528, buffer=0xb4d31cb8 "\v\001", size=4)
    at qpid/broker/SecureConnection.cpp:42
#20 0x00496ee6 in qpid::sys::AsynchIOHandler::readbuff (this=0xb4d00738, buff=0xb4d011a8) at qpid/sys/AsynchIOHandler.cpp:103
#21 0x00286cf9 in boost::_mfi::mf2<bool, qpid::sys::AsynchIOHandler, qpid::sys::AsynchIO&, qpid::sys::AsynchIOBufferBase*>::operator() ()
    at /usr/include/boost/bind/mem_fn_template.hpp:274
#22 operator()<bool, boost::_mfi::mf2<bool, qpid::sys::AsynchIOHandler, qpid::sys::AsynchIO&, qpid::sys::AsynchIOBufferBase*>, boost::_bi::list2<qpid::sys::AsynchIO&, qpid::sys::AsynchIOBufferBase*&> > () at /usr/include/boost/bind.hpp:337
#23 operator()<qpid::sys::AsynchIO, qpid::sys::AsynchIOBufferBase*> () at /usr/include/boost/bind/bind_template.hpp:61
#24 boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::_mfi::mf2<bool, qpid::sys::AsynchIOHandler, qpid::sys::AsynchIO&, qpid::sys::AsynchIOBufferBase*>, boost::_bi::list3<boost::_bi::value<qpid::sys::AsynchIOHandler*>, boost::arg<1> (*)(), boost::ar
g<2> (*)()> >, bool, qpid::sys::AsynchIO&, qpid::sys::AsynchIOBufferBase*>::invoke (function_obj_ptr=@0xb4d0055c, a0=@0xb4d004d0, 
    a1=0xb4d011a8) at /usr/include/boost/function/function_template.hpp:134
#25 0x0043db9f in boost::function2<bool, qpid::sys::AsynchIO&, qpid::sys::AsynchIOBufferBase*, std::allocator<boost::function_base> >::operator() () at /usr/include/boost/function/function_template.hpp:692
#26 qpid::sys::posix::AsynchIO::readable (this=0xb4d004d0, h=@0xb4d004d4) at qpid/sys/posix/AsynchIO.cpp:441
#27 0x0043f342 in boost::_mfi::mf1<void, qpid::sys::posix::AsynchIO, qpid::sys::DispatchHandle&>::operator() ()
    at /usr/include/boost/bind/mem_fn_template.hpp:162
#28 operator()<boost::_mfi::mf1<void, qpid::sys::posix::AsynchIO, qpid::sys::DispatchHandle&>, boost::_bi::list1<qpid::sys::DispatchHandle&> > () at /usr/include/boost/bind.hpp:288
#29 operator()<qpid::sys::DispatchHandle> () at /usr/include/boost/bind/bind_template.hpp:32
#30 boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void, boost::_mfi::mf1<void, qpid::sys::posix::AsynchIO, qpid::sys::DispatchHandle&>, boost::_bi::list2<boost::_bi::value<qpid::sys::posix::AsynchIO*>, boost::arg<1> (*)()> >, void, qpid::sys::DispatchHandle&>::invoke (function_obj_ptr=@0xb4d004e0, a0=@0xb4d004d4) at /usr/include/boost/function/function_template.hpp:155
#31 0x0049add3 in boost::function1<void, qpid::sys::DispatchHandle&, std::allocator<boost::function_base> >::operator() (this=0xb4d004dc, 
    a0=@0xb4d004d4) at /usr/include/boost/function/function_template.hpp:692
#32 0x0049a834 in qpid::sys::DispatchHandle::processEvent (this=0xb4d004d4, type=qpid::sys::Poller::READABLE)
    at qpid/sys/DispatchHandle.cpp:361
#33 0x00450a03 in qpid::sys::Poller::Event::process () at ./qpid/sys/Poller.h:121
#34 qpid::sys::Poller::run (this=0x8b57878) at qpid/sys/epoll/EpollPoller.cpp:390
#35 0x00498774 in qpid::sys::Dispatcher::run (this=0xbfce7b84) at qpid/sys/Dispatcher.cpp:37
#36 0x00443ae1 in runRunnable (p=0xbfce7b84) at qpid/sys/posix/Thread.cpp:35
#37 0x00ad451f in start_thread () from /lib/libpthread.so.0
#38 0x00a0a01e in clone () from /lib/libc.so.6
Comment 1 Arnaud Simon 2009-01-16 05:46:26 EST
https://issues.apache.org/jira/browse/QPID-1586
Comment 2 Carl Trieloff 2009-01-19 14:27:02 EST
Transmitting file data ..
Committed revision 735776.

Messages that have no key, that are sent to a LVQ are placed into the queue in FIFO.

Test using bug reproduction instructions, unit test in QueueTest.cpp
Comment 4 David Sommerseth 2009-03-02 12:10:41 EST
Created attachment 333763 [details]
Reproducer

Tested with the attached reproducer against qpidd-0.4.744917-1.el5 and the MRG-1.1 stable packages.

Test routine:
- Install packages and start broker
- For MRG-1.1 -- run: qpid-config add queue foo --last-value-queue
- For MRG-1.1.1 candidate: run qpid-config add queue foo --order lvq
- run: python bz480295.py


On successful run, the reproducer should give this result:
----------------------------------------------------------
Broker: 127.0.0.1:5672
Message count: 10
Sending messages to routing_key: foo
Message 1 ...  Done
Message 2 ...  Done
Message 3 ...  Done
Message 4 ...  Done
Message 5 ...  Done
Message 6 ...  Done
Message 7 ...  Done
Message 8 ...  Done
Message 9 ...  Done
Message 10 ...  Done
Sending message without routing key
----------------------------------------------------------

This is the result from the MRG/M-1.1.1 candidate version tested.  

On the (buggy) MRG/M-1.1 stable packages the reproducer will not complete and will give a traceback and the broker will die.
Comment 6 errata-xmlrpc 2009-04-21 12:16:16 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-0434.html

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