Bug #763

Socket server dies on socket client errors

Added by J. Wienke over 12 years ago. Updated about 12 years ago.

Status:ResolvedStart date:12/14/2011
Priority:NormalDue date:
Assignee:J. Moringen% Done:

100%

Category:C++
Target version:0.5

Description

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
  what():  Connection reset by peer

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff3165700 (LWP 5633)]
0x00007ffff502aa75 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
        in ../nptl/sysdeps/unix/sysv/linux/raise.c
(gdb) bt
#0  0x00007ffff502aa75 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff502e5c0 in *__GI_abort () at abort.c:92
#2  0x00007ffff58e08e5 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
#3  0x00007ffff58ded16 in ?? () from /usr/lib/libstdc++.so.6
#4  0x00007ffff58ded43 in std::terminate() () from /usr/lib/libstdc++.so.6
#5  0x00007ffff58dee3e in __cxa_throw () from /usr/lib/libstdc++.so.6
#6  0x00007ffff77fb00b in boost::throw_exception<boost::system::system_error> (e=...) at /usr/include/boost/throw_exception.hpp:64
#7  0x00007ffff77f9f3b in boost::asio::detail::throw_error (err=...) at /usr/include/boost/asio/detail/throw_error.hpp:36
#8  0x00007ffff77fb875 in boost::asio::write<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> >, boost::asio::const_buffers_1> (s=..., buffers=...)
    at /usr/include/boost/asio/impl/write.ipp:58
#9  0x00007ffff77f6e8a in rsb::transport::socket::BusConnection::sendEvent (this=0x68d690, event=..., wireSchema=...) at /homes/jwienke/workspace/RSB/src/rsb/transport/socket/BusConnection.cpp:108
#10 0x00007ffff78161a3 in rsb::transport::socket::BusServer::handleIncoming (this=0x686d50, event=..., connection=...) at /homes/jwienke/workspace/RSB/src/rsb/transport/socket/BusServer.cpp:87
#11 0x00007ffff77f7ba3 in rsb::transport::socket::BusConnection::handleReadBody (this=0x687fd0, error=..., bytesTransferred=153747, expected=153747) at /homes/jwienke/workspace/RSB/src/rsb/transport/socket/BusConnection.cpp:196
#12 0x00007ffff780b76c in boost::_mfi::mf3<void, rsb::transport::socket::BusConnection, boost::system::error_code const&, unsigned long, unsigned long>::call<boost::shared_ptr<rsb::transport::socket::BusConnection>, boost::system::error_code const, unsigned long, unsigned long> (this=0x7ffff3164a20, u=..., b1=..., b2=@0x7ffff31646a0, b3=@0x7ffff3164698) at /usr/include/boost/bind/mem_fn_template.hpp:375
#13 0x00007ffff780b3b4 in boost::_mfi::mf3<void, rsb::transport::socket::BusConnection, boost::system::error_code const&, unsigned long, unsigned long>::operator()<boost::shared_ptr<rsb::transport::socket::BusConnection> > (
    this=0x7ffff3164a20, u=..., a1=..., a2=153747, a3=153747) at /usr/include/boost/bind/mem_fn_template.hpp:389
#14 0x00007ffff780c19b in boost::_bi::list4<boost::_bi::value<boost::shared_ptr<rsb::transport::socket::BusConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<unsigned int> >::operator()<boost::_mfi::mf3<void, rsb::transport::socket::BusConnection, boost::system::error_code const&, unsigned long, unsigned long>, boost::_bi::list2<boost::system::error_code const&, unsigned long&> > (this=0x7ffff3164a30, f=..., a=...) at /usr/include/boost/bind/bind.hpp:450
#15 0x00007ffff780bffa in boost::_bi::bind_t<void, boost::_mfi::mf3<void, rsb::transport::socket::BusConnection, boost::system::error_code const&, unsigned long, unsigned long>, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<rsb::transport::socket::BusConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<unsigned int> > >::operator()<boost::system::error_code, unsigned long> (this=0x7ffff3164a20, a1=..., a2=@0x7ffff3164a10)
    at /usr/include/boost/bind/bind_template.hpp:76
