[Ndn-interest] ERROR: std::bad_alloc in repo-ng

Alexander Ni alexni1992 at gmail.com
Wed Jun 28 09:11:12 PDT 2017


Hi Junxiao,

Thanks for the bug report description and sorry for the delay.

OS: fedora 22
Compiler: gcc-5.3.1-6.fc22.x86_64
NFD and ndn-cxx version: 0.4.1, ndn-tools-0.3
boost: boost-1.57.0-6.fc22.x86_64

We expected to fetch data file from repo-ng by using ndncatchanks.
But get *std::bad_alloc* error in repo-ng, after which it stops.
We have used tcp bulk to insert data into repo-ng (data was converted into
tlv format before insertion).
Here is the trace from NFD, and gdb trace from repo-ng (is attached below).




Best Regards,
Alexander Ni


On Fri, Jun 23, 2017 at 9:30 AM, Junxiao Shi <shijunxiao at email.arizona.edu>
wrote:

> Hi Alexander
>
> Can you provide a stack trace and other information about your system?
> See http://www.lists.cs.ucla.edu/pipermail/nfd-dev/2016-May/001748.html
>
> Yours, Junxiao
>
> On Jun 22, 2017, at 4:46 AM, Alexander Ni <alexni1992 at gmail.com> wrote:
>
> Hi all,
>
> I get *std::bad_alloc *error in repo-ng when I trying to request a data
> from another machine with the use of ndncatchunks. It seems to be a memory
> issue but I can see that I still have some memory free on the node.
>
> We use a packet size above 8800 octets. But I don't think that this could
> be the reason of the error on that particular problem. Because as I said I
> sure that there still some memory and exception is thrown in the early
> moment of when it was requested.
>
> Is there any other point that could be the reason of it?
>
> Best Regards,
> Alexander Ni
>
> _______________________________________________
> Ndn-interest mailing list
> Ndn-interest at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-interest/attachments/20170629/90226794/attachment.html>
-------------- next part --------------
Starting program: /home/kim/repo-ng/build/ndn-repo-ng 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
__atomic_add_dispatch (__val=1, __mem=0x7ffff248ba48 <init+8>) at /usr/include/c++/5.3.1/ext/atomicity.h:96
96	      __atomic_add(__mem, __val);
#0  __atomic_add_dispatch (__val=1, __mem=0x7ffff248ba48 <init+8>) at /usr/include/c++/5.3.1/ext/atomicity.h:96
#1  _M_add_ref_copy (this=0x7ffff248ba40 <init>) at /usr/include/c++/5.3.1/bits/shared_ptr_base.h:134
#2  __shared_count (__r=..., this=0xa7d1c0) at /usr/include/c++/5.3.1/bits/shared_ptr_base.h:666
#3  __shared_ptr (this=0xa7d1b8) at /usr/include/c++/5.3.1/bits/shared_ptr_base.h:923
#4  shared_ptr (this=0xa7d1b8) at /usr/include/c++/5.3.1/bits/shared_ptr.h:107
#5  ndn::Block::Block (this=0xa7d1b8) at /usr/local/include/ndn-cxx/encoding/block.hpp:43
#6  0x00007ffff799ab90 in construct<ndn::Block, ndn::Block const&> (__p=<optimized out>, this=0x7fffffffb950) at /usr/include/c++/5.3.1/ext/new_allocator.h:120
#7  construct<ndn::Block, ndn::Block const&> (__p=<optimized out>, __a=...) at /usr/include/c++/5.3.1/bits/alloc_traits.h:530
#8  std::vector<ndn::Block, std::allocator<ndn::Block> >::_M_emplace_back_aux<ndn::Block const&> (this=this at entry=0x7fffffffb950) at /usr/include/c++/5.3.1/bits/vector.tcc:416
#9  0x00007ffff7997ba2 in push_back (__x=..., this=0x7fffffffb950) at /usr/include/c++/5.3.1/bits/stl_vector.h:923
#10 ndn::Block::push_back (this=this at entry=0x7fffffffb910, element=...) at ../src/encoding/block.cpp:571
#11 0x00007ffff7a1e7a7 in append (value=..., this=0x7fffffffb900) at ../src/name.hpp:177
#12 ndn::Name::getSubName (this=this at entry=0x7fffffffdaf8, iStartComponent=iStartComponent at entry=0, nComponents=nComponents at entry=4) at ../src/name.cpp:287
#13 0x000000000045033d in getPrefix (nComponents=4, this=0x7fffffffdaf8) at /usr/local/include/ndn-cxx/name.hpp:254
#14 repo::Index::selectChild (this=this at entry=0x7fffffffdad0, interest=..., startingPoint=..., startingPoint at entry=...) at ../src/storage/index.cpp:215
#15 0x00000000004538b7 in repo::Index::find (this=this at entry=0x7fffffffdad0, interest=...) at ../src/storage/index.cpp:98
#16 0x0000000000455af1 in repo::RepoStorage::readData (this=0x7fffffffdac8, interest=...) at ../src/storage/repo-storage.cpp:105
#17 0x000000000042a82e in repo::ReadHandle::onInterest (this=0x7fffffffdc30, prefix=..., interest=...) at ../src/handles/read-handle.cpp:28
#18 0x000000000042c6f9 in operator()<const ndn::InterestFilter&, const ndn::Interest&, void> (__object=<optimized out>, this=0xa79170) at /usr/include/c++/5.3.1/functional:600
#19 __call<void, ndn::InterestFilter const&, ndn::Interest const&, 0ul, 1ul, 2ul> (__args=<unknown type in /home/kim/repo-ng/build/ndn-repo-ng, CU 0x157bdf, DIE 0x194e5b>, 
    this=0xa79170) at /usr/include/c++/5.3.1/functional:1074
