Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Auto Closed
-
0.7
-
None
-
None
-
RHEL 5.5
Description
On svn trunk as of about Oct 25th, my qpidd broker was crashing due to rdma.so being loaded twice (or due to one of them being old and incompatible). There should be some warning to the user what they are doing wrong, if not some mechanism to prevent this.
To reproduce I:
- built qpidd, rdma.so, etc. via autotools
- meanwhile, someone installed qpidd on the system
- run broker like this:
host$ /aafabbri/autotools_build/src/.libs/qpidd \
--auth no \
--mgmt-enable no \
--load-module /aafabbri/autotools_build/src/.libs/rdma.so \
--transport rdma \
--worker-threads 4 \
--log-to-stdout yes
It crashes here:
#0 0x000000303a89c419 in std::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::compare(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&) const () from /usr/lib64/libstdc++.so.6
#1 0x00007f3f00e59a18 in std::operator< <char,
std::char_traits<char>, std::allocator<char> > (__lhs=Traceback (most
recent call last):
File "/usr/lib64/../share/gdb/python/libstdcxx/v6/printers.py", line
549, in to_string
return self.val['_M_dataplus']['_M_p'].lazy_string (length = len)
RuntimeError: Cannot access memory at address 0xffffffffffffffe8
, __rhs="replication") at
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/bits/basic_string.h:2317
#2 0x00007f3f00e59eb5 in std::less<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >::operator()
(this=0x6fce88, __x=Traceback (most recent call last):
File "/usr/lib64/../share/gdb/python/libstdcxx/v6/printers.py", line
549, in to_string
return self.val['_M_dataplus']['_M_p'].lazy_string (length = len)
RuntimeError: Cannot access memory at address 0xffffffffffffffe8
, __y="replication") at
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/bits/stl_function.h:230
#3 0x00007f3f00f029ba 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::function5<boost::shared_ptr<qpid::broker::Exchange>,
std::string const&, bool, qpid::framing::FieldTable const&,
qpid::management::Manageable*, qpid::broker::Broker*> >,
std::_Select1st<std::pair<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const,
boost::function5<boost::shared_ptr<qpid::broker::Exchange>,
std::string const&, bool, qpid::framing::FieldTable const&,
qpid::management::Manageable*, qpid::broker::Broker*> > >,
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::function5<boost::shared_ptr<qpid::broker::Exchange>,
std::string const&, bool, qpid::framing::FieldTable const&,
qpid::management::Manageable*, qpid::broker::Broker*> > >
>::_M_insert_unique_ (this=0x6fce88, __position=..., __v=...)
at /usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/bits/stl_tree.h:1212
#4 0x00007f3f00f01cac in std::map<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
boost::function5<boost::shared_ptr<qpid::broker::Exchange>,
std::string const&, bool, qpid::framing::FieldTable const&,
qpid::management::Manageable*, qpid::broker::Broker*>,
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::function5<boost::shared_ptr<qpid::broker::Exchange>,
std::string const&, bool, qpid::framing::FieldTable const&,
qpid::management::Manageable*, qpid::broker::Broker*> > > >::insert
(this=0x6fce88,
__position=..., __x=...) at
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/bits/stl_map.h:540
#5 0x00007f3f00f011c0 in std::map<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
boost::function5<boost::shared_ptr<qpid::broker::Exchange>,
std::string const&, bool, qpid::framing::FieldTable const&,
qpid::management::Manageable*, qpid::broker::Broker*>,
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::function5<boost::shared_ptr<qpid::broker::Exchange>,
std::string const&, bool, qpid::framing::FieldTable const&,
qpid::management::Manageable*, qpid::broker::Broker*> > >
>::operator[] (this=0x6fce88,
__k="replication") at
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/bits/stl_map.h:450
#6 0x00007f3f00f006c5 in qpid::broker::ExchangeRegistry::registerType
(this=0x6fce58, type="replication", f=...) at
../../src/qpid/broker/ExchangeRegistry.cpp:103
#7 0x00007f3efedbaff9 in
qpid::replication::ReplicationExchangePlugin::earlyInitialize
(this=0x7f3efefc1ce0, target=<value optimized out>) at
qpid/replication/ReplicationExchange.cpp:223
#8 0x00007f3f008e8a5e in boost::_mfi::mf1<void, qpid::Plugin,
qpid::Plugin::Target&>::operator() (this=0x7fff46858c30,
p=0x7f3efefc1ce0, a1=...) at
/usr/include/boost/bind/mem_fn_template.hpp:162
#9 0x00007f3f008e8506 in boost::_bi::list2<boost::arg<1>,
boost::reference_wrapper<qpid::Plugin::Target>
>::operator()<boost::_mfi::mf1<void, qpid::Plugin,
qpid::Plugin::Target&>, boost::_bi::list1<qpid::Plugin* const&> > (
this=0x7fff46858c40, f=..., a=...) at /usr/include/boost/bind/bind.hpp:306
#10 0x00007f3f008e7cd2 in boost::_bi::bind_t<void,
boost::_mfi::mf1<void, qpid::Plugin, qpid::Plugin::Target&>,
boost::_bi::list2<boost::arg<1>,
boost::reference_wrapper<qpid::Plugin::Target> >
>::operator()<qpid::Plugin*> (
this=0x7fff46858c30, a1=@0x6ffb68) at
/usr/include/boost/bind/bind_template.hpp:47
#11 0x00007f3f008e721c in
std::for_each<_gnu_cxx::_normal_iterator<qpid::Plugin* const*,
std::vector<qpid::Plugin*, std::allocator<qpid::Plugin*> > >,
boost::_bi::bind_t<void, boost::_mfi::mf1<void, qpid::Plugin,
qpid::Plugin::Target&>, boost::_bi::list2<boost::arg<1>,
boost::reference_wrapper<qpid::Plugin::Target> > > > (__first=,
__last=, __f=...) at
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/bits/stl_algo.h:4200
#12 0x00007f3f008e5da4 in qpid::(anonymous
namespace)::each_plugin<boost::_bi::bind_t<void,
boost::_mfi::mf1<void, qpid::Plugin, qpid::Plugin::Target&>,
boost::_bi::list2<boost::arg<1>,
boost::reference_wrapper<qpid::Plugin::Target> > > > (f=...) at
../../src/qpid/Plugin.cpp:73
#13 0x00007f3f008e5cdf in qpid::Plugin::earlyInitAll (t=...) at
../../src/qpid/Plugin.cpp:87
#14 0x00007f3f00eb1830 in qpid::broker::Broker::Broker (this=0x6fcb90,
conf=...) at ../../src/qpid/broker/Broker.cpp:223
#15 0x0000000000413b4c in QpiddBroker::execute (this=0x7fff46859b9f,
options=0x6f56b0) at ../../src/posix/QpiddBroker.cpp:182
#16 0x0000000000411593 in main (argc=13, argv=0x7fff46859e68) at
../../src/qpidd.cpp:80
Strace confirms multiple loading of rdma.so:
[root@localhost build]# grep rdma.so /tmp/strace.out
11920 open("/root/aafabbri/apache_qpid/trunk/qpid/cpp/build/src/.libs/rdma.so",
O_RDONLY) = 5
11920 stat("/usr/local/lib/qpid/daemon/rdma.so",
) = 0
11920 open("/usr/local/lib/qpid/daemon/rdma.so", O_RDONLY) = 6
When I add --no-module-dir, everything works again, and strace only
shows a single open of rdma.so:
[root@localhost build]# grep rdma.so /tmp/strace2.out
11955 open("/root/aafabbri/apache_qpid/trunk/qpid/cpp/build/src/.libs/rdma.so",
O_RDONLY) = 5