Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash after transport error. #29

Closed
meeh420 opened this issue Feb 2, 2014 · 7 comments
Closed

Crash after transport error. #29

meeh420 opened this issue Feb 2, 2014 · 7 comments

Comments

@meeh420
Copy link
Contributor

meeh420 commented Feb 2, 2014

I've seen this error sometimes now, finally I catched it while running in gdb.

Unsure where to go from here, but it seems to happen because of an unexpected close of transport.

Phase 1 sent: 288
Phase 2 received: 304
Phase 3 sent: 448
Phase 4 received: 48
NTCP session connected
Msg sent: 16
Msg sent: 656
Msg sent: 560
Exploring new routers ...
Msg sent: 1056
Msg sent: 1056
1 routers deleted
[Thread 0x7ffff1a7b700 (LWP 30903) exited]
Read error: Operation canceled
Transports: close: Bad file descriptor
Read error: Operation canceled

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff227c700 (LWP 30902)]
0x00000000004451a7 in boost::system::error_code::operator=<boost::asio::error::basic_errors> (
    this=<error reading variable: Could not find the frame base for "boost::system::error_code::operator=<boost::asio::error::basic_errors>(boost::asio::error::basic_errors)".>, 
    val=<error reading variable: Could not find the frame base for "boost::system::error_code::operator=<boost::asio::error::basic_errors>(boost::asio::error::basic_errors)".>) at /usr/local/include/boost/system/error_code.hpp:344
344         *this = make_error_code(val);
(gdb) 
(gdb) 
(gdb) bt
#0  0x00000000004451a7 in boost::system::error_code::operator=<boost::asio::error::basic_errors> (
    this=<error reading variable: Could not find the frame base for "boost::system::error_code::operator=<boost::asio::error::basic_errors>(boost::asio::error::basic_errors)".>, 
    val=<error reading variable: Could not find the frame base for "boost::system::error_code::operator=<boost::asio::error::basic_errors>(boost::asio::error::basic_errors)".>) at /usr/local/include/boost/system/error_code.hpp:344
#1  0x000000000043e17a in boost::asio::detail::epoll_reactor::deregister_descriptor (
    this=<error reading variable: Could not find the frame base for "boost::asio::detail::epoll_reactor::deregister_descriptor(int, boost::asio::detail::epoll_reactor::descriptor_state*&, bool)".>, 
    descriptor=<error reading variable: Could not find the frame base for "boost::asio::detail::epoll_reactor::deregister_descriptor(int, boost::asio::detail::epoll_reactor::descriptor_state*&, bool)".>, 
    descriptor_data=<error reading variable: Could not find the frame base for "boost::asio::detail::epoll_reactor::deregister_descriptor(int, boost::asio::detail::epoll_reactor::descriptor_state*&, bool)".>, 
    closing=<error reading variable: Could not find the frame base for "boost::asio::detail::epoll_reactor::deregister_descriptor(int, boost::asio::detail::epoll_reactor::descriptor_state*&, bool)".>) at /usr/local/include/boost/asio/detail/impl/epoll_reactor.ipp:327
#2  0x0000000000440251 in boost::asio::detail::reactive_socket_service_base::close (
    this=<error reading variable: Could not find the frame base for "boost::asio::detail::reactive_socket_service_base::close(boost::asio::detail::reactive_socket_service_base::base_implementation_type&, boost::system::error_code&)".>, 
    impl=<error reading variable: Could not find the frame base for "boost::asio::detail::reactive_socket_service_base::close(boost::asio::detail::reactive_socket_service_base::base_implementation_type&, boost::system::error_code&)".>, 
    ec=<error reading variable: Could not find the frame base for "boost::asio::detail::reactive_socket_service_base::close(boost::asio::detail::reactive_socket_service_base::base_implementation_type&, boost::system::error_code&)".>)
    at /usr/local/include/boost/asio/detail/impl/reactive_socket_service_base.ipp:104
