Bug #1753
closed
PIT entry copies the Interest, instead of storing a shared_ptr of the supplied Interest
Added by Alex Afanasyev over 10 years ago.
Updated over 10 years ago.
Description
I'm still investigating the problem/cause, but what I'm getting is when I send /localhost/nfd/status Interest just after NFD starts, the Interest becomes "gone" between it is send to InternalFace->sendInterest and processed with posted event in InternalFace::processInterest.
The design is: PIT entry has a copy of Interest for indexing purpose; PIT downstream record has a shared_ptr of the latest similar Interest from that face.
There is no point of doing extra copies. It is enough to store shared_ptr to any of the Interests. This is a small performance issue.
In any case, the issue is different. Actually, there are two issues:
When two identical Interests are received (in my case I happen to send two /localhost/nfd/status Interests), neither of them is satisfied and you would see "Interest gone" warning from InternalFace. From what I'm guessing is that the second Interest replaces first Interest in the in record and previous shared_ptr is no longer valid.
I don't see that the PIT records is ever deleted in this case. Now I'm trying to find where we set timer for PIT entry lifetime.
What was motivation on using weak_ptr in InternalFace? The core of the problem is in this... In this specific scenario, shared_ptr becomes invalid by the time entry is getting processed (it is being replaced by another shared_ptr for similar interest).
- Status changed from New to Code review
- % Done changed from 0 to 100
- Status changed from Code review to Closed
Also available in: Atom
PDF