Project

General

Profile

Bug #4775

Controller should clean up SegmentFetcher upon destruction

Added by Ashlesh Gawande over 2 years ago. Updated over 2 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

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

Actions
#1

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

#2

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

#3

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

#4

Updated by Ashlesh Gawande over 2 years ago

#5

Updated by Davide Pesavento over 2 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

Also available in: Atom PDF