Running 1 test case...
Scheduler created 22829
Scheduler created 56610
1415684132.000000 DEBUG: [ndn.util.SegmentFetcher] SegmentFetcher fetchFirstSegment56610 Scheduled event: 0x60700000d930

1415684132.000000 DEBUG: [ndn.Face] Expressed interest 0x619000009b90
remaining: 3500000000 nanoseconds
22829 Scheduled event: 0x60700000d850
22829 Cancel event: 0
1415684132.500000 DEBUG: [ndn.Face] <I /localhost/nfd/faces/list?ndn.MustBeFresh=true&ndn.Nonce=3276845483
1415684132.500000 DEBUG: [ndn.Face] /localhost/nfd/faces/list?ndn.MustBeFresh=true&ndn.Nonce=3276845483
remaining: 3000000000 nanoseconds
Async wait callback
1000000000 nanoseconds since unit test beginning system:0
Hello 1000000000 nanoseconds since unit test beginning
head: 0x60700000d930
56610 Cancel event: 0x60700000d930
1415684133.000000 DEBUG: [ndn.util.SegmentFetcher] afterTimeoutCb
1415684133.000000 DEBUG: [ndn.util.SegmentFetcher] afterNackOrTimeout
1415684133.000000 DEBUG: [ndn.util.SegmentFetcher] SegmentFetcher fetchFirstSegment
56610 Scheduled event: 0x60700000d7e0
head: 0x60700000d7e0
1415684133.000000 DEBUG: [ndn.Face] Expressed interest 0x61900001a990
22829 Scheduled event: 0x60700000d770
22829 Cancel event: 0
1415684133.000000 DEBUG: [ndn.Face] <I /localhost/nfd/faces/list?ndn.MustBeFresh=true&ndn.Nonce=4218738447
1415684133.000000 DEBUG: [ndn.Face] /localhost/nfd/faces/list?ndn.MustBeFresh=true&ndn.Nonce=3276845483
1415684133.000000 DEBUG: [ndn.Face] /localhost/nfd/faces/list?ndn.MustBeFresh=true&ndn.Nonce=4218738447
remaining: 2500000000 nanoseconds
remaining: 2000000000 nanoseconds
remaining: 1500000000 nanoseconds
remaining: 1000000000 nanoseconds
Async wait callback
3000000000 nanoseconds since unit test beginning system:0
Hello 3000000000 nanoseconds since unit test beginning
head: 0x60700000d7e0
Scheduler dtor 56610
=================================================================
==30517==ERROR: AddressSanitizer: heap-use-after-free on address 0x61900001bf38 at pc 0x7f90ec17a663 bp 0x7ffd58f78590 sp 0x7ffd58f78580
READ of size 8 at 0x61900001bf38 thread T0
1415684135.000000 DEBUG: [ndn.util.SegmentFetcher] afterTimeoutCb
1415684135.000000 DEBUG: [ndn.util.SegmentFetcher] afterNackOrTimeout
1415684135.000000 DEBUG: [ndn.util.SegmentFetcher] Calling signalError
1415684135.000000 DEBUG: [ndn.util.SegmentFetcher] Segment fetcher dtor, use count: 0
    #0 0x7f90ec17a662 in std::_Rb_tree<std::shared_ptr<ndn::util::scheduler::EventInfo>, std::shared_ptr<ndn::util::scheduler::EventInfo>, std::_Identity<std::shared_ptr<ndn::util::scheduler::EventInfo> >, ndn::util::scheduler::EventQueueCompare, std::allocator<std::shared_ptr<ndn::util::scheduler::EventInfo> > >::empty() const /usr/include/c++/5/bits/stl_tree.h:902
    #1 0x7f90ec17a662 in std::multiset<std::shared_ptr<ndn::util::scheduler::EventInfo>, ndn::util::scheduler::EventQueueCompare, std::allocator<std::shared_ptr<ndn::util::scheduler::EventInfo> > >::empty() const /usr/include/c++/5/bits/stl_multiset.h:384
    #2 0x7f90ec17a662 in ndn::util::scheduler::Scheduler::executeEvent(boost::system::error_code const&) ../src/util/scheduler.cpp:168
    #3 0x7f90ec17b29f in operator()<boost::system::error_code> ../src/util/scheduler.cpp:145
    #4 0x7f90ec17b29f in operator() /usr/include/boost/asio/detail/bind_handler.hpp:47
    #5 0x7f90ec17b29f in asio_handler_invoke<boost::asio::detail::binder1<ndn::util::scheduler::Scheduler::scheduleNext()::<lambda(const auto:1&)>, boost::system::error_code> > /usr/include/boost/asio/handler_invoke_hook.hpp:69
    #6 0x7f90ec17b29f in invoke<boost::asio::detail::binder1<ndn::util::scheduler::Scheduler::scheduleNext()::<lambda(const auto:1&)>, boost::system::error_code>, ndn::util::scheduler::Scheduler::scheduleNext()::<lambda(const auto:1&)> > /usr/include/boost/asio/detail/handler_invoke_helpers.hpp:37
    #7 0x7f90ec17b29f in do_complete /usr/include/boost/asio/detail/wait_handler.hpp:70
    #8 0x455d66 in boost::asio::detail::task_io_service_operation::complete(boost::asio::detail::task_io_service&, boost::system::error_code const&, unsigned long) /usr/include/boost/asio/detail/task_io_service_operation.hpp:38
    #9 0x455d66 in boost::asio::detail::task_io_service::do_poll_one(boost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex>&, boost::asio::detail::task_io_service_thread_info&, boost::system::error_code const&) /usr/include/boost/asio/detail/impl/task_io_service.ipp:436
    #10 0x455d66 in boost::asio::detail::task_io_service::poll(boost::system::error_code&) /usr/include/boost/asio/detail/impl/task_io_service.ipp:198
    #11 0x455d66 in boost::asio::io_service::poll() /usr/include/boost/asio/impl/io_service.ipp:85
    #12 0x455d66 in ndn::tests::UnitTestTimeFixture::advanceClocks(boost::chrono::duration<long, boost::ratio<1l, 1000000000l> > const&, boost::chrono::duration<long, boost::ratio<1l, 1000000000l> > const&) ../tests/unit-tests/util/../unit-test-time-fixture.hpp:95
    #13 0x42c061 in ndn::tests::UnitTestTimeFixture::advanceClocks(boost::chrono::duration<long, boost::ratio<1l, 1000000000l> > const&, unsigned long) ../tests/unit-tests/util/../unit-test-time-fixture.hpp:61
    #14 0x42c061 in ndn::util::tests::Util::TestSegmentFetcher::OutOfScopeTimeout::test_method() ../tests/unit-tests/util/segment-fetcher.t.cpp:799
    #15 0x445c39 in OutOfScopeTimeout_invoker ../tests/unit-tests/util/segment-fetcher.t.cpp:788
    #16 0x448334 in boost::unit_test::ut_detail::callback0_impl_t<boost::unit_test::ut_detail::unused, void (*)()>::invoke() (/home/ashlesh/ndn-src/2ndn-cxx/build/unit-tests+0x448334)
    #17 0x7f90eb1adcb0  (/usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.58.0+0x6acb0)
    #18 0x7f90eb18d995 in boost::execution_monitor::catch_signals(boost::unit_test::callback0<int> const&) (/usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.58.0+0x4a995)
    #19 0x7f90eb18e1b2 in boost::execution_monitor::execute(boost::unit_test::callback0<int> const&) (/usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.58.0+0x4b1b2)
    #20 0x7f90eb1adde1 in boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::unit_test::test_case const&) (/usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.58.0+0x6ade1)
    #21 0x7f90eb19509d in boost::unit_test::framework_impl::visit(boost::unit_test::test_case const&) (/usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.58.0+0x5209d)
    #22 0x7f90eb1cb4ca in boost::unit_test::traverse_test_tree(boost::unit_test::test_suite const&, boost::unit_test::test_tree_visitor&) (/usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.58.0+0x884ca)
    #23 0x7f90eb1cb4ca in boost::unit_test::traverse_test_tree(boost::unit_test::test_suite const&, boost::unit_test::test_tree_visitor&) (/usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.58.0+0x884ca)
    #24 0x7f90eb1cb4ca in boost::unit_test::traverse_test_tree(boost::unit_test::test_suite const&, boost::unit_test::test_tree_visitor&) (/usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.58.0+0x884ca)
    #25 0x7f90eb1909f5 in boost::unit_test::framework::run(unsigned long, bool) (/usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.58.0+0x4d9f5)
    #26 0x7f90eb1ac286 in boost::unit_test::unit_test_main(bool (*)(), int, char**) (/usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.58.0+0x69286)
    #27 0x4165f5 in main ../tests/main.cpp:109
    #28 0x7f90ea5e482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #29 0x416078 in _start (/home/ashlesh/ndn-src/2ndn-cxx/build/unit-tests+0x416078)