#20 operator()<const ndn::InterestFilter&, const ndn::Interest&, void> (this=0xa79170) at /usr/include/c++/5.3.1/functional:1133
#21 std::_Function_handler<void (ndn::InterestFilter const&, ndn::Interest const&), std::_Bind<std::_Mem_fn<void (repo::ReadHandle::*)(ndn::Name const&, ndn::Interest const&)> (repo::ReadHandle*, std::_Placeholder<1>, std::_Placeholder<2>)> >::_M_invoke(std::_Any_data const&, ndn::InterestFilter const&, ndn::Interest const&) (__functor=..., 
    __args#0=..., __args#1=...) at /usr/include/c++/5.3.1/functional:1871
#22 0x00007ffff79ad202 in operator() (__args#1=..., __args#0=..., this=<optimized out>) at /usr/include/c++/5.3.1/functional:2267
#23 invokeInterestCallback (interest=..., this=<optimized out>) at ../src/detail/interest-filter-record.hpp:59
#24 processInterestFilters (interest=..., this=0x6a3330) at ../src/detail/face-impl.hpp:115
#25 ndn::Face::onReceiveElement (this=<optimized out>, blockFromDaemon=...) at ../src/face.cpp:508
#26 0x00007ffff7ad4751 in operator() (__args#0=..., this=<optimized out>) at /usr/include/c++/5.3.1/functional:2267
#27 receive (wire=..., this=<optimized out>) at ../src/transport/transport.hpp:161
#28 processAll (nBytesAvailable=101, offset=<synthetic pointer>, 
    buffer=0x7ffff201a048 "\005c\aA\b\005kisti\b\005atmos\b1hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc\t\030\r\001\003\016\001\003\020\r\023", this=0x7ffff201a020)
    at ../src/transport/stream-transport.hpp:222
#29 ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>::handleAsyncReceive (this=0x7ffff201a020, error=..., nBytesRecvd=<optimized out>)
    at ../src/transport/stream-transport.hpp:246
#30 0x00007ffff7ad3306 in operator()<const boost::system::error_code&, long unsigned int const&, void> (__object=<optimized out>, this=0x7fffffffd700)
    at /usr/include/c++/5.3.1/functional:600
#31 __call<void, boost::system::error_code const&, unsigned long const&, 0ul, 1ul, 2ul> (__args=<optimized out>, this=0x7fffffffd700) at /usr/include/c++/5.3.1/functional:1074
#32 operator()<const boost::system::error_code&, long unsigned int const&, void> (this=0x7fffffffd700) at /usr/include/c++/5.3.1/functional:1133
#33 operator() (this=0x7fffffffd700) at /usr/include/boost/asio/detail/bind_handler.hpp:127
#34 asio_handler_invoke<boost::asio::detail::binder2<std::_Bind<std::_Mem_fn<void (ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>::*)(const boost::system::error_code&, long unsigned int)>(ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>*, std::_Placeholder<1>, std::_Placeholder<2>)>, boost::system::error_code, long unsigned int> > (function=...) at /usr/include/boost/asio/handler_invoke_hook.hpp:69
#35 invoke<boost::asio::detail::binder2<std::_Bind<std::_Mem_fn<void (ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>::*)(const boost::system::error_code&, long unsigned int)>(ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>*, std::_Placeholder<1>, std::_Placeholder<2>)>, boost::system::error_code, long unsigned int>, std::_Bind<std::_Mem_fn<void (ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>::*)(const boost::system::error_code&, long unsigned int)>(ndn::StreamTransportImpl<ndn::UnixTransport, boost::asio::local::stream_protocol>*, std::_Placeholder<1>, std::_Placeholder<2>)> > (context=..., 
    function=...) at /usr/include/boost/asio/detail/handler_invoke_helpers.hpp:37