#16 0x00007ffff780be19 in boost::asio::detail::read_handler<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, rsb::transport::socket::BusConnection, boost::system::error_code const&, unsigned long, unsigned long>, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<rsb::transport::socket::BusConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<unsigned int> > > >::operator() (this=0x7ffff31649d0, ec=..., bytes_transferred=22675) at /usr/include/boost/asio/impl/read.ipp:154
#17 0x00007ffff780c032 in boost::asio::detail::binder2<boost::asio::detail::read_handler<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, rsb::transport::socket::BusConnection, boost::system::error_code const&, unsigned long, unsigned long>, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<rsb::transport::socket::BusConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<unsigned int> > > >, boost::system::error_code, unsigned long>::operator() (this=0x7ffff31649d0)
    at /usr/include/boost/asio/detail/bind_handler.hpp:96
#18 0x00007ffff780bf19 in boost::asio::asio_handler_invoke<boost::asio::detail::binder2<boost::asio::detail::read_handler<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, rsb::transport::socket::BusConnection, boost::system::error_code const&, unsigned long, unsigned long>, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<rsb::transport::socket::BusConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<unsigned int> > > >, boost::system::error_code, unsigned long> > (function=...)
    at /usr/include/boost/asio/handler_invoke_hook.hpp:62
#19 0x00007ffff780ba9b in boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder2<boost::asio::detail::read_handler<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, rsb::transport::socket::BusConnection, boost::system::error_code const&, unsigned long, unsigned long>, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<rsb::transport::socket::BusConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<unsigned int> > > >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf3<void, rsb::transport::socket::BusConnection, boost::system::error_code const&, unsigned long, unsigned long>, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<rsb::transport::socket::BusConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<unsigned int> > > > (function=..., context=0x7ffff3164b60) at /usr/include/boost/asio/detail/handler_invoke_helpers.hpp:39
#20 0x00007ffff780b89c in boost::asio::detail::asio_handler_invoke<boost::asio::detail::binder2<boost::asio::detail::read_handler<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, rsb::transport::socket::BusConnection, boost::system::error_code const&, unsigned long, unsigned long>, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<rsb::transport::socket::BusConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<unsigned int> > > >, 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, rsb::transport::socket::BusConnection, boost::system::error_code const&, unsigned long, unsigned long>, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<rsb::transport::socket::BusConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<unsigned int> > > > (function=..., 
    this_handler=0x7ffff3164b10) at /usr/include/boost/asio/impl/read.ipp:197
#21 0x00007ffff780b4fe in boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder2<boost::asio::detail::read_handler<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, rsb::transport::socket::BusConnection, boost::system::error_code const&, unsigned long, unsigned long>, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<rsb::transport::socket::BusConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<unsigned int> > > >, boost::system::error_code, unsigned long>, boost::asio::detail::read_handler<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, rsb::transport::socket::BusConnection, boost::system::error_code const&, unsigned long, unsigned long>, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<rsb::transport::socket::BusConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<unsigned int> > > > > (function=..., context=0x7ffff3164b10) at /usr/include/boost/asio/detail/handler_invoke_helpers.hpp:39
#22 0x00007ffff780af41 in boost::asio::detail::asio_handler_invoke<boost::asio::detail::binder2<boost::asio::detail::read_handler<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, rsb::transport::socket::BusConnection, boost::system::error_code const&, unsigned long, unsigned long>, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<rsb::transport::socket::BusConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<unsigned int> > > >, boost::system::error_code, unsigned long>, boost::asio::detail::read_handler<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, rsb::transport::socket::BusConnection, boost::system::error_code const&, unsigned long, unsigned long>, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<rsb::transport::socket::BusConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<unsigned int> > > >, boost::system::error_code, unsigned long> (function=..., this_handler=0x7ffff3164b10) at /usr/include/boost/asio/detail/bind_handler.hpp:130
#23 0x00007ffff780abd2 in boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder2<boost::asio::detail::read_handler<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, rsb::transport::socket::BusConnection, boost::system::error_code const&, unsigned long, unsigned long>, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<rsb::transport::socket::BusConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<unsigned int> > > >, boost::system::error_code, unsigned long>, boost::asio::detail::binder2<boost::asio::detail::read_handler<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, rsb::transport::socket::BusConnection, boost::system::error_code const&, unsigned long, unsigned long>, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<rsb::transport::socket::BusConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<unsigned int> > > >, boost::system::error_code, unsigned long> > (function=..., context=0x7ffff3164b10) at /usr/include/boost/asio/detail/handler_invoke_helpers.hpp:39
#24 0x00007ffff780a711 in boost::asio::detail::handler_queue::handler_wrapper<boost::asio::detail::binder2<boost::asio::detail::read_handler<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, rsb::transport::socket::BusConnection, boost::system::error_code const&, unsigned long, unsigned long>, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<rsb::transport::socket::BusConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)(), boost::_bi::value<unsigned int> > > >, boost::system::error_code, unsigned long> >::do_call (base=0x7fffe80008b0)
---Type <return> to continue, or q <return> to quit---
    at /usr/include/boost/asio/detail/handler_queue.hpp:192
#25 0x00007ffff78245e3 in boost::asio::detail::handler_queue::handler::invoke (this=0x7fffe80008b0) at /usr/include/boost/asio/detail/handler_queue.hpp:39
#26 0x00007ffff7826f49 in boost::asio::detail::task_io_service<boost::asio::detail::epoll_reactor<false> >::do_one (this=0x6869f0, lock=..., this_idle_thread=0x7ffff3164cf0, ec=...) at /usr/include/boost/asio/detail/task_io_service.hpp:268
#27 0x00007ffff7825467 in boost::asio::detail::task_io_service<boost::asio::detail::epoll_reactor<false> >::run (this=0x6869f0, ec=...) at /usr/include/boost/asio/detail/task_io_service.hpp:103
#28 0x00007ffff7824f07 in boost::asio::io_service::run (this=0x685eb8) at /usr/include/boost/asio/impl/io_service.ipp:58
#29 0x00007ffff7831e3f in boost::_mfi::mf0<unsigned long, boost::asio::io_service>::operator() (this=0x686bd8, p=0x685eb8) at /usr/include/boost/bind/mem_fn_template.hpp:49
#30 0x00007ffff7831daf in boost::_bi::list1<boost::_bi::value<boost::asio::io_service*> >::operator()<unsigned long, boost::_mfi::mf0<unsigned long, boost::asio::io_service>, boost::_bi::list0> (this=0x686be8, f=..., a=...)
    at /usr/include/boost/bind/bind.hpp:236
#31 0x00007ffff7831d5b in boost::_bi::bind_t<unsigned long, boost::_mfi::mf0<unsigned long, boost::asio::io_service>, boost::_bi::list1<boost::_bi::value<boost::asio::io_service*> > >::operator() (this=0x686bd8)
    at /usr/include/boost/bind/bind_template.hpp:20
#32 0x00007ffff7831c7a in boost::detail::thread_data<boost::_bi::bind_t<unsigned long, boost::_mfi::mf0<unsigned long, boost::asio::io_service>, boost::_bi::list1<boost::_bi::value<boost::asio::io_service*> > > >::run (this=0x686ad0)
    at /usr/include/boost/thread/detail/thread.hpp:56
#33 0x00007ffff6ad0b70 in thread_proxy (param=<value optimized out>) at libs/thread/src/pthread/thread.cpp:130
#34 0x00007ffff5d7c9ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#35 0x00007ffff50dd70d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#36 0x0000000000000000 in ?? ()

Happened with a logger that was not configured for socket communication (old version):

terminate called after throwing an instance of 'rsc::runtime::NoSuchObject'
  what():  No converter for wire-schema or data-type `.rsb.protocol.collections.EventsByScopeMap'.
Available converters: {.*: *rsb::converter::ByteArrayConverter[wireType = std::string, wireSchema = .*, dataType = bytearray] at 0x242f7a0
bool: *rsb::converter::BoolConverter[wireType = std::string, wireSchema = bool, dataType = bool] at 0x242f400
uint64: *rsb::converter::Uint64Converter[wireType = std::string, wireSchema = uint64, dataType = unsigned long] at 0x242f920
utf-8-string: *rsb::converter::StringConverter[wireType = std::string, wireSchema = utf-8-string, dataType = std::string] at 0x242f860
void: *rsb::converter::VoidConverter[wireType = std::string, wireSchema = void, dataType = void] at 0x242f9e0}
Aborted

Commits needed in trunk and 0.5 branch.

Associated revisions

Revision 9347497f
Added by J. Moringen about 12 years ago

backported fixes for cpp socket transport crashes (r3389, 3392); (hopefully) fixes #763

History

#1 Updated by J. Moringen about 12 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset r3394.

Also available in: Atom PDF