Bug #4775
closed
Controller should clean up SegmentFetcher upon destruction
Added by Ashlesh Gawande about 6 years ago.
Updated about 6 years ago.
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.
Related issues
1 (1 open — 0 closed)
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.
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.
I'm not asking you to fix the design flaw in this task, such a fix would be most likely incompatible with existing users.
- 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
Also available in: Atom
PDF