Project

General

Profile

Actions

Bug #4775

closed

Controller should clean up SegmentFetcher upon destruction

Added by Ashlesh Gawande about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Management
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

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 open0 closed)

Related to ndn-cxx - Feature #4776: Re-design SegmentFetcherNew

Actions
Actions #1

Updated by Davide Pesavento about 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.

Actions #2

Updated by Ashlesh Gawande about 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.

Actions #3

Updated by Davide Pesavento about 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.

Actions #4

Updated by Ashlesh Gawande about 6 years ago

Actions #5

Updated by Davide Pesavento about 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
Actions

Also available in: Atom PDF