Error reproduced by unit test:
https://gerrit.named-data.net/#/c/4095/
The back trace is similar to the one that I got during integration testing (Mini-NDN) or real testing:
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 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 "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./build/unit-tests-nlsr...done.
(gdb) r
Starting program: /home/ashlesh/ndn-src/2NLSR/build/unit-tests-nlsr -t TestAdvertiseCrash/Basic
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Running 1 test case...
log4cxx: No appender could be found for logger (LsdbDatasetInterestHandler).
log4cxx: Please initialize the log4cxx system properly.
[New Thread 0x7ffff0eab700 (LWP 27292)]
Thread 1 "unit-tests-nlsr" received signal SIGSEGV, Segmentation fault.
0x000000000043a1c5 in __gnu_cxx::__exchange_and_add (__val=-1, __mem=0x9) at /usr/include/c++/5/ext/atomicity.h:49
49 { return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
(gdb) bt
#0 0x000000000043a1c5 in __gnu_cxx::__exchange_and_add (__val=-1, __mem=0x9) at /usr/include/c++/5/ext/atomicity.h:49
#1 __gnu_cxx::__exchange_and_add_dispatch (__val=-1, __mem=0x9) at /usr/include/c++/5/ext/atomicity.h:82
#2 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x1) at /usr/include/c++/5/bits/shared_ptr_base.h:147
#3 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x7fffffffc390, __in_chrg=<optimized out>)
at /usr/include/c++/5/bits/shared_ptr_base.h:659
#4 std::__shared_ptr<ndn::Buffer const, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x7fffffffc388, __in_chrg=<optimized out>)
at /usr/include/c++/5/bits/shared_ptr_base.h:925
#5 std::shared_ptr<ndn::Buffer const>::~shared_ptr (this=0x7fffffffc388, __in_chrg=<optimized out>) at /usr/include/c++/5/bits/shared_ptr.h:93
#6 ndn::Block::~Block (this=0x7fffffffc388, __in_chrg=<optimized out>) at /usr/local/include/ndn-cxx/encoding/block.hpp:43
#7 ndn::Name::~Name (this=0x7fffffffc378, __in_chrg=<optimized out>) at /usr/local/include/ndn-cxx/name.hpp:46
#8 0x000000000044680e in nlsr::SyncLogicHandler::~SyncLogicHandler (this=0x7fffffffc2e8, __in_chrg=<optimized out>)
at /home/ashlesh/ndn-src/2NLSR/src/communication/sync-logic-handler.hpp:42
#9 nlsr::Lsdb::~Lsdb (this=0x7fffffffc2d8, __in_chrg=<optimized out>) at /home/ashlesh/ndn-src/2NLSR/src/lsdb.hpp:43
#10 nlsr::Nlsr::~Nlsr (this=0x7fffffffbea0, __in_chrg=<optimized out>) at /home/ashlesh/ndn-src/2NLSR/src/nlsr.hpp:62
#11 0x000000000050d99d in nlsr::update::test::AdvertiseCrashFixture::~AdvertiseCrashFixture (this=0x7fffffffbc80, __in_chrg=<optimized out>)
at ../tests/update/test-advertise-crash.cpp:29
#12 nlsr::update::test::TestAdvertiseCrash::Basic::~Basic (this=0x7fffffffbc80, __in_chrg=<optimized out>)
at ../tests/update/test-advertise-crash.cpp:70
#13 nlsr::update::test::TestAdvertiseCrash::Basic_invoker () at ../tests/update/test-advertise-crash.cpp:70