#3  0x000000000044c7b9 in boost::asio::stream_socket_service<boost::asio::ip::tcp>::close (
    this=<error reading variable: Could not find the frame base for "boost::asio::stream_socket_service<boost::asio::ip::tcp>::close(boost::asio::detail::reactive_socket_service<boost::asio::ip::tcp>::implementation_type&, boost::system::error_code&)".>, 
    impl=<error reading variable: Could not find the frame base for "boost::asio::stream_socket_service<boost::asio::ip::tcp>::close(boost::asio::detail::reactive_socket_service<boost::asio::ip::tcp>::implementation_type&, boost::system::error_code&)".>, 
    ec=<error reading variable: Could not find the frame base for "boost::asio::stream_socket_service<boost::asio::ip::tcp>::close(boost::asio::detail::reactive_socket_service<boost::asio::ip::tcp>::implementation_type&, boost::system::error_code&)".>)
    at /usr/local/include/boost/asio/stream_socket_service.hpp:170
#4  0x000000000044826d in boost::asio::basic_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >::close (
    this=<error reading variable: Could not find the frame base for "boost::asio::basic_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >::close()".>) at /usr/local/include/boost/asio/basic_socket.hpp:356
#5  0x0000000000436be4 in i2p::ntcp::NTCPSession::Terminate (
    this=<error reading variable: Could not find the frame base for "i2p::ntcp::NTCPSession::Terminate()".>) at NTCPSession.cpp:52
#6  0x00000000004389cb in i2p::ntcp::NTCPSession::HandleReceived (
    this=<error reading variable: Could not find the frame base for "i2p::ntcp::NTCPSession::HandleReceived(boost::system::error_code const&, unsigned long)".>, 
    ecode=<error reading variable: Could not find the frame base for "i2p::ntcp::NTCPSession::HandleReceived(boost::system::error_code---Type <return> to continue, or q <return> to quit--- 
 const&, unsigned long)".>, 
    bytes_transferred=<error reading variable: Could not find the frame base for "i2p::ntcp::NTCPSession::HandleReceived(boost::system::error_code const&, unsigned long)".>) at NTCPSession.cpp:368
#7  0x0000000000453440 in boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>::operator()
    (
    this=<error reading variable: Could not find the frame base for "boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>::operator()(i2p::ntcp::NTCPSession*, boost::system::error_code const&, unsigned long) const".>, 
    p=<error reading variable: Could not find the frame base for "boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>::operator()(i2p::ntcp::NTCPSession*, boost::system::error_code const&, unsigned long) const".>, 
    a1=<error reading variable: Could not find the frame base for "boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>::operator()(i2p::ntcp::NTCPSession*, boost::system::error_code const&, unsigned long) const".>, 
    a2=<error reading variable: Could not find the frame base for "boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>::operator()(i2p::ntcp::NTCPSession*, boost::system::error_code const&, unsigned long) const".>)
    at /usr/local/include/boost/bind/mem_fn_template.hpp:280
#8  0x0000000000451e14 in boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()>::operator()<boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list2<boost::system::error_code const&, unsigned long const&> > (
    this=<error reading variable: Could not find the frame base for "boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()>::operator()<boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list2<boost::system::error_code const&, unsigned long const&> >(boost::_bi::type<void>, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>&, boost::_bi::list2<boost::system::error_code const&, unsigned long const&>&, int)".>, 
    f=<error reading variable: Could not find the frame base for "boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()>::operator()<boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list2<boost::system::error_code const&, unsigned long const&> >(boost::_bi::type<void>, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>&, boost::_bi::list2<boost::system::error_code const&, unsigned long const&>&, int)".>, 
    a=<error reading variable: Could not find the frame base for "boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()>::operator()<boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list2<boost::system::error_code const&, unsigned long const&> >(boost::_bi::type<void>, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>&, boost::_bi::list2<boost::system::error_code const&, unsigned long const&>&, int)".>) at /usr/local/include/boost/bind/bind.hpp:392
