Project

General

Profile

Bug #1770

Nonce list in PIT entry "infinitely" grows for long-lived Interests

Added by Alex Afanasyev about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Forwarding
Target version:
Start date:
07/17/2014
Due date:
% Done:

100%

Estimated time:
2.00 h

Description

In cases of "Long-lived" interests (interests that are being constantly refreshed, such as ChronoSync status update and some other NLSR updates) set of nonces is never reduces.

Whenever an interest is received, we record its nonce in PIT entry first and only then decide what to do. If PIT entry expires nonce list suppose to go away, but this is not the case with long-lived Interests, where an application will refresh PIT entry almost immediately.

This causing nonce list to include basically all possible nonce combinations for some PIT entries.

Just a small extract from the modified log to confirm the issue:

1405621927.020631 DEBUG: [Forwarder] onIncomingInterest face=18 interest=/ndn/NLSR/sync/5575d5392185c8d5a3f261a2f2a516dfc529f14824471e6ea67e08854a23d599
1405621927.023368 DEBUG: [PitEntry] addNonce 1075754550 (total 179 entries)

My conclusion is that in these cases, Nonce list instead of being used to prevent/detect duplicates, actually harm communication. May be there should be a timer attached to each nonce value so it is not kept "forever", or at least not for the lifetime of the PIT entry. But I'm not sure what could be, at least for the short-term, solution for this problem.


Related issues

Related to NFD - Task #1782: Redesign loop detection in PIT entryClosed

History

#1 Updated by Alex Afanasyev about 5 years ago

  • Subject changed from Nonce "infinitely" grows for long-lived Interests to Nonce list in PIT entry "infinitely" grows for long-lived Interests

#2 Updated by Beichuan Zhang about 5 years ago

Does the long list of nonces cause any problem right now? performance? correctness?

A quick and dirty fix is to put a limit on the number of nonces kept in the PIT entry.

If nonce is only used for loop detection, then only the nonces of outgoing interests need to be recorded, which should be much less than that of incoming interests. A small number, say 10, may be enough.

If there's a need to keep nonces of incoming interests, would one per incoming face be sufficient?

#3 Updated by Alex Afanasyev about 5 years ago

yes. The problem, I suspect, is right now. After an hour, NLSR interests start being rejected and bad things start to happen.

I asked Hoque to make a test with completely disable loop detection to see if this is the core of the problem or something else.

#4 Updated by Alex Afanasyev about 5 years ago

  • Priority changed from Urgent to High

#5 Updated by Alex Afanasyev about 5 years ago

From the test Hoque did, it seems that the core problem is not this one, though we should fix this one anyways.

I have found another problem with rib self-registrations (#1772) that probably is real reason. Will report more as I have results from new tests.

#6 Updated by Junxiao Shi about 5 years ago

Suppose an Interest is expressed once a second, the probability of having a duplicate Nonce after one month is 0.06%.
Thus I don't think this is a critical problem in terms of correctness.

The growing Nonce list takes memory, which is a problem.
Nonce list for one Interest, expressed once per second, needs 10MB memory after a month.

I agree with the solution in note-2.
The limit could be 256 Nonces (1KB memory).

#7 Updated by Alex Afanasyev about 5 years ago

  • Priority changed from High to Normal
  • Target version changed from v0.2 to v0.3

#8 Updated by Junxiao Shi about 5 years ago

  • Status changed from New to In Progress
  • Estimated time set to 2.00 h

#9 Updated by Junxiao Shi about 5 years ago

  • Status changed from In Progress to Code review
  • % Done changed from 0 to 100

#10 Updated by Alex Afanasyev about 5 years ago

  • % Done changed from 100 to 70

#11 Updated by Junxiao Shi about 5 years ago

  • Status changed from Code review to Closed
  • % Done changed from 70 to 100

Bug is closed because the approved commit http://gerrit.named-data.net/1041 can prevent the Nonce list from growing infinitely.

Further changes can be done in a separate Task.

#12 Updated by Alex Afanasyev about 5 years ago

Don't close the task without creating another task. Otherwise, this will hide the "problem".

#13 Updated by Junxiao Shi about 5 years ago

I disagree with the alternate solution so I don't create the Task.
Whoever pushing for another solution should create the Task.

#14 Updated by Alex Afanasyev about 5 years ago

So, you're trying to hide/ignore the problem. This is not correct.

#15 Updated by Junxiao Shi about 5 years ago

  • Related to Task #1782: Redesign loop detection in PIT entry added

Also available in: Atom PDF