From owner-svn-src-all@freebsd.org Wed Jan 13 23:00:45 2021 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 29FDC4EAAE3; Wed, 13 Jan 2021 23:00:45 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DGNG50cRQz3tDS; Wed, 13 Jan 2021 23:00:45 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-vs1-f43.google.com (mail-vs1-f43.google.com [209.85.217.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 07E0F2CEE4; Wed, 13 Jan 2021 23:00:45 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-vs1-f43.google.com with SMTP id b23so2068709vsp.9; Wed, 13 Jan 2021 15:00:45 -0800 (PST) X-Gm-Message-State: AOAM532gw7dXijpLDFfa4Rg513A+xjSWyFAPxIs7WqvonTmpTRF9qiY5 kN3nipfzPLMj6iByaJfvR6bKjZQorbAYlemLTBE= X-Google-Smtp-Source: ABdhPJx06d/YFtkvr+lKD8EVlUhDG4PQw67fIQiaBzaEfX4aAani/Cr4Ff/L9A4W0ASwFPOZCGP23HmknBtCBvaT6MA= X-Received: by 2002:a05:6102:3205:: with SMTP id r5mr4386030vsf.36.1610578844543; Wed, 13 Jan 2021 15:00:44 -0800 (PST) MIME-Version: 1.0 References: <202011300945.0AU9jilR008960@repo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Wed, 13 Jan 2021 17:00:30 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r368181 - in stable/12/sys/netinet: . tcp_stacks To: Michael Tuexen Cc: src-committers , svn-src-all , svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org, dmgk@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 23:00:45 -0000 On Wed, Jan 13, 2021 at 4:57 PM Michael Tuexen wrote: > > > On 13. Jan 2021, at 16:33, Kyle Evans wrote: > > > > On Wed, Jan 13, 2021 at 9:31 AM Michael Tuexen wrote: > >> > >>> On 13. Jan 2021, at 16:16, Kyle Evans wrote: > >>> > >>> On Wed, Jan 6, 2021 at 9:01 AM Kyle Evans wrote: > >>>> > >>>> On Mon, Nov 30, 2020 at 3:45 AM Michael Tuexen wrote: > >>>>> > >>>>> Author: tuexen > >>>>> Date: Mon Nov 30 09:45:44 2020 > >>>>> New Revision: 368181 > >>>>> URL: https://svnweb.freebsd.org/changeset/base/368181 > >>>>> > >>>>> Log: > >>>>> MFC r367530: > >>>>> RFC 7323 specifies that: > >>>>> * TCP segments without timestamps should be dropped when support for > >>>>> the timestamp option has been negotiated. > >>>>> * TCP segments with timestamps should be processed normally if support > >>>>> for the timestamp option has not been negotiated. > >>>>> This patch enforces the above. > >>>>> Manually resolved merge conflicts. > >>>>> > >>>>> MFC 367891: > >>>>> Fix an issue I introuced in r367530: tcp_twcheck() can be called > >>>>> with to == NULL for SYN segments. So don't assume tp != NULL. > >>>>> Thanks to jhb@ for reporting and suggesting a fix. > >>>>> > >>>>> MFC r367946: > >>>>> Fix two occurences of a typo in a comment introduced in r367530. > >>>>> Thanks to lstewart@ for reporting them. > >>>>> > >>>> > >>>> Hi Michael, > >>>> > >>>> Dmitri (CC'd) spotted a regression in the golang test suite along > >>>> stable/12 and bisected it back to this MFC (reported via > >>>> efnet#bsdports). The test puts up a local HTTP server and attempts to > >>>> close the read-side while the write-side is still going, hopefully > >>>> observing a write failure on the write-side in the process (but it > >>>> never does). > >>>> > >>>> I minimized it to this (rough) reproducer, which shows the write side > >>>> hanging around in CLOSE_WAIT and successfully writing the msg > >>>> repeatedly on recent -CURRENT while 12.2 observes an EPIPE almost > >>>> immediately: https://people.freebsd.org/~kevans/tcpr.c > >>>> > >>>> root@viper:~/grep# sockstat -s | grep 8993 > >>>> root a.out 80831 4 tcp4 127.0.0.1:8993 *:* > >>>> LISTEN > >>>> root a.out 80831 5 tcp4 127.0.0.1:8993 > >>>> 127.0.0.1:40319 CLOSE_WAIT > >>>> root@viper:~/grep# > >>>> > >>> > >>> Ping? > >> Hi Kyle, > >> > >> thanks for pinging. I missed your original mail (not sure why it did not end up in the > >> correct mailbox). Will look into it later today/tomorrow. > >> > >> Thanks for providing a reproducer. Just to get it crystal clear: You say that the > >> programs runs fine on CURRENT but not on stable/12. Is that correct? > >> > > > > Excellent, thanks! It runs fine on 12.2, but not on an up-to-date > > -CURRENT or stable/12 after this MFC. > The issue should be fixed by https://reviews.freebsd.org/D28143 > > With that patch your reproducer terminates immediately, sometimes reporting > tuexen@head:~ % ./tcpr > waiting for server > attempting to connect > got client > connected, closing > waiting > write fail (bad!): 54 > > and sometimes reporting > > tuexen@head:~ % ./tcpr > waiting for server > attempting to connect > connected, closing > waiting > got client > pipe gone (good!) > > but that depends on the timing. > A-ha, thanks! I can't imagine why I slapped a huge "bad!" blanket label on errors since ECONNRESET is exceedingly reasonable; thanks for the speedy resolution! :-)