#36 boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, std::_Bind<std::_Mem_fn<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::_Placeholder<1>, std::_Placeholder<2>)> >::do_complete(boost::asio::detail::task_io_service*, boost::asio::detail::task_io_service_operation*, boost::system::error_code const&, unsigned long) (owner=0x68e240, base=0x730470) at /usr/include/boost/asio/detail/reactive_socket_recv_op.hpp:110
#37 0x0000000000419502 in complete (bytes_transferred=0, ec=..., owner=..., this=<optimized out>) at /usr/include/boost/asio/detail/task_io_service_operation.hpp:38
#38 boost::asio::detail::epoll_reactor::descriptor_state::do_complete (owner=0x68e240, base=0xa7dda0, ec=..., bytes_transferred=<optimized out>)
    at /usr/include/boost/asio/detail/impl/epoll_reactor.ipp:651
#39 0x0000000000415fc4 in complete (bytes_transferred=1, ec=..., owner=..., this=0xa7dda0) at /usr/include/boost/asio/detail/task_io_service_operation.hpp:38
#40 do_run_one (ec=..., this_thread=..., lock=..., this=<optimized out>) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:372
#41 run (ec=..., this=0x68e240) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:149
#42 run (this=0x7fffffffd7f0) at /usr/include/boost/asio/impl/io_service.ipp:59
#43 main (argc=<optimized out>, argv=<optimized out>) at ../src/main.cpp:91
#12 ndn::Name::getSubName (this=this at entry=0x7fffffffdaf8, iStartComponent=iStartComponent at entry=0, nComponents=nComponents at entry=4) at ../src/name.cpp:287
287	    result.append(at(i));
-------------- next part --------------
1498183791.795766 TRACE: [TcpTransport] [id=262,local=tcp4://129.82.138.96:6363,remote=tcp4://203.253.235.165:49459] Received: 101 bytes
1498183791.795850 TRACE: [LinkService] [id=262,local=tcp4://129.82.138.96:6363,remote=tcp4://203.253.235.165:49459] receiveInterest
1498183791.795915 DEBUG: [Forwarder] onIncomingInterest face=262 interest=/kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc
1498183791.796092 TRACE: [NameTree] lookup /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc
1498183791.796281 TRACE: [NameTree] insert /
1498183791.796305 TRACE: [NameTree] Name / hash value = 0  location = 0
1498183791.796346 TRACE: [NameTree] insert /kisti
1498183791.796385 TRACE: [NameTree] Name /kisti hash value = 4122721021647645288  location = 616
1498183791.796414 TRACE: [NameTree] insert /kisti/atmos
1498183791.796454 TRACE: [NameTree] Name /kisti/atmos hash value = 1574292672624393462  location = 246
1498183791.796497 TRACE: [NameTree] insert /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc
1498183791.796638 TRACE: [NameTree] Name /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc hash value = 16045853484222589639  location = 711
1498183791.796877 DEBUG: [Forwarder] onContentStoreMiss interest=/kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc
1498183791.796997 TRACE: [Forwarder] onContentStoreMiss noLinkObject
1498183791.797012 DEBUG: [BestRouteStrategy2] /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc?ndn.MinSuffixComponents=3&ndn.MaxSuffixComponents=3&ndn.ChildSelector=1&ndn.Nonce=1493150691&ndn.Exclude=*,%FD%00%00%01%5C%CEaQg from=262 retransmitNoNextHop
1498183792.658929 TRACE: [DeadNonceList] adjustCapacity DOWN capacity=8
1498183792.702885 TRACE: [DeadNonceList] mark nMarks=9
1498183793.903030 TRACE: [DeadNonceList] mark nMarks=10
1498183795.103179 TRACE: [DeadNonceList] mark nMarks=11
1498183795.797115 DEBUG: [Forwarder] onInterestUnsatisfied interest=/kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc
1498183795.797202 DEBUG: [Strategy] beforeExpirePendingInterest pitEntry=/kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc
1498183795.797366 DEBUG: [Forwarder] onInterestFinalize interest=/kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc unsatisfied
1498183795.797571 TRACE: [NameTree] eraseEntryIfEmpty /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc
1498183795.797793 TRACE: [NameTree] eraseEntryIfEmpty /kisti/atmos
1498183795.800675 TRACE: [TcpTransport] [id=262,local=tcp4://129.82.138.96:6363,remote=tcp4://203.253.235.165:49459] Received: 95 bytes
1498183795.800783 TRACE: [LinkService] [id=262,local=tcp4://129.82.138.96:6363,remote=tcp4://203.253.235.165:49459] receiveInterest
1498183795.800855 DEBUG: [Forwarder] onIncomingInterest face=262 interest=/kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc/%FD%00%00%01%5C%CEaQg/%00%01
1498183795.801152 TRACE: [NameTree] lookup /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc/%FD%00%00%01%5C%CEaQg/%00%01
1498183795.801455 TRACE: [NameTree] insert /
1498183795.801483 TRACE: [NameTree] Name / hash value = 0  location = 0
1498183795.801515 TRACE: [NameTree] insert /kisti
1498183795.801559 TRACE: [NameTree] Name /kisti hash value = 4122721021647645288  location = 616
1498183795.801599 TRACE: [NameTree] insert /kisti/atmos
1498183795.801658 TRACE: [NameTree] Name /kisti/atmos hash value = 1574292672624393462  location = 246
1498183795.801723 TRACE: [NameTree] insert /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc
1498183795.801934 TRACE: [NameTree] Name /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc hash value = 16045853484222589639  location = 711
1498183795.802155 TRACE: [NameTree] Did not find /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc, need to insert it to the table
1498183795.802370 TRACE: [NameTree] insert /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc/%FD%00%00%01%5C%CEaQg
1498183795.802580 TRACE: [NameTree] Name /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc/%FD%00%00%01%5C%CEaQg hash value = 9146025629413341248  location = 64
1498183795.802854 TRACE: [NameTree] Did not find /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc/%FD%00%00%01%5C%CEaQg, need to insert it to the table
1498183795.803130 TRACE: [NameTree] insert /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc/%FD%00%00%01%5C%CEaQg/%00%01
1498183795.803426 TRACE: [NameTree] Name /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc/%FD%00%00%01%5C%CEaQg/%00%01 hash value = 13951227086930938352  location = 496
1498183795.803724 TRACE: [NameTree] Did not find /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc/%FD%00%00%01%5C%CEaQg/%00%01, need to insert it to the table
1498183795.803965 DEBUG: [ContentStore] find /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc/%FD%00%00%01%5C%CEaQg/%00%01 L
1498183795.804190 DEBUG: [ContentStore]   no-match
1498183795.804201 DEBUG: [Forwarder] onContentStoreMiss interest=/kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc/%FD%00%00%01%5C%CEaQg/%00%01
1498183795.804303 TRACE: [Forwarder] onContentStoreMiss noLinkObject
1498183795.804315 DEBUG: [BestRouteStrategy2] /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc/%FD%00%00%01%5C%CEaQg/%00%01?ndn.MaxSuffixComponents=1&ndn.Nonce=269863431 from=262 noNextHop
1498183795.804527 DEBUG: [Forwarder] onOutgoingNack face=262 nack=/kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc/%FD%00%00%01%5C%CEaQg/%00%01~NoRoute OK
1498183795.804818 TRACE: [LinkService] [id=262,local=tcp4://129.82.138.96:6363,remote=tcp4://203.253.235.165:49459] sendNack
1498183795.804904 TRACE: [TcpTransport] [id=262,local=tcp4://129.82.138.96:6363,remote=tcp4://203.253.235.165:49459] doSend
1498183795.804972 DEBUG: [Forwarder] onInterestReject interest=/kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc/%FD%00%00%01%5C%CEaQg/%00%01
1498183795.805266 TRACE: [TcpTransport] [id=262,local=tcp4://129.82.138.96:6363,remote=tcp4://203.253.235.165:49459] Successfully sent: 108 bytes
1498183795.905274 DEBUG: [Forwarder] onInterestFinalize interest=/kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc/%FD%00%00%01%5C%CEaQg/%00%01 unsatisfied
1498183795.905553 TRACE: [NameTree] eraseEntryIfEmpty /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc/%FD%00%00%01%5C%CEaQg/%00%01
1498183795.905891 TRACE: [NameTree] eraseEntryIfEmpty /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc/%FD%00%00%01%5C%CEaQg
1498183795.906112 TRACE: [NameTree] eraseEntryIfEmpty /kisti/atmos/hur_Amon_CESM1-CAM5_rcp60_r1i1p1_200601-204912.nc
1498183795.906320 TRACE: [NameTree] eraseEntryIfEmpty /kisti/atmos


More information about the Ndn-interest mailing list