Re: [Idr] Fwd: New Version Notification for draft-spaghetti-idr-bgp-sendholdtimer-05.txt

Ben Cox <ben@benjojo.co.uk> Thu, 04 August 2022 14:07 UTC

Return-Path: <ben@benjojo.com>
X-Original-To: idr@ietfa.amsl.com
Delivered-To: idr@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id EDB92C147921 for <idr@ietfa.amsl.com>; Thu, 4 Aug 2022 07:07:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.759
X-Spam-Level:
X-Spam-Status: No, score=-1.759 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=benjojo.co.uk
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Cv-gUHw7A_0g for <idr@ietfa.amsl.com>; Thu, 4 Aug 2022 07:07:20 -0700 (PDT)
Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 038A4C14F740 for <idr@ietf.org>; Thu, 4 Aug 2022 07:07:19 -0700 (PDT)
Received: by mail-pj1-x102e.google.com with SMTP id d65-20020a17090a6f4700b001f303a97b14so5741762pjk.1 for <idr@ietf.org>; Thu, 04 Aug 2022 07:07:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benjojo.co.uk; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=WY2J73pJKK5Riy36LmlPAQbK+47XZWxW0ju8vRIUlQA=; b=K79eryvNH6trF7EBwRrfE5puXG9dsVDK2ynBdrW+JdCfAgHf0ZkA+vINtVqRSgg8tK 4DqkQyL0HZYghOd5SYRfKvH9adr8E1lVG5N6tjed4zkf+WOUrTewtoAqCp4uBGOs2xFg KXJd2Bm1CQ/eMEl4m83+ynVE0TkZ9zk/kopvsQ5bv76QpvW8ottNzDf2hMwf84TEfeFf MKH/r737tBRSunl4cIpzInTmMzxu6FI2KqI3VSN0xc09oGC7la6oIU8RUGG53vkVQko/ /ZuZkvFeB/4wcGcaNZME3L1wHgbeDdARrr1HVw1zIHWnieIa0E6SJaqljjbce+Yr32jp rx+A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=WY2J73pJKK5Riy36LmlPAQbK+47XZWxW0ju8vRIUlQA=; b=g4D9uGOXMi+5SQWT1EbyPJnuQzzJY433KmglMcSLBkNZY8p1oe0GlKEn7Hty6iEldG kTn/xesEtYvaU4TT/Say8hmsB4eZJBtcAEJ4CwTnG5DSFIjE09lam7sNorvySu4yImPF 6hSAPYQkMfdeZnGaxUkcbLr0mWEYE2d9SM810EhTd1KfkMczemMTrEz3QQ7czy+5gHaN n0cLv2A7jh47gj6mnCDPz0d580wy6iiVbdUBtf4T+Lg02kQWkOvexEp9q6MY0Cv/uw59 SCiPCmtNm/10uKo7yScmcNIqjCRq+JAVZ9QTbeWNfWzmeHLLMfeHKDDyPhQaCheQGIIi feCw==
X-Gm-Message-State: ACgBeo2i7EcuzUTVztZMJ4R92DUTvP3Gz5FMT8J9sMUBCqB5sPMmLm1s 9APdbWB3J1ghDLgVBXs9HHIjXoSdmVaggBrps4BGuHreGJgtTwVK
X-Google-Smtp-Source: AA6agR4+i2WKORpf7SlyclKXxMCT5HdeMkoII8RmabLqvFEWTH37g1FnCawko9dntbfqzeZiZwmRp9V/CHLZq3gDtGI=
X-Received: by 2002:a17:90b:4f47:b0:1f5:6919:8868 with SMTP id pj7-20020a17090b4f4700b001f569198868mr2293146pjb.131.1659622038578; Thu, 04 Aug 2022 07:07:18 -0700 (PDT)
MIME-Version: 1.0
References: <CAOj+MME7XnW7kDXL4muh4Qp1UvabQ9amUoU0Sn3h2axqKzswzA@mail.gmail.com> <77F3E1F0-486F-47DF-ABE4-EFDB9C2FB6D8@gmail.com> <CAOj+MMGR4f3eLEDZY++1m4Lpo9joG4L9OrWbeF6kREn-9a9onA@mail.gmail.com> <c6e44213-7667-0f67-71a4-634411cd102b@foobar.org> <CAOj+MMFajL6E42WCzC0ZqrfSBZjU-0B=ZzmtvCRPkuMzU8z5QA@mail.gmail.com> <Yun6e5jSb0OYZGAX@shrubbery.net> <CAOj+MMFRJr=cs+5DVOp72BVn_j3NgANwNftyj=jRbdsvPpg-wA@mail.gmail.com> <CANJ8pZ9oNvd0CGEbOQQpeZ1Sf-=ctVy8yhD0XFK-qYiE08BZUA@mail.gmail.com>
In-Reply-To: <CANJ8pZ9oNvd0CGEbOQQpeZ1Sf-=ctVy8yhD0XFK-qYiE08BZUA@mail.gmail.com>
From: Ben Cox <ben@benjojo.co.uk>
Date: Thu, 04 Aug 2022 15:06:52 +0100
Message-ID: <CAL=9YSX-iXEOQrERA5M_ZbG68UmgacchdODk7uwT3p0ZjLgJow@mail.gmail.com>
To: Enke Chen <enchen@paloaltonetworks.com>
Cc: "idr@ietf. org" <idr@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/idr/KLL2ehufwe6vHPtGt7zcLFdY9BQ>
Subject: Re: [Idr] Fwd: New Version Notification for draft-spaghetti-idr-bgp-sendholdtimer-05.txt
X-BeenThere: idr@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Inter-Domain Routing <idr.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/idr>, <mailto:idr-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/idr/>
List-Post: <mailto:idr@ietf.org>
List-Help: <mailto:idr-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/idr>, <mailto:idr-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Aug 2022 14:07:24 -0000

