Re: ifa leak on VNET teardown

From: Alexander V. Chernikov <melifaro_at_ipfw.ru>
Date: Sun, 7 Mar 2021 22:45:04 +0000
> On 6 Mar 2021, at 09:26, Kristof Provost <kp_at_FreeBSD.org> wrote:
> 
> On 13 Feb 2021, at 21:58, Alexander V. Chernikov wrote:
>> It turns out we're leaking some ifas for loopback interfaces on VNET teardown:
>> 
> There’s a recent bug about this as well: 253998.
> The problem’s been around for a long time though. The pf tests trigger it from time to time, although it doesn’t appear to be 100% consistent, so my current feeling is that it may be racy.
> 
> I see ‘in6_purgeaddr: err=65, destination address delete failed’ when we do leak, and I’ve also been able to confirm this is about the ::1 IPv6 loopback address.

The fun part is that it turns out that these side effects are caused by 3 different issues. The unifying factor is that all of them are loopback-specific.

AF_LINK ifa leak exists simply because there is no domain teardown procedure associated with AF_LINK, so we leak it for every non-vmoved interface during VNET shutdown.
PR 253998 is caused by the fact that rt_flushifroutes_af() is not able to delete RTF_PINNED routes (e.g. all interface routes). D29116 addresses that.
in6_purgeaddr error is caused by the corner case with loopback&p2p interfaces. D29121 addresses that. 

> 
> Best regards,
> Kristof
Received on Sun Mar 07 2021 - 21:45:11 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:27 UTC