Bug #1116

Socket-based transport crashes when second client connects

Added by J. Wienke over 11 years ago.

Status:ResolvedStart date:12/13/2011
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:C++ Tools
Target version:-

Description

Scenario:
  • transport.socket.server = auto
  • Components
    1. rsb-time-sync starts first (becomes server due to auto mode)
    2. First rsbvideosink GStreamer plugin (first clients
    3. Another rsbvideosink GStreamer plugin (second client)
  • Second client causes error described below
cpeters@arroyo:/vol/taped/tebra_system/externals/bin$ gdb --args
./rsb_timesync --outscope /tebra/video/sync --primscope /tebra/video/overhead --supscope /tebra/video/front --timestamp rsb::send --strategy approxt
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying" 
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
/vol/taped/tebra_system/externals/bin/rsb_timesync...(no debugging
symbols found)...done.
(gdb) r
Starting program: /vol/taped/tebra_system/externals/bin/rsb_timesync
--outscope /tebra/video/sync --primscope /tebra/video/overhead
--supscope /tebra/video/front --timestamp rsb::send --strategy approxt
[Thread debugging using libthread_db enabled]
[New Thread 0xb62cfb70 (LWP 15568)]
[New Thread 0xb5aceb70 (LWP 15569)]
[New Thread 0xb52cdb70 (LWP 15570)]
[New Thread 0xb4accb70 (LWP 15571)]
[New Thread 0xb42cbb70 (LWP 15572)]
[New Thread 0xb3acab70 (LWP 15573)]
[New Thread 0xb32c9b70 (LWP 15574)]
[New Thread 0xb2ac8b70 (LWP 15575)]
[New Thread 0xb22c7b70 (LWP 15576)]
[New Thread 0xb1ac6b70 (LWP 15577)]
[New Thread 0xb10ffb70 (LWP 15578)]
rsb_timesync: /usr/include/boost/smart_ptr/shared_ptr.hpp:412: typename
boost::detail::shared_ptr_traits<T>::reference boost::shared_ptr<
<template-parameter-1-1> >::operator*() const [with T =
std::basic_string<char, std::char_traits<char>, std::allocator<char> >]:
Assertion `px != 0' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb42cbb70 (LWP 15572)]
0xb7fe2424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fe2424 in __kernel_vsyscall ()
#1  0xb7576651 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0xb7579a82 in *__GI_abort () at abort.c:92 
#3  0xb756f718 in *__GI___assert_fail (assertion=0xb7e89384 "px != 0", file=0xb7e89358 "/usr/include/boost/smart_ptr/shared_ptr.hpp", line=412, function=0xb7e893c0 "typename boost::detail::shared_ptr_traits<T>::reference boost::shared_ptr< <template-parameter-1-1> >::operator*() const [with T = std::basic_string<char, std::char_traits<char>, std::allocator<char> "...) at assert.c:81
#4  0xb7dc5c77 in boost::shared_ptr<std::string>::operator* (this=0x80bdeb4) at /usr/include/boost/smart_ptr/shared_ptr.hpp:412
#5  0xb7dc5803 in rsb::converter::SchemaAndByteArrayConverter::serialize (this=0x80b7430, data=..., wire=...) at /homes/cpeters/workspace/gar-installer/rsx/rsb/work/main.d/rsb-svn/src/rsb/converter/SchemaAndByteArrayConverter.cpp:44
#6  0xb7e6b548 in rsb::transport::socket::OutConnector::handle(this=0x80ba500, event=...) at /homes/cpeters/workspace/gar-installer/rsx/rsb/work/main.d/rsb-svn/src/rsb/transport/socket/OutConnector.cpp:75
#7  0xb7dd4485 in rsb::eventprocessing::DirectEventSendingStrategy::process(this=0x80baa08, event=...) at /homes/cpeters/workspace/gar-installer/rsx/rsb/work/main.d/rsb-svn/src/rsb/eventprocessing/DirectEventSendingStrategy.cpp:50
#8  0xb7df10a4 in rsb::eventprocessing::OutRouteConfigurator::publish(this=0x80ba948, e=...) at /homes/cpeters/workspace/gar-installer/rsx/rsb/work/main.d/rsb-svn/src/rsb/eventprocessing/OutRouteConfigurator.cpp:130
#9  0xb7d9f46b in rsb::InformerBase::uncheckedPublish (this=0x80ba420, event=...) at /homes/cpeters/workspace/gar-installer/rsx/rsb/work/main.d/rsb-svn/src/rsb/Informer.cpp:120
#10 0xb7d9f38d in rsb::InformerBase::checkedPublish (this=0x80ba420, event=...) at /homes/cpeters/workspace/gar-installer/rsx/rsb/work/main.d/rsb-svn/src/rsb/Informer.cpp:115
#11 0xb7d9ea27 in rsb::InformerBase::publish (this=0x80ba420, event=...) at /homes/cpeters/workspace/gar-installer/rsx/rsb/work/main.d/rsb-svn/src/rsb/Informer.cpp:86
#12 0x0808714c in InformingSyncDataHandler::handle(boost::shared_ptr<rsb::Event>) ()
#13 0xb7f9320f in rsbtimesync::ApproximateTimeStrategy::publishCandidate() () from /vol/taped/tebra_system/externals/lib/librsbts.so
#14 0xb7f94065 in rsbtimesync::ApproximateTimeStrategy::process() () from /vol/taped/tebra_system/externals/lib/librsbts.so
#15 0xb7f94865 in rsbtimesync::ApproximateTimeStrategy::handle(boost::shared_ptr<rsb::Event>) () from /vol/taped/tebra_system/externals/lib/librsbts.so
#16 0xb7ddd8e3 in rsb::eventprocessing::ParallelEventReceivingStrategy::deliver(this=0x80bc968, handler=..., e=...) at /homes/cpeters/workspace/gar-installer/rsx/rsb/work/main.d/rsb-svn/src/rsb/eventprocessing/ParallelEventReceivingStrategy.cpp:151
#17 0xb7de516f in boost::_mfi::mf2<void,rsb::eventprocessing::ParallelEventReceivingStrategy,boost::shared_ptr<rsb::Handler>, boost::shared_ptr<rsb::Event>>::operator()(rsb::eventprocessing::ParallelEventReceivingStrategy*, boost::shared_ptr<rsb::Handler>, boost::shared_ptr<rsb::Event>) const () from /vol/taped/tebra_system/externals/lib/librsbcore.so.0.5.0
#18 0xb7de4279 in void boost::_bi::list3<boost::_bi::value<rsb::eventprocessing::ParallelEventReceivingStrategy*>, boost::arg<1>, boost::arg<2> >::operator()<boost::_mfi::mf2<void, rsb::eventprocessing::ParallelEventReceivingStrategy, boost::shared_ptr<rsb::Handler>, boost::shared_ptr<rsb::Event> >, boost::_bi::list2<boost::shared_ptr<rsb::Handler>&, boost::shared_ptr<rsb::Event> const&> >(boost::_bi::type<void>, boost::_mfi::mf2<void, rsb::eventprocessing::ParallelEventReceivingStrategy, boost::shared_ptr<rsb::Handler>, boost::shared_ptr<rsb::Event> >&, boost::_bi::list2<boost::shared_ptr<rsb::Handler>&, boost::shared_ptr<rsb::Event> const&>&, int) () from /vol/taped/tebra_system/externals/lib/librsbcore.so.0.5.0
#19 0xb7de35f2 in void boost::_bi::bind_t<void, boost::_mfi::mf2<void, rsb::eventprocessing::ParallelEventReceivingStrategy, boost::shared_ptr<rsb::Handler>, boost::shared_ptr<rsb::Event> >, boost::_bi::list3<boost::_bi::value<rsb::eventprocessing::ParallelEventReceivingStrategy*>, boost::arg<1>, boost::arg<2> > >::operator()<boost::shared_ptr<rsb::Handler>, boost::shared_ptr<rsb::Event> >(boost::shared_ptr<rsb::Handler>&,
boost::shared_ptr<rsb::Event> const&) () from /vol/taped/tebra_system/externals/lib/librsbcore.so.0.5.0
#20 0xb7de2355 in boost::detail::function::void_function_obj_invoker2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, rsb::eventprocessing::ParallelEventReceivingStrategy, boost::shared_ptr<rsb::Handler>, boost::shared_ptr<rsb::Event>>, boost::_bi::list3<boost::_bi::value<rsb::eventprocessing::ParallelEventReceivingStrategy*>, boost::arg<1>, boost::arg<2> > >, void, boost::shared_ptr<rsb::Handler>&, boost::shared_ptr<rsb::Event> const&>::invoke (function_obj_ptr=..., a0=..., a1=...) at /usr/include/boost/function/function_template.hpp:153
#21 0xb7de638b in boost::function2<void, boost::shared_ptr<rsb::Handler>&, boost::shared_ptr<rsb::Event> const&>::operator()(boost::shared_ptr<rsb::Handler>&, boost::shared_ptr<rsb::Event> const&) const () from /vol/taped/tebra_system/externals/lib/librsbcore.so.0.5.0
#22 0xb7de6210 in rsc::threading::OrderedQueueDispatcherPool<boost::shared_ptr<rsb::Event>, rsb::Handler>::DeliverFunctionAdapter::deliver(boost::shared_ptr<rsb::Handler>&, boost::shared_ptr<rsb::Event> const&) () from /vol/taped/tebra_system/externals/lib/librsbcore.so.0.5.0 
#23 0xb7ddfc00 in rsc::threading::OrderedQueueDispatcherPool<boost::shared_ptr<rsb::Event>, rsb::Handler>::worker(this=0x80bc974, workerNum=@0x80bd26c) at /vol/taped/tebra_system/externals/include/rsc/threading/OrderedQueueDispatcherPool.h:328
#24 0xb7de5a86 in boost::_mfi::mf1<void, rsc::threading::OrderedQueueDispatcherPool<boost::shared_ptr<rsb::Event>, rsb::Handler>, unsigned int const&>::operator()(rsc::threading::OrderedQueueDispatcherPool<boost::shared_ptr<rsb::Event>,
rsb::Handler>*, unsigned int const&) const () from /vol/taped/tebra_system/externals/lib/librsbcore.so.0.5.0
#25 0xb7de5550 in void boost::_bi::list2<boost::_bi::value<rsc::threading::OrderedQueueDispatcherPool<boost::shared_ptr<rsb::Event>, rsb::Handler>*>, boost::_bi::value<unsigned int> >::operator()<boost::_mfi::mf1<void, rsc::threading::OrderedQueueDispatcherPool<boost::shared_ptr<rsb::Event>, rsb::Handler>, unsigned int const&>, boost::_bi::list0>(boost::_bi::type<void>, boost::_mfi::mf1<void, rsc::threading::OrderedQueueDispatcherPool<boost::shared_ptr<rsb::Event>, rsb::Handler>, unsigned int const&>&, boost::_bi::list0&, int) () from /vol/taped/tebra_system/externals/lib/librsbcore.so.0.5.0
#26 0xb7de45fe in boost::_bi::bind_t<void, boost::_mfi::mf1<void, rsc::threading::OrderedQueueDispatcherPool<boost::shared_ptr<rsb::Event>, rsb::Handler>, unsigned int const&>, boost::_bi::list2<boost::_bi::value<rsc::threading::OrderedQueueDispatcherPool<boost::shared_ptr<rsb::Event>, rsb::Handler>*>, boost::_bi::value<unsigned int> > >::operator()() () from /vol/taped/tebra_system/externals/lib/librsbcore.so.0.5.0
#27 0xb7de39fe in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, boost::_mfi::mf1<void, rsc::threading::OrderedQueueDispatcherPool<boost::shared_ptr<rsb::Event>, rsb::Handler>, unsigned int const&>, boost::_bi::list2<boost::_bi::value<rsc::threading::OrderedQueueDispatcherPool<boost::shared_ptr<rsb::Event>, rsb::Handler>*>, boost::_bi::value<unsigned int> > >, void>::invoke(boost::detail::function::function_buffer&) () from /vol/taped/tebra_system/externals/lib/librsbcore.so.0.5.0
#28 0xb7de6283 in boost::function0<void>::operator()() const () from /vol/taped/tebra_system/externals/lib/librsbcore.so.0.5.0
#29 0xb7de60e8 in boost::detail::thread_data<boost::function<void ()()> >::run() () from /vol/taped/tebra_system/externals/lib/librsbcore.so.0.5.0
#30 0xb796b7c5 in thread_proxy (param=0x80bd190) at libs/thread/src/pthread/thread.cpp:130
#31 0xb782f96e in start_thread (arg=0xb42cbb70) at pthread_create.c:300
#32 0xb7619a4e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

History

#1 Updated by J. Wienke over 11 years ago

Moved from old timesync project to be part of the overall rsb project. timesync seems to be quite essential for some use cases with RSB. Hence we moved it to the main project as a tool.

Also available in: Atom PDF