Actions
Bug #3362
closedNFD crash after setInterestFilter for same prefix after app restart
Start date:
Due date:
% Done:
100%
Estimated time:
Description
I'm experiencing a stable crash of NFD in the following scenario:
- A simple app calls setInterestFilter
- Ctrl-C to stop the app
- Immediately call the same app to setInterestFilter for the same name
Here is the output logs
- This is from the first time app starts
1450041822.524297 INFO: [UnixStreamTransport] [id=0,local=unix:///private/tmp/nfd.sock,remote=fd://31] Creating transport
1450041822.524420 INFO: [FaceTable] Added face id=261 remote=fd://31 local=unix:///private/tmp/nfd.sock
1450041822.530105 INFO: [RibManager] Adding route /hello/world nexthop=261 origin=0 cost=0
1450041822.536433 INFO: [AutoPrefixPropagator] no hub connected to propagate /
- This is from the second time app starts
1450041828.586769 INFO: [Transport] [id=261,local=unix:///private/tmp/nfd.sock,remote=fd://31] setState UP -> FAILED
1450041828.587135 INFO: [Transport] [id=261,local=unix:///private/tmp/nfd.sock,remote=fd://31] setState FAILED -> CLOSED
1450041828.591469 INFO: [FaceTable] Removed face id=261 remote=fd://31 local=unix:///private/tmp/nfd.sock (LpFace failed)
1450041828.592871 INFO: [AutoPrefixPropagator] should be kept for another RIB entry: /localhost/nfd/rib
1450041829.380194 INFO: [UnixStreamTransport] [id=0,local=unix:///private/tmp/nfd.sock,remote=fd://31] Creating transport
1450041829.380317 INFO: [FaceTable] Added face id=262 remote=fd://31 local=unix:///private/tmp/nfd.sock
1450041829.385987 INFO: [RibManager] Adding route /hello/world nexthop=262 origin=0 cost=0
Assertion failed: (!entryIt->second.isNew()), function afterInsertRibEntry, file ../rib/auto-prefix-propagator.cpp, line 179.
Could be some effect of Ctrl-C
I have tested only on OSX 10.11.2 platform
Simple app that I'm using
#include <ndn-cxx/face.hpp>
#include <ndn-cxx/security/key-chain.hpp>
#include <memory>
int
main()
{
auto data = std::make_shared<ndn::Data>("/hello/world");
ndn::KeyChain keyChain;
keyChain.sign(*data);
std::cout << data->getFullName() << std::endl;
ndn::Face face;
face.setInterestFilter("/hello/world",
[&] (const ndn::InterestFilter&, const ndn::Interest& i) {
std::cerr << " << i " << i << std::endl;
if (i.getName() == data->getFullName()) {
face.put(*data);
}
},
nullptr);
face.processEvents();
}
Actions