maidsafe-archive / MaidSafe

This is the super-project in which each MaidSafe library resides. Some information is common to all libraries, and is detailed here. Library-specific information can be found in each library's wiki.
Other
583 stars 102 forks source link

Assertion on GetAvailableEndpoint (GetConnection fails) #28

Closed muecs closed 12 years ago

muecs commented 12 years ago
pd-vault: /home/steve/projects/MaidSafe/src/rudp/src/maidsafe/rudp/managed_connections.cc:316: int maidsafe::rudp::ManagedConnections::GetAvailableEndpoint(maidsafe::NodeId, maidsafe::rudp::EndpointPair, maidsafe::rudp::EndpointPair&, maidsafe::rudp::NatType&): Assertion `connection' failed.
Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb11fdb40 (LWP 15144)]
0xb7fdd424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fdd424 in __kernel_vsyscall ()
#1  0xb7ddf1cf in raise () from /lib/i386-linux-gnu/libc.so.6
#2  0xb7de2815 in abort () from /lib/i386-linux-gnu/libc.so.6
#3  0xb7dd8075 in ?? () from /lib/i386-linux-gnu/libc.so.6
#4  0xb7dd8127 in __assert_fail () from /lib/i386-linux-gnu/libc.so.6
#5  0x08b4e108 in maidsafe::rudp::ManagedConnections::GetAvailableEndpoint (this=0x91e1398, peer_id=..., peer_endpoint_pair=..., this_endpoint_pair=..., this_nat_type=@0xb11fb930: maidsafe::rudp::kUnknown)                                                                   
    at /home/steve/projects/MaidSafe/src/rudp/src/maidsafe/rudp/managed_connections.cc:316
#6  0x08a2f1c3 in maidsafe::routing::NetworkUtils::GetAvailableEndpoint (this=0x91ed84c, peer_id=..., peer_endpoint_pair=..., this_endpoint_pair=..., this_nat_type=@0xb11fb930: maidsafe::rudp::kUnknown)                                                                      
    at /home/steve/projects/MaidSafe/src/routing/src/maidsafe/routing/network_utils.cc:129
#7  0x08a535a8 in maidsafe::routing::ResponseHandler::SendConnectRequest (this=0x91e5f18, peer_node_id=...) at /home/steve/projects/MaidSafe/src/routing/src/maidsafe/routing/response_handler.cc:255                                                                           
#8  0x08a55129 in maidsafe::routing::ResponseHandler::HandleSuccessAcknowledgementAsRequestor (this=0x91e5f18, close_ids=...) at /home/steve/projects/MaidSafe/src/routing/src/maidsafe/routing/response_handler.cc:396                                                         
#9  0x08a542c0 in operator() (this=0xb0609268, key=...) at /home/steve/projects/MaidSafe/src/routing/src/maidsafe/routing/response_handler.cc:350                                                                                                                               
#10 0x08a55b86 in std::_Function_handler<void(CryptoPP::RSAFunction), maidsafe::routing::ResponseHandler::ConnectSuccessAcknowledgement(maidsafe::routing::protobuf::Message&)::<lambda(const PublicKey&)> >::_M_invoke(const std::_Any_data &, CryptoPP::RSAFunction) (        
    __functor=..., __args#0=<incomplete type>) at /usr/include/c++/4.6/functional:1778
#11 0x089bee90 in std::function<void (CryptoPP::RSAFunction)>::operator()(CryptoPP::RSAFunction) const (this=0xb0603278, __args#0=<incomplete type>) at /usr/include/c++/4.6/functional:2161                                                                                    
#12 0x089b73bf in operator() (this=0xb0603270, result=true, public_key=<incomplete type>) at /home/steve/projects/MaidSafe/src/pd/src/maidsafe/pd/common/routing_message_handler.cc:283                                                                                         
#13 0x089bab37 in std::_Function_handler<void(bool, CryptoPP::RSAFunction), maidsafe::pd::RoutingMessageHandler::OnPublicKeyRequested(const maidsafe::NodeId&, const GivePublicKeyFunctor&)::<lambda()>::<lambda(bool, maidsafe::rsa::PublicKey)> >::_M_invoke(const std::_Any_data &, bool, CryptoPP::RSAFunction) (__functor=..., __args#0=true, __args#1=<incomplete type>) at /usr/include/c++/4.6/functional:1778
#14 0x089f003d in std::function<void (bool, CryptoPP::RSAFunction)>::operator()(bool, CryptoPP::RSAFunction) const (this=0xb11fc33c, __args#0=true, __args#1=<incomplete type>) at /usr/include/c++/4.6/functional:2161                                                         
#15 0x089ebcfe in maidsafe::pd::RemoteKeyManager::GetKey(std::string const&, std::function<void (bool, CryptoPP::RSAFunction)> const&) (this=0x91ad518, key_id=..., callback=...) at /home/steve/projects/MaidSafe/src/pd/src/maidsafe/pd/common/remote_key_manager.cc:220      
#16 0x089b7898 in operator() (this=0xb11fc47c) at /home/steve/projects/MaidSafe/src/pd/src/maidsafe/pd/common/routing_message_handler.cc:287
#17 0x089b7cb3 in maidsafe::pd::RoutingMessageHandler::OnPublicKeyRequested(maidsafe::NodeId const&, std::function<void (CryptoPP::RSAFunction)> const&) (this=0x91f1750, node_id=..., give_key=...)                                                                            
    at /home/steve/projects/MaidSafe/src/pd/src/maidsafe/pd/common/routing_message_handler.cc:299
#18 0x089b4b05 in operator() (this=0x91e1370, node_id=..., give_key=...) at /home/steve/projects/MaidSafe/src/pd/src/maidsafe/pd/common/routing_message_handler.cc:101                                                                                                          
#19 0x089bb3d4 in std::_Function_handler<void(maidsafe::NodeId, std::function<void(CryptoPP::RSAFunction)>), maidsafe::pd::RoutingMessageHandler::Init()::<lambda(const maidsafe::NodeId&, const GivePublicKeyFunctor&)> >::_M_invoke(const std::_Any_data &, maidsafe::NodeId, std::function<void(CryptoPP::RSAFunction)>) (__functor=..., __args#0=..., __args#1=...) at /usr/include/c++/4.6/functional:1778                                                                                                                                                 
#20 0x08a56b12 in std::function<void (maidsafe::NodeId, std::function<void (CryptoPP::RSAFunction)>)>::operator()(maidsafe::NodeId, std::function<void (CryptoPP::RSAFunction)>) const (this=0x91e5f54, __args#0=..., __args#1=...) at /usr/include/c++/4.6/functional:2161     
#21 0x08a54afc in maidsafe::routing::ResponseHandler::ConnectSuccessAcknowledgement (this=0x91e5f18, message=...) at /home/steve/projects/MaidSafe/src/routing/src/maidsafe/routing/response_handler.cc:355                                                                     
#22 0x08a45d96 in maidsafe::routing::MessageHandler::HandleRoutingMessage (this=0x91e4658, message=...) at /home/steve/projects/MaidSafe/src/routing/src/maidsafe/routing/message_handler.cc:60                                                                                 
#23 0x08a46eb4 in maidsafe::routing::MessageHandler::HandleMessageForThisNode (this=0x91e4658, message=...) at /home/steve/projects/MaidSafe/src/routing/src/maidsafe/routing/message_handler.cc:135                                                                            
#24 0x08a48f0e in maidsafe::routing::MessageHandler::HandleMessage (this=0x91e4658, message=...) at /home/steve/projects/MaidSafe/src/routing/src/maidsafe/routing/message_handler.cc:275                                                                                       
#25 0x08a1a059 in maidsafe::routing::RoutingPrivate::DoOnMessageReceived (this=0x91ed450, message=...) at /home/steve/projects/MaidSafe/src/routing/src/maidsafe/routing/routing_private.cc:502
#26 0x08a19cab in operator() (this=0xb11fd128) at /home/steve/projects/MaidSafe/src/routing/src/maidsafe/routing/routing_private.cc:488
#27 0x08a20262 in boost::asio::asio_handler_invoke<maidsafe::routing::RoutingPrivate::OnMessageReceived(const string&)::<lambda()> >(struct {...}, ...) (function=...) at /home/steve/projects/MaidSafe/src/third_party_libs/boost/boost/asio/handler_invoke_hook.hpp:64        
#28 0x08a1fcc8 in boost_asio_handler_invoke_helpers::invoke<maidsafe::routing::RoutingPrivate::OnMessageReceived(const string&)::<lambda()>, maidsafe::routing::RoutingPrivate::OnMessageReceived(const string&)::<lambda()> >(struct {...} &, struct {...} &) (function=..., 
    context=...) at /home/steve/projects/MaidSafe/src/third_party_libs/boost/boost/asio/detail/handler_invoke_helpers.hpp:39
#29 0x08a1f3a8 in boost::asio::detail::completion_handler<maidsafe::routing::RoutingPrivate::OnMessageReceived(const string&)::<lambda()> >::do_complete(boost::asio::detail::io_service_impl *, boost::asio::detail::operation *, const boost::system::error_code &, std::size_t) (owner=0x91e7078, base=0xb0712598) at /home/steve/projects/MaidSafe/src/third_party_libs/boost/boost/asio/detail/completion_handler.hpp:67
#30 0x08abbf7f in boost::asio::detail::task_io_service_operation::complete (this=0xb0712598, owner=..., ec=..., bytes_transferred=0) at /home/steve/projects/MaidSafe/src/third_party_libs/boost/boost/asio/detail/task_io_service_operation.hpp:37
#31 0x08bf7b08 in boost::asio::detail::task_io_service::do_run_one (this=0x91e7078, lock=..., this_thread=..., ec=...) at /home/steve/projects/MaidSafe/src/third_party_libs/boost/boost/asio/detail/impl/task_io_service.ipp:419
#32 0x08bf7851 in boost::asio::detail::task_io_service::run (this=0x91e7078, ec=...) at /home/steve/projects/MaidSafe/src/third_party_libs/boost/boost/asio/detail/impl/task_io_service.ipp:160
#33 0x08bf7cbe in boost::asio::io_service::run (this=0x91ed7b8) at /home/steve/projects/MaidSafe/src/third_party_libs/boost/boost/asio/impl/io_service.ipp:59
#34 0x08bf5b57 in operator() (this=0x91e110c) at /home/steve/projects/MaidSafe/src/common/src/maidsafe/common/asio_service.cc:78
#35 0x08bf717e in boost::detail::thread_data<maidsafe::AsioService::Start()::<lambda()> >::run(void) (this=0x91e1008) at /home/steve/projects/MaidSafe/src/third_party_libs/boost/boost/thread/detail/thread.hpp:74
#36 0x08d9777e in thread_proxy ()
#37 0xb7fb0d4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#38 0xb7e9b8ae in clone () from /lib/i386-linux-gnu/libc.so.6
Fraser999 commented 12 years ago

This commit should fix the issue: https://github.com/maidsafe/MaidSafe-RUDP/commit/df2abf312217e7d33c14a7a7df1cdd669152d029