[Swan-dev] crash after pluto: Fix addresspool reference count

Wolfgang Nothdurft wolfgang at linogate.de
Thu Oct 5 19:57:06 UTC 2017


Am 05.10.2017 um 20:57 schrieb Antony Antony:
> On Thu, Oct 05, 2017 at 08:36:52PM +0200, Wolfgang Nothdurft wrote:
>> Am 05.10.2017 um 20:18 schrieb Antony Antony:
>>> Wow, this patch looks like a heavy hammer solution. To reference count the
>>> pool for each lease? There is something else going on. I imagine reproducing
>>> #299 will give more info. Also wonder no unrefrence when the lease goes
>>> away. Did you check for memory leak after this patch?
>>>
>>> Thanks for the proposed patch, it gave a bit more insight into the issue.
>>>
>>
>> memory leak is not the problem, because at the moment the
>> unrefence_addresspool is called to often.
>>
>> My final solution at the moment is to move unreference_addresspool to the
>> release leases function and when the non-instance connection is deleted.
>>
>> The question is for what the refcount stands, only for installing a
>> addresspool it is not necessary in my opinion. But I'm not as deep in the
>> code as the one who wrote it initially.
> 
> An addresspool is shared between connections. Eech connection add on
> sreference count. I think a connection instance may also add a reference
> count, I am not sure any more.
> 
> Lease should not add reference count to the pool. Atleast that is the idea.
> 
> I will look into soon, probably tomorrow.
> 

ah ok, than it is easy. Than the unreference call is wrong and should 
only be called when the non-instance connection is deleted.

I have updated lsw#299 with the final patch.

Wolfgang


More information about the Swan-dev mailing list