BIND 10 #641: Memory leaks in NSAS
BIND 10 Development
do-not-reply at isc.org
Wed Mar 16 12:47:08 UTC 2011
#641: Memory leaks in NSAS
-------------------------------------+-------------------------------------
Reporter: vorner | Owner: stephen
Type: defect | Status: reviewing
Priority: major | Milestone: R-Team-
Component: | Sprint-20110316
Unclassified | Resolution:
Keywords: | Sensitive: 0
Estimated Number of Hours: 0.0 | Add Hours to Ticket: 0
Billable?: 1 | Total Hours: 0
Internal?: 0 |
-------------------------------------+-------------------------------------
Changes (by vorner):
* owner: vorner => stephen
Comment:
Hello
Replying to [comment:7 stephen]:
> > Anyway, in case we delete them both, the resolver should make sure all
the pending callbacks are called, just like in the test resolver. But as
this happens on shutdown only now, we probably can leave it out for now.
> Fair enough. But as a future task should we also add the callbacks to a
list inside the NSAS such that the NSAS destructor can call them?
Alternatively, do we really need there to be a shared_ptr loop involving
the callbacks, even if it is broken when they are called?
Well, I have no idea how to avoid the loop currently, because:
- The zone entry needs to keep it's nameserver entries alive. It would be
a bad situation if they just disappear and happen to be needed again.
- The nameserver entry needs to keep the list of callbacks that should be
called when data are ready there. They can be or not shared pointers, but
they must not be deleted before they are called.
- The callbacks need to keep the zone entries alive, because calling them
when they are already dead is a bad thing and aborting the callbacks means
not providing the answer the NSAS was asked for.
So, in that sense, anything from this list can't be deleted before the
callback is called.
But list of the callbacks to delete/fail when NSAS is destroyed could be a
solution.
Anyway, the change is OK. Please, merge.
Thanks
--
Ticket URL: <https://bind10.isc.org/ticket/641#comment:8>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list