#9  0x000000000045008e in boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> >::operator()<boost::system::error_code, unsigned long> (
    this=<error reading variable: Could not find the frame base for "boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> >::operator()<boost::system::error_code, unsigned long>(boost::system::error_code const&, unsigned long const&)".>, 
    a1=<error reading variable: Could not find the frame base for "boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSess---Type <return> to continue, or q <return> to quit---
ion, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> >::operator()<boost::system::error_code, unsigned long>(boost::system::error_code const&, unsigned long const&)".>, 
    a2=<error reading variable: Could not find the frame base for "boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> >::operator()<boost::system::error_code, unsigned long>(boost::system::error_code const&, unsigned long const&)".>) at /usr/local/include/boost/bind/bind_template.hpp:102
#10 0x0000000000456bc5 in boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> >, boost::system::error_code, unsigned long>::operator() (
    this=<error reading variable: Could not find the frame base for "boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> >, boost::system::error_code, unsigned long>::operator()()".>)
    at /usr/local/include/boost/asio/detail/bind_handler.hpp:127
#11 0x00000000004562c4 in boost::asio::asio_handler_invoke<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> >, boost::system::error_code, unsigned long> > (
    function=<error reading variable: Could not find the frame base for "boost::asio::asio_handler_invoke<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> >, boost::system::error_code, unsigned long> >(boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> >, boost::system::error_code, unsigned long>&, ...)".>) at /usr/local/include/boost/asio/handler_invoke_hook.hpp:69
#12 0x00000000004551e1 in boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> > > (
    function=<error reading variable: Could not find the frame base for "boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> > >(boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> >, boost::system::error_code, unsigned long>&, boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> >&)".>, 
    context=<error reading variable: Could not find the frame base for "boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> >, boost::system::error_code, uns---Type <return> to continue, or q <return> to quit---
igned long>, boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> > >(boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> >, boost::system::error_code, unsigned long>&, boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> >&)".>)
    at /usr/local/include/boost/asio/detail/handler_invoke_helpers.hpp:37
#13 0x0000000000453b7d in boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> > >::do_complete (
    owner=<error reading variable: Could not find the frame base for "boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> > >::do_complete(boost::asio::detail::task_io_service*, boost::asio::detail::task_io_service_operation*, boost::system::error_code const&, unsigned long)".>, 
    base=<error reading variable: Could not find the frame base for "boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, boost::_bi::bind_t<void, boost::_mfi::mf2<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)()> > >::do_complete(boost::asio::detail::task_io_service*, boost::asio::detail::task_io_service_operation*, boost::system::error_code const&, unsigned long)".>)
    at /usr/local/include/boost/asio/detail/reactive_socket_recv_op.hpp:110
#14 0x000000000043cf16 in boost::asio::detail::task_io_service_operation::complete (
    this=<error reading variable: Could not find the frame base for "boost::asio::detail::task_io_service_operation::complete(boost::asio::detail::task_io_service&, boost::system::error_code const&, unsigned long)".>, 
    owner=<error reading variable: Could not find the frame base for "boost::asio::detail::task_io_service_operation::complete(boost::asio::detail::task_io_service&, boost::system::error_code const&, unsigned long)".>, 
    ec=<error reading variable: Could not find the frame base for "boost::asio::detail::task_io_service_operation::complete(boost::asio::detail::task_io_service&, boost::system::error_code const&, unsigned long)".>, 
    bytes_transferred=<error reading variable: Could not find the frame base for "boost::asio::detail::task_io_service_operation::complete(boost::asio::detail::task_io_service&, boost::system::error_code const&, unsigned long)".>)
    at /usr/local/include/boost/asio/detail/task_io_service_operation.hpp:38