0x61900001bf38 is located 440 bytes inside of 936-byte region [0x61900001bd80,0x61900001c128)
freed by thread T0 here:
    #0 0x7f90ec406132 in operator delete(void*, unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9a132)
    #1 0x7f90ec1922ae in std::_Sp_counted_ptr<ndn::util::SegmentFetcher*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() /usr/include/c++/5/bits/shared_ptr_base.h:374
    #2 0x7f90ec181102 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() /usr/include/c++/5/bits/shared_ptr_base.h:150
    #3 0x7f90ec181102 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() /usr/include/c++/5/bits/shared_ptr_base.h:659
    #4 0x7f90ec181102 in std::__shared_ptr<ndn::util::SegmentFetcher, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() /usr/include/c++/5/bits/shared_ptr_base.h:925
    #5 0x7f90ec181102 in std::__shared_ptr<ndn::util::SegmentFetcher, (__gnu_cxx::_Lock_policy)2>::reset() /usr/include/c++/5/bits/shared_ptr_base.h:1022
    #6 0x7f90ec181102 in ndn::util::SegmentFetcher::signalError(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ../src/util/segment-fetcher.cpp:496
    #7 0x7f90ec18c467 in ndn::util::SegmentFetcher::afterNackOrTimeout(ndn::Interest const&, std::weak_ptr<ndn::util::SegmentFetcher> const&) ../src/util/segment-fetcher.cpp:399
    #8 0x7f90ec18e782 in ndn::util::SegmentFetcher::afterTimeoutCb(ndn::Interest const&, std::weak_ptr<ndn::util::SegmentFetcher> const&) ../src/util/segment-fetcher.cpp:384
    #9 0x7f90ec18e995 in void std::_Mem_fn_base<void (ndn::util::SegmentFetcher::*)(ndn::Interest const&, std::weak_ptr<ndn::util::SegmentFetcher> const&), true>::operator()<ndn::Interest&, std::weak_ptr<ndn::util::SegmentFetcher>&, void>(ndn::util::SegmentFetcher*, ndn::Interest&, std::weak_ptr<ndn::util::SegmentFetcher>&) const /usr/include/c++/5/functional:600
    #10 0x7f90ec18e995 in void std::_Bind<std::_Mem_fn<void (ndn::util::SegmentFetcher::*)(ndn::Interest const&, std::weak_ptr<ndn::util::SegmentFetcher> const&)> (ndn::util::SegmentFetcher*, ndn::Interest, std::weak_ptr<ndn::util::SegmentFetcher>)>::__call<void, , 0ul, 1ul, 2ul>(std::tuple<>&&, std::_Index_tuple<0ul, 1ul, 2ul>) /usr/include/c++/5/functional:1074
    #11 0x7f90ec18e995 in void std::_Bind<std::_Mem_fn<void (ndn::util::SegmentFetcher::*)(ndn::Interest const&, std::weak_ptr<ndn::util::SegmentFetcher> const&)> (ndn::util::SegmentFetcher*, ndn::Interest, std::weak_ptr<ndn::util::SegmentFetcher>)>::operator()<, void>() /usr/include/c++/5/functional:1133
    #12 0x7f90ec18e995 in std::_Function_handler<void (), std::_Bind<std::_Mem_fn<void (ndn::util::SegmentFetcher::*)(ndn::Interest const&, std::weak_ptr<ndn::util::SegmentFetcher> const&)> (ndn::util::SegmentFetcher*, ndn::Interest, std::weak_ptr<ndn::util::SegmentFetcher>)> >::_M_invoke(std::_Any_data const&) /usr/include/c++/5/functional:1871
    #13 0x7f90ebd1ae39 in std::function<void ()>::operator()() const /usr/include/c++/5/functional:2267
    #14 0x7f90ec17aa92 in ndn::util::scheduler::Scheduler::executeEvent(boost::system::error_code const&) ../src/util/scheduler.cpp:181
    #15 0x7f90ec17b29f in operator()<boost::system::error_code> ../src/util/scheduler.cpp:145
    #16 0x7f90ec17b29f in operator() /usr/include/boost/asio/detail/bind_handler.hpp:47
    #17 0x7f90ec17b29f in asio_handler_invoke<boost::asio::detail::binder1<ndn::util::scheduler::Scheduler::scheduleNext()::<lambda(const auto:1&)>, boost::system::error_code> > /usr/include/boost/asio/handler_invoke_hook.hpp:69
    #18 0x7f90ec17b29f in invoke<boost::asio::detail::binder1<ndn::util::scheduler::Scheduler::scheduleNext()::<lambda(const auto:1&)>, boost::system::error_code>, ndn::util::scheduler::Scheduler::scheduleNext()::<lambda(const auto:1&)> > /usr/include/boost/asio/detail/handler_invoke_helpers.hpp:37
    #19 0x7f90ec17b29f in do_complete /usr/include/boost/asio/detail/wait_handler.hpp:70
    #20 0x455d66 in boost::asio::detail::task_io_service_operation::complete(boost::asio::detail::task_io_service&, boost::system::error_code const&, unsigned long) /usr/include/boost/asio/detail/task_io_service_operation.hpp:38
    #21 0x455d66 in boost::asio::detail::task_io_service::do_poll_one(boost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex>&, boost::asio::detail::task_io_service_thread_info&, boost::system::error_code const&) /usr/include/boost/asio/detail/impl/task_io_service.ipp:436
    #22 0x455d66 in boost::asio::detail::task_io_service::poll(boost::system::error_code&) /usr/include/boost/asio/detail/impl/task_io_service.ipp:198
    #23 0x455d66 in boost::asio::io_service::poll() /usr/include/boost/asio/impl/io_service.ipp:85
    #24 0x455d66 in ndn::tests::UnitTestTimeFixture::advanceClocks(boost::chrono::duration<long, boost::ratio<1l, 1000000000l> > const&, boost::chrono::duration<long, boost::ratio<1l, 1000000000l> > const&) ../tests/unit-tests/util/../unit-test-time-fixture.hpp:95
    #25 0x42c061 in ndn::tests::UnitTestTimeFixture::advanceClocks(boost::chrono::duration<long, boost::ratio<1l, 1000000000l> > const&, unsigned long) ../tests/unit-tests/util/../unit-test-time-fixture.hpp:61
    #26 0x42c061 in ndn::util::tests::Util::TestSegmentFetcher::OutOfScopeTimeout::test_method() ../tests/unit-tests/util/segment-fetcher.t.cpp:799
    #27 0x445c39 in OutOfScopeTimeout_invoker ../tests/unit-tests/util/segment-fetcher.t.cpp:788
    #28 0x448334 in boost::unit_test::ut_detail::callback0_impl_t<boost::unit_test::ut_detail::unused, void (*)()>::invoke() (/home/ashlesh/ndn-src/2ndn-cxx/build/unit-tests+0x448334)
    #29 0x7f90eb1adcb0  (/usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.58.0+0x6acb0)
    #30 0x60300000ab0f  (<unknown module>)

