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 101 forks source link

Rudp assert on "connection_details.second->GetConnection(connection_details.first)->state() == detail::Connection::State::kBootstrapping". #16

Closed chandraprakash closed 11 years ago

chandraprakash commented 11 years ago

Once after reporting ConnectionLost() for last connection (except bootstrap connection). Rudp should not allow any new incoming activity until user re bootstraps.

TESTrouting: /home/maidsafe/super/MaidSafe/src/rudp/src/maidsafe/rudp/managed_connections.cc:107: int maidsafe::rudp::ManagedConnections::Bootstrap(const std::vectorboost::asio::ip::basic_endpoint&, maidsafe::rudp::MessageReceivedFunctor, maidsafe::rudp::ConnectionLostFunctor, maidsafe::NodeId, std::shared_ptrCryptoPP::InvertibleRSAFunction, std::shared_ptrCryptoPP::RSAFunction, maidsafe::NodeId&, maidsafe::rudp::NatType&, maidsafe::rudp::{anonymous}::Endpoint): Assertion `connection_details.second->GetConnection(connection_details.first)->state() == detail::Connection::State::kBootstrapping' failed.

chandraprakash commented 11 years ago

We will try to handle this in routing by creating new managed connection on re-bootstrap. (TBD)

muecs commented 11 years ago

This is still happening...

...
E 2971659072 11:35:40.393731 routing/routing_private.cc:454] Partial join Session Ended, Send not allowed anymore
W 2971659072 11:35:40.393802 pd/common/routing_message_handler.cc:78] Init - 5b0de95..c773f72 - Network is down (-303014)
E 3032476480 11:35:40.393826 pd/common/rpc_handler.cc:125] CheckResponse - 5b0de95..c773f72 - RPC 1300 to node e47e6dc..a740c49 failed (-1) after 2 attempts.
E 3032476480 11:35:40.393891 pd/common/rpc_handler.cc:1352] ProcessResponse - 5b0de95..c773f72 - Sync/GetSyncData RPC failed.
E 3032476480 11:35:40.393962 pd/vault/node.cc:701] GetSyncDataCallback - 5b0de95..c773f72 - Failed to synchronise with e47e6dc..a740c49
E 3001023296 11:35:40.426394 rudp/managed_connections.cc:596] Can't send from 5b0de95..c773f72 to 0000000..0000000 - not in map.
E 2971659072 11:35:40.426537 routing/routing_private.cc:454] Partial join Session Ended, Send not allowed anymore
W 2971659072 11:35:40.426614 pd/common/routing_message_handler.cc:78] Init - 5b0de95..c773f72 - Network is down (-303014)
E 3001023296 11:35:40.426732 pd/common/rpc_handler.cc:125] CheckResponse - 5b0de95..c773f72 - RPC 1300 to node 91d266f..2024c55 failed (-1) after 2 attempts.
E 3001023296 11:35:40.426853 pd/common/rpc_handler.cc:1352] ProcessResponse - 5b0de95..c773f72 - Sync/GetSyncData RPC failed.
E 3001023296 11:35:40.426990 pd/vault/node.cc:701] GetSyncDataCallback - 5b0de95..c773f72 - Failed to synchronise with 91d266f..2024c55
E 3032476480 11:35:40.461819 rudp/managed_connections.cc:596] Can't send from 5b0de95..c773f72 to 0000000..0000000 - not in map.
E 2971659072 11:35:40.461974 routing/routing_private.cc:454] Partial join Session Ended, Send not allowed anymore
W 2971659072 11:35:40.462053 pd/common/routing_message_handler.cc:78] Init - 5b0de95..c773f72 - Network is down (-303014)
E 3032476480 11:35:40.462130 pd/common/rpc_handler.cc:125] CheckResponse - 5b0de95..c773f72 - RPC 1300 to node 854bfaa..05c024c failed (-1) after 2 attempts.
E 3032476480 11:35:40.462229 pd/common/rpc_handler.cc:1352] ProcessResponse - 5b0de95..c773f72 - Sync/GetSyncData RPC failed.
E 3032476480 11:35:40.462348 pd/vault/node.cc:701] GetSyncDataCallback - 5b0de95..c773f72 - Failed to synchronise with 854bfaa..05c024c
E 3001023296 11:35:40.500155 rudp/managed_connections.cc:596] Can't send from 5b0de95..c773f72 to 0000000..0000000 - not in map.
E 2971659072 11:35:40.500343 routing/routing_private.cc:454] Partial join Session Ended, Send not allowed anymore
W 2971659072 11:35:40.500419 pd/common/routing_message_handler.cc:78] Init - 5b0de95..c773f72 - Network is down (-303014)
E 3001023296 11:35:40.500527 pd/common/rpc_handler.cc:125] CheckResponse - 5b0de95..c773f72 - RPC 1300 to node 848f308..8ba8866 failed (-1) after 2 attempts.
E 3001023296 11:35:40.500646 pd/common/rpc_handler.cc:1352] ProcessResponse - 5b0de95..c773f72 - Sync/GetSyncData RPC failed.
E 3001023296 11:35:40.500781 pd/vault/node.cc:701] GetSyncDataCallback - 5b0de95..c773f72 - Failed to synchronise with 848f308..8ba8866
E 2971659072 11:35:42.374687 rudp/managed_connections.cc:596] Can't send from 5b0de95..c773f72 to 0000000..0000000 - not in map.
E 2992630592 11:35:42.374872 routing/network_utils.cc:259] Sending type kFindNodes Res message from 5b0de95..c773f72 to 0000000..0000000 failed with code -350004 id: 0
E 2982148928 11:35:43.900484 routing/routing_private.cc:691] [5b0de95..c773f72]'s' Routing table is empty. ReBootstraping ....
pd-vault: /home/steve/projects/MaidSafe/src/rudp/src/maidsafe/rudp/managed_connections.cc:103: int maidsafe::rudp::ManagedConnections::Bootstrap(const std::vector<boost::asio::ip::basic_endpoint<boost::asio::ip::udp> >&, maidsafe::rudp::MessageReceivedFunctor, maidsafe::rudp::ConnectionLostFunctor, maidsafe::NodeId, std::shared_ptr<CryptoPP::InvertibleRSAFunction>, std::shared_ptr<CryptoPP::RSAFunction>, maidsafe::NodeId&, maidsafe::rudp::NatType&, maidsafe::rudp::{anonymous}::Endpoint): Assertion `connection_details.second->GetConnection(connection_details.first)->state() == detail::Connection::State::kBootstrapping' failed.
#0  0xb7fdd424 in __kernel_vsyscall ()                                                                                                                                                                                                                                          
#1  0xb7dda1df in raise () from /lib/i386-linux-gnu/libc.so.6                                                                                                                                                                                                                   
#2  0xb7ddd825 in abort () from /lib/i386-linux-gnu/libc.so.6                                                                                                                                                                                                                   
#3  0xb7dd3085 in ?? () from /lib/i386-linux-gnu/libc.so.6                                                                                                                                                                                                                      
#4  0xb7dd3137 in __assert_fail () from /lib/i386-linux-gnu/libc.so.6                                                                                                                                                                                                           
#5  0x08b8d8cb in maidsafe::rudp::ManagedConnections::Bootstrap(std::vector<boost::asio::ip::basic_endpoint<boost::asio::ip::udp>, std::allocator<boost::asio::ip::basic_endpoint<boost::asio::ip::udp> > > const&, std::function<void (std::string const&)>, std::function<void (maidsafe::NodeId const&)>, maidsafe::NodeId, std::shared_ptr<CryptoPP::InvertibleRSAFunction>, std::shared_ptr<CryptoPP::RSAFunction>, maidsafe::NodeId&, maidsafe::rudp::NatType&, boost::asio::ip::basic_endpoint<boost::asio::ip::udp>) (this=0x925f6e8,                   
    bootstrap_endpoints=..., message_received_functor=..., connection_lost_functor=..., this_node_id=..., private_key=..., public_key=..., chosen_bootstrap_peer=..., nat_type=@0x923fcf0: maidsafe::rudp::kUnknown, local_endpoint=...)                                        
    at /home/steve/projects/MaidSafe/src/rudp/src/maidsafe/rudp/managed_connections.cc:102                                                                                                                                                                                      