One question with TCP_USER_TIMEOUT (I've yet to test it) but if we
want to emit syslog/SNMP messages when it triggers, is there a way to
get out of the kernel that the reason for a socket closing was
TCP_USER_TIMEOUT and not something else?

Someone also mentioned in passing that TCP_USER_TIMEOUT in Linux was
buggy/broken until relatively recently, assuming that is the case,
that might be a good argument alone against going that route since the
a number of vendors using older kernels could risk someone thinking they
have implemented the feature but instead their kernel has
silently/loudly broken it.

On Wed, Aug 3, 2022 at 8:29 PM Enke Chen <enchen@paloaltonetworks.com> wrote:
>
> > if this is just queued keepalives (no BGP churn) then depending on the buffer size it may take ages to fill ..
>
> Indeed, in that case the local BGP speaker may not know about the
> condition (mis-behaving remote speaker / 0-window) for a long time,
> and that's not covered by the current draft, nor the FRR BGP patch
> based on my reading.
>
> To make it complete, I believe that the detection and handling of a
> stuck peer (i.e., "data not being transmitted") should be at the
> transport layer.  The TCP_USER_TIMEOUT option is readily available for
> that purpose:
>
> https://man7.org/linux/man-pages/man7/tcp.7.html
>
> TCP_USER_TIMEOUT (since Linux 2.6.37)
>               This option takes an unsigned int as an argument.  When
>               the value is greater than 0, it specifies the maximum
>               amount of time in milliseconds that transmitted data may
>               remain unacknowledged, or bufferred data may remain
>               untransmitted (due to zero window size) before TCP will
>               forcibly close the corresponding connection and return
>               ETIMEDOUT to the application.  If the option value is
>               specified as 0, TCP will use the system default.
>
> Thanks.  -- Enke
>
> On Wed, Aug 3, 2022 at 2:43 AM Robert Raszuk <robert@raszuk.net> wrote:
> >>
> >> Even if the remote (stuck) peer does not process the FIN, the local
> >> end will close the session and stop forwarding traffic that direction.
> >> That is an improvement, from an operator's PoV, both for forwarding
> >> errors and local resources.
> >
> >
> > Would not the same happen when you will send keepalives *ONLY* upon receiving them from a peer.
> >
> > If both sides support it there should be no issue of stuck sessions. Also no new timer needed and could be knob to enable/disable it.
> >
> > This draft assumes that one peer is bad and the other should time out when it can not send. So I am asking what exactly is the trigger to fire that timer when BGP can not write to a TCP socket ? Is it Error 105: No buffer space available ? Something else ?
> >
> > If this is just queued keepalives (no BGP churn) then depending on the buffer size it may take ages to fill ...
> >
> > Best,
> > R.
> >
> > _______________________________________________
> > Idr mailing list
> > Idr@ietf.org
> > https://urldefense.com/v3/__https://www.ietf.org/mailman/listinfo/idr__;!!Mt_FR42WkD9csi9Y!a0z_mWIoJi3AkiI16RqyCvoRCWwEOL3bWCHM4NpDMSNuDupNtnpKp-7CS11XhqcJqXRdfdf7CvdIHDMJt49KTA$
>
> _______________________________________________
> Idr mailing list
> Idr@ietf.org
> https://www.ietf.org/mailman/listinfo/idr