Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jan 2021 17:00:30 -0600
From:      Kyle Evans <kevans@freebsd.org>
To:        Michael Tuexen <tuexen@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>,  svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org, dmgk@freebsd.org
Subject:   Re: svn commit: r368181 - in stable/12/sys/netinet: . tcp_stacks
Message-ID:  <CACNAnaG6tbsq=81kYURz3h5v1475N-78_H05KP4CuRq2RWTyaw@mail.gmail.com>
In-Reply-To: <CCD3B200-A002-495C-AEDF-629CF8D4A8AE@freebsd.org>
References:  <202011300945.0AU9jilR008960@repo.freebsd.org> <CACNAnaEHH9e47hveitj_X-Zsh%2B_-5REckjA3_ZZbPJKGzgmWRA@mail.gmail.com> <CACNAnaGomHxXMbLV6OFSH7Mhv%2BDoC7Q-u0Q7r_T5ChjNK5jHXw@mail.gmail.com> <D5012151-5379-4249-AB3A-825C1F4E2850@freebsd.org> <CACNAnaEqcLLFP7u9Rvm6u6cnSTUCgxbOAhHJdcHtuJ3OLUy%2BkA@mail.gmail.com> <CCD3B200-A002-495C-AEDF-629CF8D4A8AE@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 13, 2021 at 4:57 PM Michael Tuexen <tuexen@freebsd.org> wrote:
>
> > On 13. Jan 2021, at 16:33, Kyle Evans <kevans@FreeBSD.org> wrote:
> >
> > On Wed, Jan 13, 2021 at 9:31 AM Michael Tuexen <tuexen@freebsd.org> wrote:
> >>
> >>> On 13. Jan 2021, at 16:16, Kyle Evans <kevans@FreeBSD.org> wrote:
> >>>
> >>> On Wed, Jan 6, 2021 at 9:01 AM Kyle Evans <kevans@freebsd.org> wrote:
> >>>>
> >>>> On Mon, Nov 30, 2020 at 3:45 AM Michael Tuexen <tuexen@freebsd.org> 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! :-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaG6tbsq=81kYURz3h5v1475N-78_H05KP4CuRq2RWTyaw>