Actions
Bug #1718
closedFace still alive after any failure
Start date:
06/30/2014
Due date:
% Done:
100%
Estimated time:
Description
When on-demand UdpFace is being closed, the object itself is still alive.
To check:
in
udp-face.cpp
on line 128 (just after close()):NFD_LOG_ERROR("Remaining references: " << this->shared_from_this().use_count() - 1);
run NFD
from another machine either send UDP packet with
nc
or establish udp face towards the machinewait
Expectation: Remaining references: 0
(or crash)
Actual: Remaining references: 2
This may not be just UdpFace, I just discovered it with idle UdpFace. Where could we forgotten this face?
Updated by Alex Afanasyev over 10 years ago
- Subject changed from UdpFace still alive after being closed to Face still alive after any failure
- Status changed from New to Resolved
- Assignee set to Alex Afanasyev
- Target version set to v0.2
This is legitimate bug and I found the reason. onFail event emitter is never cleaned, resulting in a self-referenced shared_ptr (face->onFail indirectly reference face).
This applies to all faces. Will submit a patch to fix the problem---will clean onFail inside Face::fail()
Updated by Alex Afanasyev over 10 years ago
- Status changed from Resolved to Code review
- % Done changed from 0 to 100
Updated by Alex Afanasyev over 10 years ago
- Status changed from Code review to Closed
Actions