<div dir="ltr"><div dir="ltr"><div>Hi Junxiao</div><div><br></div><div>I tried to analyze the core dump file using valgrind using the steps <a href="https://github.com/cawka/nfd-debug-environment">here</a>. However, I was getting an error in GDB saying the file format was not specified. I was able to run the program with GDB and the backtrace is as follows- <br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Starting program: /home/swlab/NFD/build/bin/nfdc route add /ndn1 256<br>warning: the debug information found in "/lib64/<a href="http://ld-2.23.so">ld-2.23.so</a>" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).<br><br>[Thread debugging using libthread_db enabled]<br>Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".<br>[New Thread 0x7ffff5447700 (LWP 22232)]<br>Al ok256<br><br>Thread 1 "nfdc" received signal SIGSEGV, Segmentation fault.<br>0x00007ffff7ab3974 in std::__shared_ptr<ndn::Buffer const, (__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<ndn::Buffer const, (__gnu_cxx::_Lock_policy)2>&&) (__r=<optimized out>, this=<optimized out>) at /usr/include/c++/5/bits/shared_ptr_base.h:936<br>936         __r._M_ptr = 0;<br>(gdb) bt<br>#0  0x00007ffff7ab3974 in std::__shared_ptr<ndn::Buffer const, (__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<ndn::Buffer const, (__gnu_cxx::_Lock_policy)2>&&) (__r=<optimized out>, this=<optimized out>) at /usr/include/c++/5/bits/shared_ptr_base.h:936<br>#1  std::shared_ptr<ndn::Buffer const>::shared_ptr(std::shared_ptr<ndn::Buffer const>&&) (__r=<optimized out>, this=<optimized out>)<br>    at /usr/include/c++/5/bits/shared_ptr.h:230<br>#2  ndn::Block::Block (this=0x7fffffffc750, type=23, value=<error reading variable: Cannot access memory at address 0x1f>)<br>    at ../ndn-cxx/encoding/block.cpp:144<br>#3  0x00007ffff7c22177 in ndn::security::v2::KeyChain::sign (this=this@entry=0x7fffffffda60, <br>    buf=0x50a832 "\b\tlocalhost\b\003nfd\b\003rib\b\bregister\b\027h\025\a\006\b\004ndn1i\002\001", size=size@entry=123, keyName=..., <br>    digestAlgorithm=digestAlgorithm@entry=ndn::DigestAlgorithm::SHA256) at ../ndn-cxx/security/v2/key-chain.cpp:679<br>#4  0x00007ffff7c27205 in ndn::security::v2::KeyChain::sign (this=0x7fffffffda60, interest=..., params=...)<br>    at ../ndn-cxx/security/v2/key-chain.cpp:457<br>#5  0x00007ffff7ba7167 in ndn::security::CommandInterestSigner::makeCommandInterest (this=this@entry=0x7fffffffdbc8, name=..., params=...)<br>    at ../ndn-cxx/security/command-interest-signer.cpp:60<br>#6  0x00007ffff7b37de8 in ndn::nfd::Controller::startCommand(std::shared_ptr<ndn::nfd::ControlCommand> const&, ndn::nfd::ControlParameters const&, std::function<void (ndn::nfd::ControlParameters const&)> const&, std::function<void (ndn::mgmt::ControlResponse const&)> const&, ndn::nfd::CommandOptions const&) (this=this@entry=0x7fffffffdbb0, command=std::shared_ptr (count 1, weak 0) 0x4e85c0, parameters=..., onSuccess=..., <br>    onFailure=..., options=...) at ../ndn-cxx/mgmt/nfd/controller.cpp:62<br>#7  0x0000000000468fce in ndn::nfd::Controller::start<ndn::nfd::RibRegisterCommand>(ndn::nfd::ControlParameters const&, std::function<void (ndn::nfd::ControlParameters const&)> const&, std::function<void (ndn::mgmt::ControlResponse const&)> const&, ndn::nfd::CommandOptions const&) (<br>    options=..., onFailure=..., onSuccess=..., parameters=..., this=0x7fffffffdbb0) at /usr/local/include/ndn-cxx/mgmt/nfd/controller.hpp:83<br>#8  nfd::tools::nfdc::RibModule::add (ctx=...) at ../tools/nfdc/rib-module.cpp:206<br>#9  0x0000000000421145 in std::function<void (nfd::tools::nfdc::ExecuteContext&)>::operator()(nfd::tools::nfdc::ExecuteContext&) const (<br>    __args#0=..., this=0x7fffffffdc70) at /usr/include/c++/5/functional:2267<br>#10 nfd::tools::nfdc::main (argc=<optimized out>, argv=<optimized out>) at ../tools/nfdc/main.cpp:72<br>#11 0x00007ffff68dc830 in __libc_start_main (main=0x421430 <main(int, char**)>, argc=5, argv=0x7fffffffde48, init=<optimized out>, <br>    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffde38) at ../csu/libc-start.c:291<br>#12 0x00000000004260d9 in _start ()</div></blockquote><div><br></div><div>I want to mention here that I'm able to run the same commands in other PCs. When I run the program in GDB in other systems, I've noticed that this warning does not come up-</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>warning: the debug information found in "/lib64/<a href="http://ld-2.23.so">ld-2.23.so</a>" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).</div></blockquote><div><br></div><div>Please let me know how I may be able to resolve this issue.</div><div><br></div><div>Thanks in advance.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 27, 2019 at 6:05 PM Junxiao Shi <<a href="mailto:shijunxiao@email.arizona.edu">shijunxiao@email.arizona.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Hi Athreya<div dir="auto"><br></div><div dir="auto">For Ubuntu, you may install from PPA, not sources.</div><div dir="auto"><br></div><div dir="auto">The core file isn't useful when you build from sources, because we don't have the exactly same binary. You can, however, debug the process in gdb.</div><div dir="auto"><br></div><div dir="auto">For NFD, first execute 'nfd-stop', then: sudo gdb --args /usr/local/bin/nfd --config /usr/local/etc/ndn/nfd.conf</div><div dir="auto">For nfdc: gdb --args nfdc route add /ndn1 256</div><div dir="auto"><br></div><div dir="auto">Yours, Junxiao</div><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Mon, May 27, 2019, 08:17 Athreya Nagaraj via Ndn-interest <<a href="mailto:ndn-interest@lists.cs.ucla.edu" target="_blank">ndn-interest@lists.cs.ucla.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi All,</div><div><br></div><div>I'm trying to run a test bed of 4 systems with NFD installed in it. One of the systems has the issue of getting Segmentation Fault when I run the command nfdc route add /ndn1 256. I've attached the core file for the same. Please let me what can be done to resolve this. Also, please let me know how I can run nfdc with debugging enabled so that I can get a clearer picture on this issue.</div><div><br></div><div>The system I'm running this on has Ubuntu 16.04 LTS and I've installed ndn-cxx and NFD directly from sources. I've enabled ethernet support and hence there was no need to add a face before adding the route. <br></div><div><br>-- <br><div dir="ltr" class="gmail-m_-2140064823698831192m_5192444781699953933gmail_signature"><div dir="ltr"><div>Regards</div><div>Athreya H N</div></div></div></div></div><br><br>
</blockquote></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards</div><div>Athreya H N</div></div></div></div>