Bug #4775
closedController should clean up SegmentFetcher upon destruction
100%
Description
ASan reports leaks from the controller fetch for NLSR unit tests #4682. Because internally NLSR starts fetch, but does not receive any data back.
ASan leaks from SegmentFetcher can now be mitigated after adding stop in #4692 issue (by keeping track of fetchers and stopping them in destructor). The controller should stop and clean any fetchers when it is destructed.
Updated by Davide Pesavento almost 6 years ago
This is because the SegmentFetcher destructor doesn't stop the fetcher and release its resources, and the fetcher instance keeps itself alive essentially through a cyclic shared_ptr
reference. We can "fix" the Controller as a short term solution, but it's time we stop adding more and more hacks on top of each other and fix the original design mistake instead.
Updated by Ashlesh Gawande almost 6 years ago
SegmentFetcher destructor is never called because we create a new shared_ptr to self, right? So destruction has to be done from outside.
Not sure what the correct design fix is.
Updated by Davide Pesavento almost 6 years ago
I'm not asking you to fix the design flaw in this task, such a fix would be most likely incompatible with existing users.
Updated by Ashlesh Gawande almost 6 years ago
- Related to Feature #4776: Re-design SegmentFetcher added
Updated by Davide Pesavento almost 6 years ago
- Tracker changed from Task to Bug
- Status changed from In Progress to Closed
- Target version set to v0.7
- % Done changed from 0 to 100