Bug #4691
closedNLSR crashes due to FATAL error about CanBePrefix being unset in an Interest
100%
Description
It appears that NLSR is sending Interests with CanBePrefix unset, which is seemingly disallowed according to the error message that is being outputted:
FATAL: [nlsr.NlsrRunner] ERROR: Interest.CanBePrefix is unset
This was seen when using the latest git HEAD versions of ndn-cxx, ChronoSync, and NLSR with Mini-NDN.
Updated by Ashlesh Gawande over 6 years ago
Hmm, is ndn-cxx compiled with tests?:
I see this in interest.cpp:
#ifdef NDN_CXX_HAVE_TESTS
if (s_errorIfCanBePrefixUnset) {
BOOST_THROW_EXCEPTION(std::logic_error("Interest.CanBePrefix is unset"));
}
#endif // NDN_CXX_HAVE_TESTS
Updated by Eric Newberry over 6 years ago
Ashlesh Gawande wrote:
Hmm, is ndn-cxx compiled with tests?:
Yes it is in my case.
Updated by Ashlesh Gawande over 6 years ago
Does this fix it:
https://gerrit.named-data.net/#/c/NLSR/+/4893/?
Updated by Junxiao Shi over 6 years ago
Hmm, is ndn-cxx compiled with tests?:
Yes it is in my case.
You shouldn't use tests-enabled ndn-cxx with other projects. See https://yoursunny.com/t/2017/NFD-devbox/ "./waf configure" section for recommended setup.
Updated by Eric Newberry over 6 years ago
Junxiao Shi wrote:
Hmm, is ndn-cxx compiled with tests?:
Yes it is in my case.
You shouldn't use tests-enabled ndn-cxx with other projects. See https://yoursunny.com/t/2017/NFD-devbox/ "./waf configure" section for recommended setup.
I disagree - tests-enabled ndn-cxx shouldn't break other projects.
Updated by Alex Afanasyev over 6 years ago
Test mode is to test the library/project itself, so I wouldn't agree with this. And this specific crash was, actually, useful to fix the issue with the packet format transition.
Updated by Eric Newberry over 6 years ago
Ashlesh Gawande wrote:
Does this fix it:
https://gerrit.named-data.net/#/c/NLSR/+/4893/?
No, although the issue appears in a different place:
DEBUG: [nlsr.HelloProtocol] Scheduling HELLO Interests in 10 seconds
WARNING: Interest.CanBePrefix will be set to 0 in the near future. Please declare a preferred setting via Interest::setDefaultCanBePrefix.ERROR: Interest.CanBePrefix is unset
Updated by Ashlesh Gawande over 6 years ago
Hmm, maybe Chronosync then - let me look into it and see if I can push a change.
Updated by Ashlesh Gawande over 6 years ago
Updated by Eric Newberry over 6 years ago
Ashlesh Gawande wrote:
Try this:
https://gerrit.named-data.net/#/c/ChronoSync/+/4894/
The combination of this Change (patchset 1) for ChronoSync and Change 4893 (patchset 2) for NLSR appears to have fixed the problem.
Updated by Ashlesh Gawande over 6 years ago
- Status changed from New to Code review
Updated by Ashlesh Gawande over 6 years ago
- Status changed from Code review to Closed
- Target version set to v0.5.0