Project

General

Profile

Actions

Bug #3404

closed

Crash in Rib::modifyInheritedRoutes after ndncon quits

Added by Davide Pesavento almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
RIB
Target version:
Start date:
01/09/2016
Due date:
% Done:

100%

Estimated time:

Description

Setup: OS X 10.10.5, nfd 0.4.0, ndncon 0.7.3

Steps to reproduce:

  1. start nfd
  2. nfdc register / udp4://<something>
  3. open ndncon
  4. click on "start publishing" button
  5. wait a couple of seconds
  6. close "streams" window
  7. quit ndncon
  8. nfd crashes

Last log messages:

1452368912.968020 INFO: [Transport] [id=262,local=unix:///private/var/run/nfd.sock,remote=fd://29] setState UP -> FAILED
1452368912.968210 INFO: [Transport] [id=261,local=tcp6://[::1]:6363,remote=tcp6://[::1]:51140] setState UP -> FAILED
1452368912.968492 INFO: [Transport] [id=262,local=unix:///private/var/run/nfd.sock,remote=fd://29] setState FAILED -> CLOSED
1452368913.037294 INFO: [FaceTable] Removed face id=262 remote=fd://29 local=unix:///private/var/run/nfd.sock
1452368913.037683 INFO: [Transport] [id=261,local=tcp6://[::1]:6363,remote=tcp6://[::1]:51140] setState FAILED -> CLOSED
1452368913.065378 INFO: [FaceTable] Removed face id=261 remote=tcp6://[::1]:51140 local=tcp6://[::1]:6363
1452368913.125573 INFO: [AutoPrefixPropagator] no signing identity available for: /ndn/edu/ucla/remap/ndnrtc/user/npa/streams/mic/pcmu

LLDB backtrace:

(lldb) bt all
  thread #1: tid = 0xfbad, 0x00007fff8ebca21a libsystem_kernel.dylib`kevent + 10, queue = 'com.apple.main-thread'
    frame #0: 0x00007fff8ebca21a libsystem_kernel.dylib`kevent + 10
    frame #1: 0x000000010000a9fc nfd`boost::asio::detail::kqueue_reactor::run(this=0x000000010110b300, block=<unavailable>, ops=0x00007fff5fbff718) + 268 at kqueue_reactor.ipp:365
    frame #2: 0x000000010000a7a9 nfd`boost::asio::detail::task_io_service::do_run_one(this=0x000000010110aef0, lock=0x00007fff5fbff6e8, this_thread=0x00007fff5fbff710, ec=0x00007fff5fbff808) + 393 at task_io_service.ipp:356
    frame #3: 0x000000010000a3e5 nfd`boost::asio::detail::task_io_service::run(this=0x000000010110aef0, ec=0x00007fff5fbff808) + 181 at task_io_service.ipp:149
    frame #4: 0x0000000100003210 nfd`nfd::NfdRunner::run() [inlined] boost::asio::io_service::run(this=<unavailable>) + 38 at io_service.ipp:59
    frame #5: 0x00000001000031ea nfd`nfd::NfdRunner::run(this=<unavailable>) + 410 at main.cpp:168
    frame #6: 0x0000000100001723 nfd`main(argc=<unavailable>, argv=<unavailable>) + 1107 at main.cpp:298
    frame #7: 0x00007fff89b0f5c9 libdyld.dylib`start + 1
    frame #8: 0x00007fff89b0f5c9 libdyld.dylib`start + 1

  thread #3: tid = 0xfbb9, 0x00007fff8ebca232 libsystem_kernel.dylib`kevent64 + 10, queue = 'com.apple.libdispatch-manager'
    frame #0: 0x00007fff8ebca232 libsystem_kernel.dylib`kevent64 + 10
    frame #1: 0x00007fff8eed5615 libdispatch.dylib`_dispatch_mgr_invoke + 247
    frame #2: 0x00007fff8eed526e libdispatch.dylib`_dispatch_mgr_thread + 52

* thread #2: tid = 0xfbc3, 0x00007fff8cc2a866 libc++.1.dylib`std::__1::__shared_weak_count::__add_shared() + 4, stop reason = EXC_BAD_ACCESS (code=1, address=0x12)
  * frame #0: 0x00007fff8cc2a866 libc++.1.dylib`std::__1::__shared_weak_count::__add_shared() + 4
    frame #1: 0x000000010013ba5e nfd`nfd::rib::Rib::modifyInheritedRoutes(std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> > const&) [inlined] std::__1::shared_ptr<nfd::rib::RibEntry>::shared_ptr(std::__1::shared_ptr<nfd::rib::RibEntry> const&) + 222 at memory:4191
    frame #2: 0x000000010013ba43 nfd`nfd::rib::Rib::modifyInheritedRoutes(std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> > const&) [inlined] std::__1::shared_ptr<nfd::rib::RibEntry>::shared_ptr(std::__1::shared_ptr<nfd::rib::RibEntry> const&) at memory:4189
    frame #3: 0x000000010013ba43 nfd`nfd::rib::Rib::modifyInheritedRoutes(this=<unavailable>, inheritedRoutes=size=1) + 195 at rib.cpp:458
    frame #4: 0x000000010013b908 nfd`nfd::rib::Rib::onFibUpdateSuccess(this=0x0000000101811810, batch=<unavailable>, inheritedRoutes=size=0, onSuccess=0x000000010103fa10)> const&) + 152 at rib.cpp:425
    frame #5: 0x000000010011a09e nfd`nfd::rib::FibUpdater::onUpdateSuccess(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&) [inlined] std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)>::operator(this=<unavailable>)(std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >) const + 190 at functional:1793
    frame #6: 0x000000010011a088 nfd`nfd::rib::FibUpdater::onUpdateSuccess(this=<unavailable>, update=<unavailable>, onSuccess=<unavailable>, onFailure=<unavailable>)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&) + 168 at fib-updater.cpp:279
    frame #7: 0x000000010011cd16 nfd`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (nfd::rib::FibUpdater::*)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), nfd::rib::FibUpdater*, nfd::rib::FibUpdate const&, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&>&, ndn::nfd::ControlParameters const&>(std::__1::__bind<void (nfd::rib::FibUpdater::*)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), nfd::rib::FibUpdater*, nfd::rib::FibUpdate const&, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&>&&&, ndn::nfd::ControlParameters const&&&) [inlined] decltype(__f=<unavailable>)).*fp(std::__1::forward<nfd::rib::FibUpdate&, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)>&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)>&>(fp1))) std::__1::__invoke<void (nfd::rib::FibUpdater::*&)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), nfd::rib::FibUpdater*&, nfd::rib::FibUpdate&, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)>&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)>&, void>(void (nfd::rib::FibUpdater::*&&&)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), nfd::rib::FibUpdater*&&&, nfd::rib::FibUpdate&&&, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)>&&&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)>&&&) + 21 at __functional_base:382
    frame #8: 0x000000010011cd01 nfd`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (nfd::rib::FibUpdater::*)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), nfd::rib::FibUpdater*, nfd::rib::FibUpdate const&, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&>&, ndn::nfd::ControlParameters const&>(std::__1::__bind<void (nfd::rib::FibUpdater::*)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), nfd::rib::FibUpdater*, nfd::rib::FibUpdate const&, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&>&&&, ndn::nfd::ControlParameters const&&&) [inlined] std::__1::__bind_return<void (nfd::rib::FibUpdater::*)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), std::__1::tuple<nfd::rib::FibUpdater*, nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)>, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> >, std::__1::tuple<ndn::nfd::ControlParameters const&>, _is_valid_bind_return<void (nfd::rib::FibUpdater::*)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), std::__1::tuple<nfd::rib::FibUpdater*, nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)>, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> >, std::__1::tuple<ndn::nfd::ControlParameters const&> >::value>::type std::__1::__apply_functor<void (__f=<unavailable>)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), std::__1::tuple<nfd::rib::FibUpdater*, nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)>, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> >, 0ul, 1ul, 2ul, 3ul, std::__1::tuple<ndn::nfd::ControlParameters const&> >(void (nfd::rib::FibUpdater::*&)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), std::__1::tuple<nfd::rib::FibUpdater*, nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)>, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> >&, std::__1::__tuple_indices<0ul, 1ul, 2ul, 3ul>, std::__1::tuple<ndn::nfd::ControlParameters const&>&&) + 172 at functional:2060
    frame #9: 0x000000010011cc55 nfd`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (nfd::rib::FibUpdater::*)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), nfd::rib::FibUpdater*, nfd::rib::FibUpdate const&, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&>&, ndn::nfd::ControlParameters const&>(std::__1::__bind<void (nfd::rib::FibUpdater::*)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), nfd::rib::FibUpdater*, nfd::rib::FibUpdate const&, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&>&&&, ndn::nfd::ControlParameters const&&&) [inlined] std::__1::__bind_return<void (nfd::rib::FibUpdater::*)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), std::__1::tuple<nfd::rib::FibUpdater*, nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)>, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> >, std::__1::tuple<ndn::nfd::ControlParameters const&&&>, _is_valid_bind_return<void (nfd::rib::FibUpdater::*)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), std::__1::tuple<nfd::rib::FibUpdater*, nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)>, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> >, std::__1::tuple<ndn::nfd::ControlParameters const&&&> >::value>::type std::__1::__bind<void (this=<unavailable>)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), nfd::rib::FibUpdater*, nfd::rib::FibUpdate const&, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&>::operator()<ndn::nfd::ControlParameters const&>(ndn::nfd::ControlParameters const&&&) at functional:2123
    frame #10: 0x000000010011cc55 nfd`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (nfd::rib::FibUpdater::*)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), nfd::rib::FibUpdater*, nfd::rib::FibUpdate const&, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&>&, ndn::nfd::ControlParameters const&>(std::__1::__bind<void (nfd::rib::FibUpdater::*)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), nfd::rib::FibUpdater*, nfd::rib::FibUpdate const&, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&>&&&, ndn::nfd::ControlParameters const&&&) [inlined] decltype(__f=<unavailable>)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), nfd::rib::FibUpdater*, nfd::rib::FibUpdate const&, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&>&>(fp)(std::__1::forward<ndn::nfd::ControlParameters const&>(fp0))) std::__1::__invoke<std::__1::__bind<void (nfd::rib::FibUpdater::*)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), nfd::rib::FibUpdater*, nfd::rib::FibUpdate const&, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&>&, ndn::nfd::ControlParameters const&>(std::__1::__bind<void (nfd::rib::FibUpdater::*)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), nfd::rib::FibUpdater*, nfd::rib::FibUpdate const&, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&>&&&, ndn::nfd::ControlParameters const&&&) at __functional_base:415
    frame #11: 0x000000010011cc55 nfd`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (__args=<unavailable>, __args=<unavailable>)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), nfd::rib::FibUpdater*, nfd::rib::FibUpdate const&, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&>&, ndn::nfd::ControlParameters const&>(std::__1::__bind<void (nfd::rib::FibUpdater::*)(nfd::rib::FibUpdate, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&), nfd::rib::FibUpdater*, nfd::rib::FibUpdate const&, std::__1::function<void (std::__1::list<nfd::rib::RibUpdate, std::__1::allocator<nfd::rib::RibUpdate> >)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&>&&&, ndn::nfd::ControlParameters const&&&) + 21 at __functional_base:440
    frame #12: 0x000000010071d992 libndn-cxx.0.4.0.dylib`ndn::nfd::Controller::processCommandResponse(ndn::Data const&, std::__1::shared_ptr<ndn::nfd::ControlCommand> const&, std::__1::function<void (ndn::nfd::ControlParameters const&)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&) [inlined] std::__1::function<void (ndn::nfd::ControlParameters const&)>::operator()(ndn::nfd::ControlParameters const&) const + 226 at functional:1793
    frame #13: 0x000000010071d982 libndn-cxx.0.4.0.dylib`ndn::nfd::Controller::processCommandResponse(this=<unavailable>, data=<unavailable>, command=<unavailable>, onSuccess=<unavailable>, onFailure=<unavailable>)> const&, std::__1::function<void (unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&) + 210 at nfd-controller.cpp:103
    frame #14: 0x00000001006ea3f6 libndn-cxx.0.4.0.dylib`ndn::Face::Impl::satisfyPendingInterests(ndn::Data&) [inlined] std::__1::function<void (ndn::Interest const&, ndn::Data const&)>::operator()(ndn::Interest const&, ndn::Data const&) const + 262 at functional:1793
    frame #15: 0x00000001006ea3ea libndn-cxx.0.4.0.dylib`ndn::Face::Impl::satisfyPendingInterests(ndn::Data&) [inlined] ndn::PendingInterest::invokeDataCallback(this=<unavailable>) + 12 at pending-interest.hpp:82
    frame #16: 0x00000001006ea3de libndn-cxx.0.4.0.dylib`ndn::Face::Impl::satisfyPendingInterests(this=0x000000010100cdb0, data=0x000000010205e618) + 238 at face-impl.hpp:85
    frame #17: 0x00000001006e742b libndn-cxx.0.4.0.dylib`ndn::Face::onReceiveElement(this=<unavailable>, blockFromDaemon=<unavailable>) + 1643 at face.cpp:515
    frame #18: 0x00000001007d4514 libndn-cxx.0.4.0.dylib`ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>::processAll(unsigned char*, unsigned long&, unsigned long) [inlined] std::__1::function<void (ndn::Block const&)>::operator()(ndn::Block const&) const + 21 at functional:1793
    frame #19: 0x00000001007d44ff libndn-cxx.0.4.0.dylib`ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>::processAll(unsigned char*, unsigned long&, unsigned long) [inlined] ndn::Transport::receive(this=<unavailable>) at transport.hpp:154
    frame #20: 0x00000001007d44ff libndn-cxx.0.4.0.dylib`ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>::processAll(this=0x0000000102037818, buffer="d�\x03Y�\x031\x01\x01P�\x03P\x06�\x03L\a�\x01�\b\tlocalhost\b\x03nfd\b\x03fib\b\vadd-nexthop\bIhG\a>\b\x03ndn\b\x03edu\b\x04ucla\b\x05remap\b\x06ndnrtc\b\x04user\b\x03npa\b\astreams\b\x03mic\b\x04pcmui\x02\x01\x04j\x01", offset=0x0000000102903bb8, nBytesAvailable=861) + 319 at stream-transport.hpp:221
    frame #21: 0x00000001007d4022 libndn-cxx.0.4.0.dylib`ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>::handleAsyncReceive(this=0x0000000102037818, error=<unavailable>, nBytesRecvd=<unavailable>) + 226 at stream-transport.hpp:245
    frame #22: 0x00000001007d433c libndn-cxx.0.4.0.dylib`boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, std::__1::__bind<void (ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>::*)(boost::system::error_code const&, unsigned long), ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>*, std::__1::placeholders::__ph<1>&, std::__1::placeholders::__ph<2>&> >::do_complete(boost::asio::detail::task_io_service*, boost::asio::detail::task_io_service_operation*, boost::system::error_code const&, unsigned long) [inlined] void boost_asio_handler_invoke_helpers::invoke<boost::asio::detail::binder2<std::__1::__bind<void (ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>::*)(boost::system::error_code const&, unsigned long), ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>*, std::__1::placeholders::__ph<1>&, std::__1::placeholders::__ph<2>&>, boost::system::error_code, unsigned long>, std::__1::__bind<void (ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>::*)(boost::system::error_code const&, unsigned long), ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>*, std::__1::placeholders::__ph<1>&, std::__1::placeholders::__ph<2>&> >(function=<unavailable>)(boost::system::error_code const&, unsigned long), ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>*, std::__1::placeholders::__ph<1>&, std::__1::placeholders::__ph<2>&>, boost::system::error_code, unsigned long>&, std::__1::__bind<void (ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>::*)(boost::system::error_code const&, unsigned long), ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>*, std::__1::placeholders::__ph<1>&, std::__1::placeholders::__ph<2>&>&) + 108 at handler_invoke_helpers.hpp:37
    frame #23: 0x00000001007d432e libndn-cxx.0.4.0.dylib`boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, std::__1::__bind<void (ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>::*)(boost::system::error_code const&, unsigned long), ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>*, std::__1::placeholders::__ph<1>&, std::__1::placeholders::__ph<2>&> >::do_complete(owner=<unavailable>, base=<unavailable>, (null)=<unavailable>, (null)=<unavailable>) + 94 at reactive_socket_recv_op.hpp:110
    frame #24: 0x000000010000a898 nfd`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&) [inlined] boost::asio::detail::task_io_service_operation::complete(this=<unavailable>, owner=<unavailable>, ec=<unavailable>) + 632 at task_io_service_operation.hpp:38
    frame #25: 0x000000010000a886 nfd`boost::asio::detail::task_io_service::do_run_one(this=<unavailable>, lock=<unavailable>, this_thread=0x0000000102903d60, ec=<unavailable>) + 614 at task_io_service.ipp:372
    frame #26: 0x000000010000a3e5 nfd`boost::asio::detail::task_io_service::run(this=0x000000010100c0f0, ec=0x0000000102903e48) + 181 at task_io_service.ipp:149
    frame #27: 0x0000000100009ddb nfd`nfd::NfdRunner::run()::'lambda'()::operator()() const [inlined] boost::asio::io_service::run(this=0x000000010100c7e0) + 29 at io_service.ipp:59
    frame #28: 0x0000000100009dbe nfd`nfd::NfdRunner::run(this=0x000000010100e310)::'lambda'()::operator()() const + 110 at main.cpp:146
    frame #29: 0x00000001006a3fd6 libboost_thread-mt.dylib`boost::(anonymous namespace)::thread_proxy(void*) + 54
    frame #30: 0x00007fff80ded05a libsystem_pthread.dylib`_pthread_body + 131
    frame #31: 0x00007fff80decfd7 libsystem_pthread.dylib`_pthread_start + 176
    frame #32: 0x00007fff80dea3ed libsystem_pthread.dylib`thread_start + 13

  thread #4: tid = 0xfe17, 0x00007fff8ebc994a libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x00007fff8ebc994a libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff80decb29 libsystem_pthread.dylib`_pthread_wqthread + 869
    frame #2: 0x00007fff80dea3dd libsystem_pthread.dylib`start_wqthread + 13

  thread #5: tid = 0xfe18, 0x00007fff8ebc994a libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x00007fff8ebc994a libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff80decb29 libsystem_pthread.dylib`_pthread_wqthread + 869
    frame #2: 0x00007fff80dea3dd libsystem_pthread.dylib`start_wqthread + 13

  thread #6: tid = 0xfe19, 0x00007fff8ebc994a libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x00007fff8ebc994a libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff80decb29 libsystem_pthread.dylib`_pthread_wqthread + 869
    frame #2: 0x00007fff80dea3dd libsystem_pthread.dylib`start_wqthread + 13

  thread #7: tid = 0xfe1a, 0x00007fff8ebc994a libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x00007fff8ebc994a libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff80decb29 libsystem_pthread.dylib`_pthread_wqthread + 869
    frame #2: 0x00007fff80dea3dd libsystem_pthread.dylib`start_wqthread + 13

  thread #8: tid = 0xfe1b, 0x00007fff8ebc994a libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #0: 0x00007fff8ebc994a libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff80decb29 libsystem_pthread.dylib`_pthread_wqthread + 869
    frame #2: 0x00007fff80dea3dd libsystem_pthread.dylib`start_wqthread + 13
Actions #1

Updated by Alex Afanasyev almost 9 years ago

A little more input:

The crash is caused by BOOST_ASSERT(ribIt != m_rib.end()); in rib.cpp:modifyInheritedRoutes

The specific entry that causes the problem has RouteCapture flag set:

# nfd-status -r
/ndn/broadcast/chrono-chat0.3 route={faceid=266 (origin=0 cost=0 ChildInherit)}
/ndn/broadcast/ndnrtc/users route={faceid=266 (origin=0 cost=0 ChildInherit)}
/ndn/edu/ucla/remap/ndnrtc/user/jedi1452536031/session-info/%2Fndn%2Fedu%2Fucla%2Fremap%2Fndnrtc%2Fuser%2Fjedi1452536031 route={faceid=266 (origin=0 cost=0 ChildInherit)}
/ndn/edu/ucla/remap/ndnrtc/user/jedi1452536031/streams/main_camera/mid route={faceid=267 (origin=0 cost=0 ChildInherit)}
/ndn/edu/ucla/remap/ndnrtc/user/jedi1452536031/streams/main_camera/low route={faceid=267 (origin=0 cost=0 ChildInherit RibCapture)}
/ndn/edu/ucla/remap/ndnrtc/user/jedi1452536031/streams/main_camera/hi route={faceid=267 (origin=0 cost=0 ChildInherit)}
/ndn/edu/ucla/remap/ndnrtc/user/jedi1452536031/streams/mic/pcmu route={faceid=267 (origin=0 cost=0 ChildInherit)}

Extra log injected in cpp:modifyInheritedRoutes:

1452537589.709448 ERROR: [Rib] /ndn/edu/ucla/remap/ndnrtc/user/jedi1452536031/streams/main_camera/low
1452537589.709556 ERROR: [Rib] NOT FOUND IN RIB
Actions #2

Updated by Junxiao Shi almost 9 years ago

  • Assignee set to Vince Lehman

I'm assigning this to the author of Rib.

Actions #3

Updated by Davide Pesavento almost 9 years ago

As suggested by Alex, I can confirm that adding

  if (ribIt == m_rib.end())
    continue;

after m_rib.find(...) prevents the crash.

Actions #4

Updated by Vince Lehman almost 9 years ago

  • Status changed from New to In Progress
Actions #5

Updated by Vince Lehman almost 9 years ago

  • Status changed from In Progress to Code review
  • % Done changed from 0 to 90
Actions #6

Updated by Vince Lehman almost 9 years ago

The problem is caused due to code located at: https://github.com/named-data/NFD/blob/master/rib/fib-updater.cpp#L574

If a route is erased, the code checks if the capture flag for the RIB entry was turned off due to the removal. If so, any inherited routes that were blocked previously are added to the RIB entry.

This is a problem though if, as in this bug, the route that is being removed is the only route in the RIB entry. An inherited route will be generated for the RIB entry, the RIB entry will be removed, and Rib::modifyInheritedRoutes will try to add an inherited route to a non-existent namespace. Thus, the assertion will fail.

The patch adds an additional check to see if the removal of the route makes the RIB entry empty. If so, no inherited routes are added to the RIB entry.

Actions #7

Updated by Alex Afanasyev almost 9 years ago

  • Status changed from Code review to Closed
  • % Done changed from 90 to 100
Actions

Also available in: Atom PDF