previously allocated by thread T0 here:
    #0 0x7f90ec405532 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x99532)
    #1 0x7f90ec184c05 in ndn::util::SegmentFetcher::start(ndn::Face&, ndn::Interest const&, ndn::security::v2::Validator&, ndn::util::SegmentFetcher::Options const&) ../src/util/segment-fetcher.cpp:99
    #2 0x42c00b in ndn::util::tests::Util::TestSegmentFetcher::OutOfScopeTimeout::test_method() ../tests/unit-tests/util/segment-fetcher.t.cpp:796
    #3 0x445c39 in OutOfScopeTimeout_invoker ../tests/unit-tests/util/segment-fetcher.t.cpp:788
    #4 0x448334 in boost::unit_test::ut_detail::callback0_impl_t<boost::unit_test::ut_detail::unused, void (*)()>::invoke() (/home/ashlesh/ndn-src/2ndn-cxx/build/unit-tests+0x448334)
    #5 0x7f90eb1adcb0  (/usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.58.0+0x6acb0)
    #6 0x60300000ab0f  (<unknown module>)

SUMMARY: AddressSanitizer: heap-use-after-free /usr/include/c++/5/bits/stl_tree.h:902 std::_Rb_tree<std::shared_ptr<ndn::util::scheduler::EventInfo>, std::shared_ptr<ndn::util::scheduler::EventInfo>, std::_Identity<std::shared_ptr<ndn::util::scheduler::EventInfo> >, ndn::util::scheduler::EventQueueCompare, std::allocator<std::shared_ptr<ndn::util::scheduler::EventInfo> > >::empty() const
Shadow bytes around the buggy address:
  0x0c327fffb790: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c327fffb7a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c327fffb7b0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c327fffb7c0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c327fffb7d0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
=>0x0c327fffb7e0: fd fd fd fd fd fd fd[fd]fd fd fd fd fd fd fd fd
  0x0c327fffb7f0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c327fffb800: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c327fffb810: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c327fffb820: fd fd fd fd fd fa fa fa fa fa fa fa fa fa fa fa
  0x0c327fffb830: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
==30517==ABORTING