#15 0x0000000000463ab5 in boost::asio::detail::task_io_service::do_run_one (
    this=<error reading variable: Could not find the frame base for "boost::asio::detail::task_io_service::do_run_one(boost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex>&, boost::asio::detail::task_io_service_thread_info&, boost::system::error_code const&)".>, 
    lock=<error reading variable: Could not find the frame base for "boost::asio::detail::task_io_service::do_run_one(boost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex>&, boost::asio::detail::task_io_service_thread_info&, boost::system::error_code const&)".>, 
    this_thread=<error reading variable: Could not find the frame base for "boost::asio::detail::task_io_service::do_run_one(boost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex>&, boost::asio::detail::task_io_service_thread_info&, boost::system::error_code const&)".>, 
    ec=<error reading variable: Could not find the frame base for "boost::asio::detail::task_io_service::do_run_one(boost::asio::detai---Type <return> to continue, or q <return> to quit---
l::scoped_lock<boost::asio::detail::posix_mutex>&, boost::asio::detail::task_io_service_thread_info&, boost::system::error_code const&)".>) at /usr/local/include/boost/asio/detail/impl/task_io_service.ipp:384
#16 0x00000000004637f3 in boost::asio::detail::task_io_service::run (
    this=<error reading variable: Could not find the frame base for "boost::asio::detail::task_io_service::run(boost::system::error_code&)".>, 
    ec=<error reading variable: Could not find the frame base for "boost::asio::detail::task_io_service::run(boost::system::error_code&)".>) at /usr/local/include/boost/asio/detail/impl/task_io_service.ipp:153
#17 0x0000000000463d95 in boost::asio::io_service::run (
    this=<error reading variable: Could not find the frame base for "boost::asio::io_service::run()".>)
    at /usr/local/include/boost/asio/impl/io_service.ipp:59
#18 0x0000000000462295 in i2p::Transports::Run (
    this=<error reading variable: Could not find the frame base for "i2p::Transports::Run()".>) at Transports.cpp:85
#19 0x000000000046a7b7 in std::_Mem_fn<void (i2p::Transports::*)()>::operator() (
    this=<error reading variable: Could not find the frame base for "std::_Mem_fn<void (i2p::Transports::*)()>::operator()(i2p::Transports*) const".>, 
    __object=<error reading variable: Could not find the frame base for "std::_Mem_fn<void (i2p::Transports::*)()>::operator()(i2p::Transports*) const".>) at /usr/include/c++/4.7/functional:554
#20 0x000000000046a716 in std::_Bind<std::_Mem_fn<void (i2p::Transports::*)()> (i2p::Transports*)>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) (
    this=<error reading variable: Could not find the frame base for "std::_Bind<std::_Mem_fn<void (i2p::Transports::*)()> (i2p::Transports*)>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>)".>, 
    __args=<error reading variable: Could not find the frame base for "std::_Bind<std::_Mem_fn<void (i2p::Transports::*)()> (i2p::Transports*)>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>)".>) at /usr/include/c++/4.7/functional:1156
#21 0x000000000046a688 in std::_Bind<std::_Mem_fn<void (i2p::Transports::*)()> (i2p::Transports*)>::operator()<, void>() (
    this=<error reading variable: Could not find the frame base for "std::_Bind<std::_Mem_fn<void (i2p::Transports::*)()> (i2p::Transports*)>::operator()<, void>()".>) at /usr/include/c++/4.7/functional:1215
#22 0x000000000046a614 in std::_Bind_simple<std::_Bind<std::_Mem_fn<void (i2p::Transports::*)()> (i2p::Transports*)> ()>::_M_invoke<>(std::_Index_tuple<>) (
    this=<error reading variable: Could not find the frame base for "std::_Bind_simple<std::_Bind<std::_Mem_fn<void (i2p::Transports::*)()> (i2p::Transports*)> ()>::_M_invoke<>(std::_Index_tuple<>)".>) at /usr/include/c++/4.7/functional:1598