#6  0x08a86497 in maidsafe::routing::NetworkUtils::Bootstrap(std::vector<boost::asio::ip::basic_endpoint<boost::asio::ip::udp>, std::allocator<boost::asio::ip::basic_endpoint<boost::asio::ip::udp> > > const&, std::function<void (std::string const&)>, std::function<void (maidsafe::NodeId const&)>, boost::asio::ip::basic_endpoint<boost::asio::ip::udp>) (this=0x923fbc4, bootstrap_endpoints=..., message_received_functor=..., connection_lost_functor=..., local_endpoint=...)                                                                       
    at /home/steve/projects/MaidSafe/src/routing/src/maidsafe/routing/network_utils.cc:105                                                                                                                                                                                      
#7  0x08a6cfec in maidsafe::routing::RoutingPrivate::DoBootstrap (this=0x923f7b8) at /home/steve/projects/MaidSafe/src/routing/src/maidsafe/routing/routing_private.cc:247                                                                                                      
#8  0x08a6ca29 in maidsafe::routing::RoutingPrivate::DoJoin (this=0x923f7b8) at /home/steve/projects/MaidSafe/src/routing/src/maidsafe/routing/routing_private.cc:207                                                                                                           
#9  0x08a7340c in maidsafe::routing::RoutingPrivate::DoReBootstrap (this=0x923f7b8, error_code=...) at /home/steve/projects/MaidSafe/src/routing/src/maidsafe/routing/routing_private.cc:694                                                                                    
#10 0x08a731f4 in operator() (this=0xb1bff120, error_code_local=...) at /home/steve/projects/MaidSafe/src/routing/src/maidsafe/routing/routing_private.cc:685                                                                                                                   
#11 0x08a7797a in boost::asio::detail::binder1<maidsafe::routing::RoutingPrivate::ReBootstrap()::<lambda(boost::system::error_code)>, boost::system::error_code>::operator()(void) (this=0xb1bff120)                                                                            
    at /home/steve/projects/MaidSafe/src/third_party_libs/boost/boost/asio/detail/bind_handler.hpp:46                                                                                                                                                                           
