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

Another crash related to transports #30

Closed
meeh420 opened this issue Feb 3, 2014 · 3 comments
Closed

Another crash related to transports #30

meeh420 opened this issue Feb 3, 2014 · 3 comments

Comments

@meeh420
Copy link
Contributor

meeh420 commented Feb 3, 2014

I found another crash that seems related to transports, but does not seem to be in relation to #29 (gdb backtrace at bottom)

Any clues?

Another note (not related): Seems like if an routerInfo contains a domain instead of an IP, i2pd will get an unexpected address, but this does not crash it.

Connect error: No route to host
NTCP session terminated
Connect error: No route to host
NTCP session terminated
Connect error: Connection timed out
NTCP session terminated
Exploring new routers ...
Msg sent: 1056
Msg sent: 1056
Connect error: Connection timed out
NTCP session terminated
Connect error: Connection timed out
NTCP session terminated
Connect error: Connection timed out
NTCP session terminated
No activity fo 60 seconds
Read error: Operation canceled
NTCP session terminated
Couldn't send msg: Operation canceled
i2p: /usr/include/cryptopp/secblock.h:197: void CryptoPP::FixedSizeAllocatorWithCleanup<T, S, A, T_Align16>::deallocate(void*, CryptoPP::FixedSizeAllocatorWithCleanup<T, S, A, T_Align16>::size_type) [with T = unsigned int; long unsigned int S = 60ul; A = CryptoPP::NullAllocator<unsigned int>; bool T_Align16 = true; CryptoPP::FixedSizeAllocatorWithCleanup<T, S, A, T_Align16>::size_type = long unsigned int]: Assertion `m_allocated' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff227c700 (LWP 7412)]
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  0x00007ffff626be03 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff626beb2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x000000000044fd75 in CryptoPP::FixedSizeAllocatorWithCleanup<unsigned int, 60ul, CryptoPP::NullAllocator<unsigned int>, true>::deallocate (this=0x7fffe801f988, p=0x7fffe801f990, n=60) at /usr/include/cryptopp/secblock.h:197
#5  0x000000000044c651 in CryptoPP::SecBlock<unsigned int, CryptoPP::FixedSizeAllocatorWithCleanup<unsigned int, 60ul, CryptoPP::NullAllocator<unsigned int>, true> >::~SecBlock (this=0x7fffe801f988, __in_chrg=<optimized out>) at /usr/include/cryptopp/secblock.h:261
#6  0x0000000000447098 in CryptoPP::FixedSizeSecBlock<unsigned int, 60u, CryptoPP::FixedSizeAllocatorWithCleanup<unsigned int, 60ul, CryptoPP::NullAllocator<unsigned int>, true> >::~FixedSizeSecBlock (this=0x7fffe801f988, __in_chrg=<optimized out>)
    at /usr/include/cryptopp/secblock.h:422
#7  0x00000000004470b2 in CryptoPP::FixedSizeAlignedSecBlock<unsigned int, 60u, true>::~FixedSizeAlignedSecBlock (
    this=0x7fffe801f988, __in_chrg=<optimized out>) at /usr/include/cryptopp/secblock.h:429
#8  0x00000000004470e8 in CryptoPP::Rijndael::Base::~Base (this=0x7fffe801f970, __in_chrg=<optimized out>)
    at /usr/include/cryptopp/rijndael.h:21
#9  0x0000000000447815 in CryptoPP::Rijndael::Enc::~Enc (this=0x7fffe801f970, __in_chrg=<optimized out>)
    at /usr/include/cryptopp/rijndael.h:40
#10 0x0000000000447893 in CryptoPP::ClonableImpl<CryptoPP::BlockCipherFinal<(CryptoPP::CipherDir)0, CryptoPP::Rijndael::Enc>, CryptoPP::Rijndael::Enc>::~ClonableImpl (this=0x7fffe801f970, __in_chrg=<optimized out>) at /usr/include/cryptopp/simple.h:16
#11 0x0000000000447911 in CryptoPP::BlockCipherFinal<(CryptoPP::CipherDir)0, CryptoPP::Rijndael::Enc>::~BlockCipherFinal (
    this=0x7fffe801f970, __in_chrg=<optimized out>) at /usr/include/cryptopp/seckey.h:151
#12 0x0000000000447992 in CryptoPP::ObjectHolder<CryptoPP::BlockCipherFinal<(CryptoPP::CipherDir)0, CryptoPP::Rijndael::Enc> >::~ObjectHolder (this=0x7fffe801f970, __in_chrg=<optimized out>) at /usr/include/cryptopp/misc.h:83
#13 0x0000000000457a00 in CryptoPP::CipherModeFinalTemplate_CipherHolder<CryptoPP::BlockCipherFinal<(CryptoPP::CipherDir)0, CryptoPP::Rijndael::Enc>, CryptoPP::CBC_Encryption>::~CipherModeFinalTemplate_CipherHolder (this=0x7fffe801f928, __in_chrg=<optimized out>)
    at /usr/include/cryptopp/modes.h:248
#14 0x0000000000442334 in i2p::ntcp::NTCPSession::~NTCPSession (this=0x7fffe801f730, __in_chrg=<optimized out>) at NTCPSession.h:69
#15 0x00000000004423e6 in i2p::ntcp::NTCPSession::~NTCPSession (this=0x7fffe801f730, __in_chrg=<optimized out>) at NTCPSession.h:69
#16 0x0000000000436c97 in i2p::ntcp::NTCPSession::Terminate (this=0x7fffe801f730) at NTCPSession.cpp:58
#17 0x0000000000438f08 in i2p::ntcp::NTCPSession::HandleSent (this=0x7fffe801f730, ecode=..., bytes_transferred=0, 
    msg=0x7fffdc08a430) at NTCPSession.cpp:477
#18 0x0000000000453e97 in boost::_mfi::mf3<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long, i2p::I2NPMessage*>::operator() (this=0x7ffff227bb08, p=0x7fffe801f730, a1=..., a2=0, a3=0x7fffdc08a430)
    at /usr/local/include/boost/bind/mem_fn_template.hpp:393
#19 0x0000000000452287 in boost::_bi::list4<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<i2p::I2NPMessage*> >::operator()<boost::_mfi::mf3<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long, i2p::I2NPMessage*>, boost::_bi::list2<boost::system::error_code const&, unsigned long const&> > (this=0x7ffff227bb18, 
    f=..., a=...) at /usr/local/include/boost/bind/bind.hpp:457
#20 0x00000000004505a6 in boost::_bi::bind_t<void, boost::_mfi::mf3<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long, i2p::I2NPMessage*>, boost::_bi::list4<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)(---Type <return> to continue, or q <return> to quit---
), boost::_bi::value<i2p::I2NPMessage*> > >::operator()<boost::system::error_code, unsigned long> (this=0x7ffff227bb08, a1=..., 
    a2=@0x7ffff227bb00: 0) at /usr/local/include/boost/bind/bind_template.hpp:102
#21 0x000000000044da68 in boost::asio::detail::write_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >, boost::asio::mutable_buffers_1, boost::asio::detail::transfer_all_t, boost::_bi::bind_t<void, boost::_mfi::mf3<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long, i2p::I2NPMessage*>, boost::_bi::list4<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<i2p::I2NPMessage*> > > >::operator() (this=0x7ffff227bae0, ec=..., bytes_transferred=0, start=0) at /usr/local/include/boost/asio/impl/write.hpp:269
#22 0x0000000000457720 in boost::asio::detail::binder2<boost::asio::detail::write_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >, boost::asio::mutable_buffers_1, boost::asio::detail::transfer_all_t, boost::_bi::bind_t<void, boost::_mfi::mf3<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long, i2p::I2NPMessage*>, boost::_bi::list4<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<i2p::I2NPMessage*> > > >, boost::system::error_code, unsigned long>::operator() (this=0x7ffff227bae0)
    at /usr/local/include/boost/asio/detail/bind_handler.hpp:127
#23 0x0000000000457517 in boost::asio::asio_handler_invoke<boost::asio::detail::binder2<boost::asio::detail::write_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >, boost::asio::mutable_buffers_1, boost::asio::detail::transfer_all_t, boost::_bi::bind_t<void, boost::_mfi::mf3<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long, i2p::I2NPMessage*>, boost::_bi::list4<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<i2p::I2NPMessage*> > > >, boost::system::error_code, unsigned long> > (function=...)
    at /usr/local/include/boost/asio/handler_invoke_hook.hpp:69
#24 0x000000000045724e in boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder2<boost::asio::detail::write_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >, boost::asio::mutable_buffers_1, boost::asio::detail::transfer_all_t, boost::_bi::bind_t<void, boost::_mfi::mf3<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long, i2p::I2NPMessage*>, boost::_bi::list4<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<i2p::I2NPMessage*> > > >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf3<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long, i2p::I2NPMessage*>, boost::_bi::list4<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<i2p::I2NPMessage*> > > > (
    function=..., context=...) at /usr/local/include/boost/asio/detail/handler_invoke_helpers.hpp:37
#25 0x0000000000456fdd in boost::asio::detail::asio_handler_invoke<boost::asio::detail::binder2<boost::asio::detail::write_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >, boost::asio::mutable_buffers_1, boost::asio::detail::transfer_all_t, boost::_bi::bind_t<void, boost::_mfi::mf3<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long, i2p::I2NPMessage*>, boost::_bi::list4<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<i2p::I2NPMessage*> > > >, boost::system::error_code, unsigned long>, boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >, boost::asio::mutable_buffers_1, boost::asio::detail::transfer_all_t, boost::_bi::bind_t<void, boost::_mfi::mf3<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long, i2p::I2NPMessage*>, boost::_bi::list4<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<i2p::I2NPMessage*> > > > (function=..., this_handler=0x7ffff227bae0)
    at /usr/local/include/boost/asio/impl/write.hpp:565
#26 0x0000000000456cdd in boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder2<boost::asio::detail::write_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >, boost::asio::mutable_buffers_1, boost::asio::detail::transfer_all_t, boost::_bi::bind_t<void, boost::_mfi::mf3<void, i2p::ntcp::NTCPSession, boost::system::erro---Type <return> to continue, or q <return> to quit---
r_code const&, unsigned long, i2p::I2NPMessage*>, boost::_bi::list4<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<i2p::I2NPMessage*> > > >, boost::system::error_code, unsigned long>, boost::asio::detail::write_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >, boost::asio::mutable_buffers_1, boost::asio::detail::transfer_all_t, boost::_bi::bind_t<void, boost::_mfi::mf3<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long, i2p::I2NPMessage*>, boost::_bi::list4<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<i2p::I2NPMessage*> > > > > (function=..., context=...)
    at /usr/local/include/boost/asio/detail/handler_invoke_helpers.hpp:37
#27 0x000000000045651b in boost::asio::detail::reactive_socket_send_op<boost::asio::mutable_buffers_1, boost::asio::detail::write_op<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >, boost::asio::mutable_buffers_1, boost::asio::detail::transfer_all_t, boost::_bi::bind_t<void, boost::_mfi::mf3<void, i2p::ntcp::NTCPSession, boost::system::error_code const&, unsigned long, i2p::I2NPMessage*>, boost::_bi::list4<boost::_bi::value<i2p::ntcp::NTCPSession*>, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<i2p::I2NPMessage*> > > > >::do_complete (owner=0x74c680, base=0x7fffe81419d0)
    at /usr/local/include/boost/asio/detail/reactive_socket_send_op.hpp:107
#28 0x000000000043cf16 in boost::asio::detail::task_io_service_operation::complete (this=0x7fffe81419d0, owner=..., ec=..., 
    bytes_transferred=0) at /usr/local/include/boost/asio/detail/task_io_service_operation.hpp:38
#29 0x0000000000463bcd in boost::asio::detail::task_io_service::do_run_one (this=0x74c680, lock=..., this_thread=..., ec=...)
    at /usr/local/include/boost/asio/detail/impl/task_io_service.ipp:384
#30 0x000000000046390b in boost::asio::detail::task_io_service::run (this=0x74c680, ec=...)
    at /usr/local/include/boost/asio/detail/impl/task_io_service.ipp:153
#31 0x0000000000463ead in boost::asio::io_service::run (this=0x74a330 <i2p::transports+16>)
    at /usr/local/include/boost/asio/impl/io_service.ipp:59
#32 0x00000000004623ad in i2p::Transports::Run (this=0x74a320 <i2p::transports>) at Transports.cpp:85
#33 0x000000000046a8cf in std::_Mem_fn<void (i2p::Transports::*)()>::operator() (this=0xd8d8f0, __object=0x74a320 <i2p::transports>)
    at /usr/include/c++/4.7/functional:554
#34 0x000000000046a82e in std::_Bind<std::_Mem_fn<void (i2p::Transports::*)()> (i2p::Transports*)>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) (this=0xd8d8f0, __args=...) at /usr/include/c++/4.7/functional:1156
#35 0x000000000046a7a0 in std::_Bind<std::_Mem_fn<void (i2p::Transports::*)()> (i2p::Transports*)>::operator()<, void>() (
    this=0xd8d8f0) at /usr/include/c++/4.7/functional:1215
#36 0x000000000046a72c in std::_Bind_simple<std::_Bind<std::_Mem_fn<void (i2p::Transports::*)()> (i2p::Transports*)> ()>::_M_invoke<>(std::_Index_tuple<>) (this=0xd8d8f0) at /usr/include/c++/4.7/functional:1598
#37 0x000000000046a679 in std::_Bind_simple<std::_Bind<std::_Mem_fn<void (i2p::Transports::*)()> (i2p::Transports*)> ()>::operator()() (this=0xd8d8f0) at /usr/include/c++/4.7/functional:1586
#38 0x000000000046a5f4 in std::thread::_Impl<std::_Bind_simple<std::_Bind<std::_Mem_fn<void (i2p::Transports::*)()> (i2p::Transports*)> ()> >::_M_run() (this=0xd8d8d8) at /usr/include/c++/4.7/thread:115
#39 0x00007ffff68cd9f0 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#40 0x00007ffff6b25f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#41 0x00007ffff6336a0d in clone () from /lib/x86_64-linux-gnu/libc.so.6
@meeh420
Copy link
Contributor Author

meeh420 commented Feb 3, 2014

Or maybe it's related to #29 anyway;

#14 0x0000000000442334 in i2p::ntcp::NTCPSession::~NTCPSession (this=0x7fffe801f730, __in_chrg=<optimized out>) at NTCPSession.h:69
#15 0x00000000004423e6 in i2p::ntcp::NTCPSession::~NTCPSession (this=0x7fffe801f730, __in_chrg=<optimized out>) at NTCPSession.h:69
#16 0x0000000000436c97 in i2p::ntcp::NTCPSession::Terminate (this=0x7fffe801f730) at NTCPSession.cpp:58
#17 0x0000000000438f08 in i2p::ntcp::NTCPSession::HandleSent (this=0x7fffe801f730, ecode=..., bytes_transferred=0, 
    msg=0x7fffdc08a430) at NTCPSession.cpp:477

@orignal
Copy link
Contributor

orignal commented Feb 3, 2014

It handles domain this way intentionally, the reason of it, resolver might work too long. Later one I will add proper implementation, but exclude such addresses for now.

@meeh420
Copy link
Contributor Author

meeh420 commented Feb 3, 2014

Ok, not a bug then :)

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