Project

General

Profile

Actions

Bug #4691

closed

NLSR crashes due to FATAL error about CanBePrefix being unset in an Interest

Added by Eric Newberry over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
08/02/2018
Due date:
% Done:

100%

Estimated time:

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.

Actions #1

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
Actions #2

Updated by Eric Newberry over 6 years ago

Ashlesh Gawande wrote:

Hmm, is ndn-cxx compiled with tests?:

Yes it is in my case.

Actions #4

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.

Actions #5

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.

Actions #6

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.

Actions #7

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
Actions #8

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.

Actions #10

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.

Actions #11

Updated by Ashlesh Gawande over 6 years ago

  • Status changed from New to Code review
Actions #12

Updated by Ashlesh Gawande over 6 years ago

  • % Done changed from 0 to 100
Actions #13

Updated by Ashlesh Gawande about 6 years ago

  • Status changed from Code review to Closed
  • Target version set to v0.5.0
Actions

Also available in: Atom PDF