https://redmine.named-data.net/https://redmine.named-data.net/favicon.ico?14759811232014-11-13T15:36:15ZNDN project issue tracking systemNFD - Bug #2177: INVALID_FACE_ID appears in FIBhttps://redmine.named-data.net/issues/2177?journal_id=60182014-11-13T15:36:15ZJunxiao Shi
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-9 priority-2 priority-default closed" href="/issues/1812">Bug #1812</a>: INVALID_FACE_ID appears in FIB</i> added</li></ul> NFD - Bug #2177: INVALID_FACE_ID appears in FIBhttps://redmine.named-data.net/issues/2177?journal_id=60522014-11-14T13:55:33ZVince Lehmanvslehman@memphis.edu
<ul></ul><p>I'm not sure of the cause but it looks like there is an issue with something called in "Fib::removeNextHopFromAllEntries".</p>
<p>If you add these debug messages to the code:</p>
<pre><code>void
Fib::removeNextHopFromAllEntries(shared_ptr<Face> face)
{
for (NameTree::const_iterator it = m_nameTree.fullEnumerate(
&predicate_NameTreeEntry_hasFibEntry); it != m_nameTree.end();) {
shared_ptr<fib::Entry> entry = it->getFibEntry();
++it; // advance the iterator before `erase` invalidates it
std::cout << "Before " << entry->getPrefix() << ": " << entry->getNextHops().size() << std::endl;
entry->removeNextHop(face);
std::cout << "After " << entry->getPrefix() << ": " << entry->getNextHops().size() << std::endl;
if (!entry->hasNextHops()) {
this->erase(*entry);
}
}
std::cout << "After NextHop removal" << std::endl;
for (NameTree::const_iterator it = m_nameTree.fullEnumerate(&predicate_NameTreeEntry_hasFibEntry);
it != m_nameTree.end(); ++it)
{
shared_ptr<fib::Entry> entry = it->getFibEntry();
std::cout << entry->getPrefix() << ": " << entry->getNextHops().size() << std::endl;
}
}
</code></pre>
<p>You get:</p>
<pre><code>...
Before /localhost/app/%FD%04: 1
After /localhost/app/%FD%04: 0
Before /localhost/app/%FD%01%24: 1
After /localhost/app/%FD%01%24: 0
After NextHop removal
/localhost/app/%FD%CD: 1
/localhost/app/%FDc: 1
/localhost/app/%FDS: 1
/localhost/app/%FD%A9: 1
/localhost/app/%FD%01: 1
/localhost/app/%FD%1D: 1
/localhost/app/%FDH: 1
...
</code></pre>
<p>So, it looks like the nexthops are not being removed and an invalid face is assigned to them by the FaceTable:</p>
<pre><code>void
FaceTable::remove(shared_ptr<Face> face)
{
...
face->setId(INVALID_FACEID);
...
m_forwarder.getFib().removeNextHopFromAllEntries(face);
}
</code></pre> NFD - Bug #2177: INVALID_FACE_ID appears in FIBhttps://redmine.named-data.net/issues/2177?journal_id=60962014-11-17T12:01:07ZLan Wanglanwang@memphis.edu
<ul></ul><p>Alex/Junxiao: who's the right person to fix this problem?</p>
NFD - Bug #2177: INVALID_FACE_ID appears in FIBhttps://redmine.named-data.net/issues/2177?journal_id=60972014-11-17T12:28:12ZJunxiao Shi
<ul></ul><p>It's too early to talk about assignment. We need to know the cause of this problem before deciding who to assign.</p>
NFD - Bug #2177: INVALID_FACE_ID appears in FIBhttps://redmine.named-data.net/issues/2177?journal_id=60992014-11-17T13:12:18ZLan Wanglanwang@memphis.edu
<ul></ul><p>Can whoever wrote the code mentioned in note 2 figure out the problem?</p>
NFD - Bug #2177: INVALID_FACE_ID appears in FIBhttps://redmine.named-data.net/issues/2177?journal_id=61132014-11-17T17:47:31ZJunxiao Shi
<ul><li><strong>Assignee</strong> set to <i>Junxiao Shi</i></li></ul><p>I'll investigate this problem.</p>
<p>Since it doesn't affect normal applications that register only a few prefixes, this is not urgent.</p>
NFD - Bug #2177: INVALID_FACE_ID appears in FIBhttps://redmine.named-data.net/issues/2177?journal_id=65022014-12-02T23:33:42ZJunxiao Shi
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>20</i></li></ul><p>This Bug is due to <code>Fib::removeNextHopFromAllEntries</code>'s incorrect usage of <code>NameTree</code> iterators.<br><br>
NameTree full enumeration iterators may be invalidated whenever there is a NameTree entry insertion or deletion.<br>
Full enumeration iterators are tied to buckets, but an insertion or deletion may cause NameTree to resize its hashtable, where nodes are rehashed into new buckets.<br><br>
This can be confirmed by observing that <code>this->size()</code> at the top of <code>Fib::removeNextHopFromAllEntries</code> differs from the number of loop body executions.</p>
NFD - Bug #2177: INVALID_FACE_ID appears in FIBhttps://redmine.named-data.net/issues/2177?journal_id=65032014-12-02T23:53:04ZJunxiao Shi
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Code review</i></li><li><strong>% Done</strong> changed from <i>20</i> to <i>100</i></li></ul><p><a href="http://gerrit.named-data.net/1505">http://gerrit.named-data.net/1505</a></p>
NFD - Bug #2177: INVALID_FACE_ID appears in FIBhttps://redmine.named-data.net/issues/2177?journal_id=65462014-12-04T07:06:47ZJunxiao Shi
<ul><li><strong>Status</strong> changed from <i>Code review</i> to <i>Closed</i></li></ul>