#23 0x000000000046a561 in std::_Bind_simple<std::_Bind<std::_Mem_fn<void (i2p::Transports::*)()> (i2p::Transports*)> ()>::operator()() (
    this=<error reading variable: Could not find the frame base for "std::_Bind_simple<std::_Bind<std::_Mem_fn<void (i2p::Transports::*)()> (i2p::Transports*)> ()>::operator()()".>) at /usr/include/c++/4.7/functional:1586
#24 0x000000000046a4dc in std::thread::_Impl<std::_Bind_simple<std::_Bind<std::_Mem_fn<void (i2p::Transports::*)()> (i2p::Transports*)> ()> >::_M_run() (
    this=<error reading variable: Could not find the frame base for "std::thread::_Impl<std::_Bind_simple<std::_Bind<std::_Mem_fn<void (i2p::Transports::*)()> (i2p::Transports*)> ()> >::_M_run()".>) at /usr/include/c++/4.7/thread:115
#25 0x00007ffff68cd9f0 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#26 0x00007ffff6b25f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#27 0x00007ffff6336a0d in clone () from /lib/x86_64-linux-gnu/libc.so.6
@orignal
Copy link
Contributor

orignal commented Feb 2, 2014

The problem is here
#5 0x0000000000436be4 in i2p::ntcp::NTCPSession::Terminate (

It seems it gets called twice as result it tries to destroy already destroyed socket.
It happens because all NTCP socket sit on the same io_service. Need to review termination procedure carefully.

You might try to comment line
delete this;
in the NTCPSession.cpp
It will stop crashing but start producing memory leak.
Generally speaking using 'delete this' is bad practice, better to implement proper connection manager.

@orignal
Copy link
Contributor

orignal commented Feb 3, 2014

I have found the problem NTCPSession::Send produces async_write while termination event is pending. Will fix it.

@orignal
Copy link
Contributor

orignal commented Feb 3, 2014

Supposed to be fixed now

@meeh420
Copy link
Contributor Author

meeh420 commented Feb 3, 2014

I will try to recreate the error. It usually happens if I let it run for some hours.

@meeh420
Copy link
Contributor Author

meeh420 commented Feb 4, 2014

Hmm, still crashes, but now it's the Log object.

Read error: Operation canceled
NTCP session terminated
Exploring new routers ...
Msg sent: 1056
Msg sent: 1056
[Thread 0x7ffff1a7b700 (LWP 11790) exited]
Read error: Operation canceled
Transports: close: Bad file descriptor
[Thread 0x7ffff227c700 (LWP 11789) exited]
Exploring new routers ...
[Thread 0x7ffff2a7d700 (LWP 11788) exited]
terminate called without an active exception
[Thread 0x7ffff327e700 (LWP 11752) exited]

Program received signal SIGABRT, Aborted.
0x00007ffff6273037 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff6273037 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff6276698 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff687be8d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff6879f76 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff6879fa3 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x0000000000462ca1 in std::thread::~thread (this=0x74ba08 <g_Log+168>, __in_chrg=<optimized out>)
    at /usr/include/c++/4.7/thread:141
#6  0x0000000000494d58 in i2p::util::MsgQueue<LogMsg>::~MsgQueue (this=0x74b960 <g_Log>, __in_chrg=<optimized out>) at Queue.h:97
#7  0x00007ffff6278121 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x00007ffff62781a5 in exit () from /lib/x86_64-linux-gnu/libc.so.6
#9  0x00007ffff625deac in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000433869 in _start ()

@orignal
Copy link
Contributor

orignal commented Feb 4, 2014

Lol. That's what it is
std::this_thread::sleep_for (std::chrono::seconds(10000));
You have reached termination part, e.g. it didn't crash it tried to finish.
So I guess it right time to implement daemonization and catch signals rather than sleep.

@meeh420
Copy link
Contributor Author

meeh420 commented Feb 4, 2014

Ok, I can do that one. Better if you do the async or some other task that is currently too heavy for me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants