[Ndn-interest] Issue in adding route

Athreya Nagaraj indiathreya92 at gmail.com
Tue May 28 06:09:42 PDT 2019


Hi Junxiao

I tried to analyze the core dump file using valgrind using the steps here
<https://github.com/cawka/nfd-debug-environment>. 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-

Starting program: /home/swlab/NFD/build/bin/nfdc route add /ndn1 256
> warning: the debug information found in "/lib64/ld-2.23.so" does not
> match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).
>
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> [New Thread 0x7ffff5447700 (LWP 22232)]
> Al ok256
>
> Thread 1 "nfdc" received signal SIGSEGV, Segmentation fault.
> 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
> 936 __r._M_ptr = 0;
> (gdb) bt
> #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
> #1  std::shared_ptr<ndn::Buffer
> const>::shared_ptr(std::shared_ptr<ndn::Buffer const>&&) (__r=<optimized
> out>, this=<optimized out>)
>     at /usr/include/c++/5/bits/shared_ptr.h:230
> #2  ndn::Block::Block (this=0x7fffffffc750, type=23, value=<error reading
> variable: Cannot access memory at address 0x1f>)
>     at ../ndn-cxx/encoding/block.cpp:144
> #3  0x00007ffff7c22177 in ndn::security::v2::KeyChain::sign
> (this=this at entry=0x7fffffffda60,
>     buf=0x50a832
> "\b\tlocalhost\b\003nfd\b\003rib\b\bregister\b\027h\025\a\006\b\004ndn1i\002\001",
> size=size at entry=123, keyName=...,
>     digestAlgorithm=digestAlgorithm at entry=ndn::DigestAlgorithm::SHA256)
> at ../ndn-cxx/security/v2/key-chain.cpp:679
> #4  0x00007ffff7c27205 in ndn::security::v2::KeyChain::sign
> (this=0x7fffffffda60, interest=..., params=...)
>     at ../ndn-cxx/security/v2/key-chain.cpp:457
> #5  0x00007ffff7ba7167 in
> ndn::security::CommandInterestSigner::makeCommandInterest (this=this at entry=0x7fffffffdbc8,
> name=..., params=...)
>     at ../ndn-cxx/security/command-interest-signer.cpp:60
> #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 at entry=0x7fffffffdbb0, command=std::shared_ptr (count
> 1, weak 0) 0x4e85c0, parameters=..., onSuccess=...,
>     onFailure=..., options=...) at ../ndn-cxx/mgmt/nfd/controller.cpp:62
> #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&) (
>     options=..., onFailure=..., onSuccess=..., parameters=...,
> this=0x7fffffffdbb0) at
> /usr/local/include/ndn-cxx/mgmt/nfd/controller.hpp:83
> #8  nfd::tools::nfdc::RibModule::add (ctx=...) at
> ../tools/nfdc/rib-module.cpp:206
> #9  0x0000000000421145 in std::function<void
> (nfd::tools::nfdc::ExecuteContext&)>::operator()(nfd::tools::nfdc::ExecuteContext&)
> const (
>     __args#0=..., this=0x7fffffffdc70) at
> /usr/include/c++/5/functional:2267
> #10 nfd::tools::nfdc::main (argc=<optimized out>, argv=<optimized out>) at
> ../tools/nfdc/main.cpp:72
> #11 0x00007ffff68dc830 in __libc_start_main (main=0x421430 <main(int,
> char**)>, argc=5, argv=0x7fffffffde48, init=<optimized out>,
>     fini=<optimized out>, rtld_fini=<optimized out>,
> stack_end=0x7fffffffde38) at ../csu/libc-start.c:291
> #12 0x00000000004260d9 in _start ()
>

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-

warning: the debug information found in "/lib64/ld-2.23.so" does not match
> "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).
>

Please let me know how I may be able to resolve this issue.

Thanks in advance.

On Mon, May 27, 2019 at 6:05 PM Junxiao Shi <shijunxiao at email.arizona.edu>
wrote:

> Hi Athreya
>
> For Ubuntu, you may install from PPA, not sources.
>
> 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.
>
> For NFD, first execute 'nfd-stop', then: sudo gdb --args
> /usr/local/bin/nfd --config /usr/local/etc/ndn/nfd.conf
> For nfdc: gdb --args nfdc route add /ndn1 256
>
> Yours, Junxiao
>
>
> On Mon, May 27, 2019, 08:17 Athreya Nagaraj via Ndn-interest <
> ndn-interest at lists.cs.ucla.edu> wrote:
>
>> Hi All,
>>
>> 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.
>>
>> 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.
>>
>> --
>> Regards
>> Athreya H N
>>
>>
>>

-- 
Regards
Athreya H N
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-interest/attachments/20190528/59b453c1/attachment.html>


More information about the Ndn-interest mailing list