Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Mar 2021 22:45:04 +0000
From:      "Alexander V. Chernikov" <melifaro@ipfw.ru>
To:        Kristof Provost <kp@FreeBSD.org>
Cc:        "current@FreeBSD.org" <current@freebsd.org>, "Bjoern A. Zeeb" <bz@freebsd.org>
Subject:   Re: ifa leak on VNET teardown
Message-ID:  <E1A53BB8-7A9B-4687-9FC3-0D0D6583C643@ipfw.ru>
In-Reply-To: <FE498C9E-2C58-4BCF-8B06-961DD722F387@FreeBSD.org>
References:  <275831613248826@mail.yandex.ru> <FE498C9E-2C58-4BCF-8B06-961DD722F387@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

> On 6 Mar 2021, at 09:26, Kristof Provost <kp@FreeBSD.org> wrote:
>=20
> 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:
>>=20
> There=E2=80=99s a recent bug about this as well: 253998.
> The problem=E2=80=99s been around for a long time though. The pf tests =
trigger it from time to time, although it doesn=E2=80=99t appear to be =
100% consistent, so my current feeling is that it may be racy.
>=20
> I see =E2=80=98in6_purgeaddr: err=3D65, destination address delete =
failed=E2=80=99 when we do leak, and I=E2=80=99ve 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.=20

>=20
> Best regards,
> Kristof




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1A53BB8-7A9B-4687-9FC3-0D0D6583C643>