Project

General

Profile

Bug #1803

NameTree memory leak

Added by Junxiao Shi about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Tables
Target version:
Start date:
07/27/2014
Due date:
% Done:

100%

Estimated time:
3.00 h

Description

Steps to reproduce:

  1. run NFD and have traffic go through it
  2. observe nNameTreeEntries, nFibEntries, nPitEntries, nMeasurementsEntries counters over time

Expected: nNameTreeEntries is linear with (nFibEntries + nPitEntries + nMeasurementsEntries)

Actual: nNameTreeEntries is constantly growing over time

At one instance, after NFD runs for 8748 seconds, the counters are:
nNameTreeEntries=69618, nFibEntries=6, nPitEntries=16, nMeasurementsEntries=76

There are at most 98 leaf nodes on the NameTree.
In the worst case that all Names are disjoint, the average Name length would be 710 Components, which is far from the expected traffic pattern.

Therefore I conclude there is a memory leak on the usage of NameTree: when a FIB/PIT/Measurements entry is erased, the corresponding NameTree entry (if empty) isn't erased.

History

#1 Updated by Junxiao Shi about 5 years ago

  • Target version set to v0.3
  • Estimated time set to 3.00 h

Code reading reveals that NameTree::eraseEntryIfEmpty is not called in FIB, Measurements, and StrategyChoice.
PIT erase procedure calls that function correctly.

Missing calls should be added.
In addition, the requirement for this function call should be noted in a Doxygen comment.

#2 Updated by Junxiao Shi about 5 years ago

  • Status changed from New to In Progress
  • Assignee set to Junxiao Shi
  • Priority changed from Normal to High

#3 Updated by Junxiao Shi about 5 years ago

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

#4 Updated by Junxiao Shi about 5 years ago

  • Status changed from Code review to Closed

Also available in: Atom PDF