netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alarig Le Lay <alarig@swordarmor.fr>
To: netdev@vger.kernel.org
Subject: IPv6 regression introduced by commit 3b6761d18bc11f2af2a6fc494e9026d39593f22c
Date: Thu, 5 Mar 2020 09:17:47 +0100	[thread overview]
Message-ID: <20200305081747.tullbdlj66yf3w2w@mew.swordarmor.fr> (raw)

Hi,

On the bird users ML, we discussed a bug we’re facing when having a
full table: from time to time all the IPv6 traffic is dropped (and all
neighbors are invalidated), after a while it comes back again, then wait
a few minutes and it’s dropped again, and so on.

Basil Fillan determined that it comes from the commit
3b6761d18bc11f2af2a6fc494e9026d39593f22c.

Here are the complete archives about it:

https://bird.network.cz/pipermail/bird-users/2019-June/013509.html
https://bird.network.cz/pipermail/bird-users/2019-November/013992.html
https://bird.network.cz/pipermail/bird-users/2019-December/014011.html
https://bird.network.cz/pipermail/bird-users/2020-February/014269.html

Regards,
Alarig Le Lay

----- Forwarded message from Basil Fillan <jack@basilfillan.uk> -----

From: Basil Fillan <jack@basilfillan.uk>
To: bird-users@network.cz
Date: Wed, 26 Feb 2020 22:54:57 +0000
Subject: Re: IPv6 BGP & kernel 4.19
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.4.1

Hi,

We've also experienced this after upgrading a few routers to Debian Buster.
With a kernel bisect we found that a bug was introduced in the following
commit:

3b6761d18bc11f2af2a6fc494e9026d39593f22c

This bug was still present in master as of a few weeks ago.

It appears entries are added to the IPv6 route cache which aren't visible from
"ip -6 route show cache", but are causing the route cache garbage collection
system to trigger extremely often (every packet?) once it exceeds the value of
net.ipv6.route.max_size. Our original symptom was extreme forwarding jitter
caused within the ip6_dst_gc function (identified by some spelunking with
systemtap & perf) worsening as the size of the cache increased. This was due
to our max_size sysctl inadvertently being set to 1 million. Reducing this
value to the default 4096 broke IPv6 forwarding entirely on our test system
under affected kernels. Our documentation had this sysctl marked as the
maximum number of IPv6 routes, so it looks like the use changed at some point.

We've rolled our routers back to kernel 4.9 (with the sysctl set to 4096) for
now, which fixed our immediate issue.

You can reproduce this by adding more than 4096 (default value of the sysctl)
routes to the kernel and running "ip route get" for each of them. Once the
route cache is filled, the error "RTNETLINK answers: Network is unreachable"
will be received for each subsequent "ip route get" incantation, and v6
connectivity will be interrupted.

Thanks,

Basil


On 26/02/2020 20:38, Clément Guivy wrote:
> Hi, did anyone find a solution or workaround regarding this issue?
> Considering a router use case.
> I have looked at rt6_stats, total route count is around 78k (full view),
> and around 4100 entries in the cache at the moment on my first router
> (forwarding a few Mb/s) and around 2500 entries on my second router
> (forwarding less than 1 Mb/s).
> I have reread the entire thread. At first, Alarig's research seemed to
> lead to a neighbor management problem, my understanding is that route
> cache is something else entirely - or is it related somehow?
> 
> 
> On 03/12/2019 19:29, Alarig Le Lay wrote:
> > We agree then, and I act as a router on all those machines.
> > 
> > Le 3 décembre 2019 19:27:11 GMT+01:00, Vincent Bernat
> > <vincent@bernat.ch> a écrit :
> > 
> >     This is the result of PMTUd. But when you are a router, you don't
> >     need to do that, so it's mostly a problem for end hosts.
> > 
> >     On December 3, 2019 7:05:49 PM GMT+01:00, Alarig Le Lay
> >     <alarig@swordarmor.fr> wrote:
> > 
> >         On 03/12/2019 14:16, Vincent Bernat wrote:
> > 
> >             The information needs to be stored somewhere.
> > 
> > 
> >         Why has it to be stored? It’s not really my problem if someone
> > else has
> >         a non-stantard MTU and can’t do TCP-MSS or PMTUd.

----- End forwarded message -----

             reply	other threads:[~2020-03-05  8:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05  8:17 Alarig Le Lay [this message]
2020-03-08  0:52 ` David Ahern
2020-03-08 10:57   ` Alarig Le Lay
2020-03-09  2:15     ` David Ahern
2020-03-09  8:59       ` Fabian Grünbichler
2020-03-09 10:47         ` Alarig Le Lay
2020-03-09 11:35           ` Fabian Grünbichler
2020-03-10 10:35       ` Alarig Le Lay
2020-03-10 15:27         ` David Ahern
2020-03-29 14:09           ` Alarig Le Lay
2020-09-27 15:35   ` Baptiste Jonglez
2020-09-27 16:10     ` Baptiste Jonglez
2020-09-28  3:38       ` David Ahern
2020-09-28  5:39         ` Vincent Bernat
2020-09-28  6:48         ` Baptiste Jonglez
2020-09-29  3:39           ` David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200305081747.tullbdlj66yf3w2w@mew.swordarmor.fr \
    --to=alarig@swordarmor.fr \
    --cc=netdev@vger.kernel.org \
    --subject='Re: IPv6 regression introduced by commit 3b6761d18bc11f2af2a6fc494e9026d39593f22c' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox