Closed mmoadeli closed 11 years ago
The problem seems to be related to the destruction of the environment.
gdb --args ./TESTrouting_func --gtest_filter=*FUNC_Send
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffecbff7700 (LWP 5175)]
0x0000000000c83b13 in std::string::_Rep::_M_dispose(std::allocator<char> const&) [clone .part.23] ()
(gdb) where
#0 0x0000000000c83b13 in std::string::_Rep::_M_dispose(std::allocator<char> const&) [clone .part.23] ()
#1 0x0000000000c83b63 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() ()
#2 0x00000000008a58e1 in CryptoPP::Exception::~Exception (this=0x1110960, __in_chrg=<optimised out>) at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/cryptopp/cryptlib.h:132
#3 0x0000000000a1274e in CryptoPP::InvalidArgument::~InvalidArgument (this=0x1110960, __in_chrg=<optimised out>) at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/cryptopp/cryptlib.h:145
#4 0x0000000000a12780 in CryptoPP::InvalidArgument::~InvalidArgument (this=0x1110960, __in_chrg=<optimised out>) at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/cryptopp/cryptlib.h:145
#5 0x0000000000a6b44d in CryptoPP::OAEP_Base::Pad(CryptoPP::RandomNumberGenerator&, unsigned char const*, unsigned long, unsigned char*, unsigned long, CryptoPP::NameValuePairs const&) const ()
#6 0x0000000000a90a12 in CryptoPP::TF_EncryptorBase::Encrypt(CryptoPP::RandomNumberGenerator&, unsigned char const*, unsigned long, unsigned char*, CryptoPP::NameValuePairs const&) const ()
#7 0x0000000000a95f2a in CryptoPP::PK_DefaultEncryptionFilter::Put2(unsigned char const*, unsigned long, int, bool) ()
#8 0x0000000000a42765 in CryptoPP::BufferedTransformation::MessageEnd (this=0x7fff3000f580, propagation=-1, blocking=true) at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/cryptopp/cryptlib.h:808
#9 0x0000000000a43050 in CryptoPP::SimpleProxyFilter::LastPut (this=0x7fff30019950) at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/cryptopp/filters.h:562
#10 0x0000000000aa1c58 in CryptoPP::FilterWithBufferedInput::PutMaybeModifiable(unsigned char*, unsigned long, int, bool, bool) ()
#11 0x0000000000a42c33 in CryptoPP::FilterWithBufferedInput::Put2 (this=0x7fff30019950, inString=0x0, length=0, messageEnd=-1, blocking=true)
at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/cryptopp/filters.h:157
#12 0x0000000000a93454 in CryptoPP::BufferedTransformation::ChannelPut2(std::string const&, unsigned char const*, unsigned long, int, bool) ()
#13 0x0000000000a93f2f in CryptoPP::BufferedTransformation::TransferMessagesTo2(CryptoPP::BufferedTransformation&, unsigned int&, std::string const&, bool) ()
#14 0x0000000000a9413e in CryptoPP::BufferedTransformation::TransferAllTo2(CryptoPP::BufferedTransformation&, std::string const&, bool) ()
#15 0x0000000000a18424 in CryptoPP::SourceTemplate<CryptoPP::StringStore>::PumpAll2 (this=0x7ffecbff6390, blocking=true) at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/cryptopp/filters.h:767
#16 0x0000000000a13980 in CryptoPP::Source::PumpAll (this=0x7ffecbff6390) at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/cryptopp/filters.h:738
#17 0x0000000000a139c7 in CryptoPP::Source::SourceInitialize (this=0x7ffecbff6390, pumpAll=true, parameters=...) at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/cryptopp/filters.h:749
#18 0x0000000000a13c27 in CryptoPP::StringSource::StringSource (this=0x7ffecbff6390, string=..., pumpAll=true, attachment=0x7fff30019950)
at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/cryptopp/filters.h:793
#19 0x0000000000a4a0e8 in maidsafe::rsa::Encrypt (data=..., public_key=...) at /home/maidsafe/maidsafe/MaidSafe/src/common/src/maidsafe/common/rsa.cc:117
#20 0x00000000009d97e6 in maidsafe::rudp::detail::Connection::StartSending(std::string const&, std::function<void (int)> const&) (this=0x7fff2c00a1e0, data=..., message_sent_functor=...)
at /home/maidsafe/maidsafe/MaidSafe/src/rudp/src/maidsafe/rudp/connection.cc:199
#21 0x00000000009cc1f9 in operator() (this=0x7ffecbff69c0) at /home/maidsafe/maidsafe/MaidSafe/src/rudp/src/maidsafe/rudp/connection_manager.cc:154
#22 0x00000000009d06c2 in boost::asio::asio_handler_invoke<maidsafe::rudp::detail::ConnectionManager::Send(const maidsafe::NodeId&, const string&, const std::function<void(int)>&)::<lambda()> >(struct {...}, ...) (function=...) at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/boost/boost/asio/handler_invoke_hook.hpp:64
#23 0x00000000009d028a in boost_asio_handler_invoke_helpers::invoke<maidsafe::rudp::detail::ConnectionManager::Send(const maidsafe::NodeId&, const string&, const std::function<void(int)>&)::<lambda()>, maidsafe::rudp::detail::ConnectionManager::Send(const maidsafe::NodeId&, const string&, const std::function<void(int)>&)::<lambda()> >(struct {...} &, struct {...} &) (function=..., context=...)
at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/boost/boost/asio/detail/handler_invoke_helpers.hpp:39
#24 0x00000000009d047b in boost::asio::detail::completion_handler<maidsafe::rudp::detail::ConnectionManager::Send(const maidsafe::NodeId&, const string&, const std::function<void(int)>&)::<lambda()> >::do_complete(boost::asio::detail::io_service_impl *, boost::asio::detail::operation *, const boost::system::error_code &, std::size_t) (owner=0x11f4560, base=0x7fff24018420)
at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/boost/boost/asio/detail/completion_handler.hpp:67
#25 0x00000000008c6efa in boost::asio::detail::task_io_service_operation::complete (this=0x7fff24018420, owner=..., ec=..., bytes_transferred=0)
at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/boost/boost/asio/detail/task_io_service_operation.hpp:37
#26 0x0000000000999907 in boost::asio::detail::strand_service::do_complete (owner=0x11f4560, base=0x7fff24018340, ec=...)
at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/boost/boost/asio/detail/impl/strand_service.ipp:160
#27 0x00000000008c6efa in boost::asio::detail::task_io_service_operation::complete (this=0x7fff24018340, owner=..., ec=..., bytes_transferred=0)
at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/boost/boost/asio/detail/task_io_service_operation.hpp:37
#28 0x0000000000a3b6c9 in boost::asio::detail::task_io_service::do_run_one (this=0x11f4560, lock=..., this_thread=..., ec=...)
at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/boost/boost/asio/detail/impl/task_io_service.ipp:419
#29 0x0000000000a3b3cd in boost::asio::detail::task_io_service::run (this=0x11f4560, ec=...) at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/boost/boost/asio/detail/impl/task_io_service.ipp:160
#30 0x0000000000a3b8ad in boost::asio::io_service::run (this=0x11fa508) at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/boost/boost/asio/impl/io_service.ipp:59
#31 0x0000000000a39107 in operator() (this=0x11ec628) at /home/maidsafe/maidsafe/MaidSafe/src/common/src/maidsafe/common/asio_service.cc:82
#32 0x0000000000a3ac48 in boost::detail::thread_data<maidsafe::AsioService::Start()::<lambda()> >::run(void) (this=0x11ec4a0)
at /home/maidsafe/maidsafe/MaidSafe/src/third_party_libs/boost/boost/thread/detail/thread.hpp:74
#33 0x0000000000c15f2d in thread_proxy ()
#34 0x00007ffff7bc4e9a in start_thread (arg=0x7ffecbff7700) at pthread_create.c:308
#35 0x00007ffff71d7cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#36 0x0000000000000000 in ?? ()
It is fixed
Almost all functional tests segfault after the test finishes. We had similar problem before which Fraser fixed by changing the order of member classes of routing_impl. I did not have much time to investigate the cause of problem, but it seems to be similar issue which was fixed by Admiral.