#12 0x08a7788f in boost::asio::asio_handler_invoke<boost::asio::detail::binder1<maidsafe::routing::RoutingPrivate::ReBootstrap()::<lambda(boost::system::error_code)>, boost::system::error_code> >(boost::asio::detail::binder1<maidsafe::routing::RoutingPrivate::ReBootstrap()::<lambda(boost::system::error_code)>, boost::system::error_code>, ...) (function=...) at /home/steve/projects/MaidSafe/src/third_party_libs/boost/boost/asio/handler_invoke_hook.hpp:64                                                                                       
#13 0x08a7780a in boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder1<maidsafe::routing::RoutingPrivate::ReBootstrap()::<lambda(boost::system::error_code)>, boost::system::error_code>, maidsafe::routing::RoutingPrivate::ReBootstrap()::<lambda(boost::system::error_code)> >(boost::asio::detail::binder1<maidsafe::routing::RoutingPrivate::ReBootstrap()::<lambda(boost::system::error_code)>, boost::system::error_code> &, struct {...} &) (function=..., context=...)                                                               
    at /home/steve/projects/MaidSafe/src/third_party_libs/boost/boost/asio/detail/handler_invoke_helpers.hpp:39                                                                                                                                                                 
#14 0x08a773b2 in boost::asio::detail::wait_handler<maidsafe::routing::RoutingPrivate::ReBootstrap()::<lambda(boost::system::error_code)> >::do_complete(boost::asio::detail::io_service_impl *, boost::asio::detail::operation *, const boost::system::error_code &, std::size_t) (owner=0x9235c60, base=0xb1201458) at /home/steve/projects/MaidSafe/src/third_party_libs/boost/boost/asio/detail/wait_handler.hpp:69                                                                                                                                         
#15 0x08b1251b in boost::asio::detail::task_io_service_operation::complete (this=0xb1201458, owner=..., ec=..., bytes_transferred=0) at /home/steve/projects/MaidSafe/src/third_party_libs/boost/boost/asio/detail/task_io_service_operation.hpp:37                             
#16 0x08c48ba2 in boost::asio::detail::task_io_service::do_run_one (this=0x9235c60, lock=..., this_thread=..., ec=...) at /home/steve/projects/MaidSafe/src/third_party_libs/boost/boost/asio/detail/impl/task_io_service.ipp:419                                               
#17 0x08c488eb in boost::asio::detail::task_io_service::run (this=0x9235c60, ec=...) at /home/steve/projects/MaidSafe/src/third_party_libs/boost/boost/asio/detail/impl/task_io_service.ipp:160                                                                                 
#18 0x08c48d58 in boost::asio::io_service::run (this=0x923fb30) at /home/steve/projects/MaidSafe/src/third_party_libs/boost/boost/asio/impl/io_service.ipp:59                                                                                                                   
#19 0x08c4696b in operator() (this=0x925219c) at /home/steve/projects/MaidSafe/src/common/src/maidsafe/common/asio_service.cc:82   
Fraser999 commented 11 years ago

Migrated to https://github.com/maidsafe/MaidSafe-RUDP/issues/10