From nobody Sun Sep 7 19:38:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cKgNs37JTz66fkF; Sun, 07 Sep 2025 19:38:21 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cKgNr4Dfcz44hP; Sun, 07 Sep 2025 19:38:20 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.208.41 as permitted sender) smtp.mailfrom=asomers@gmail.com Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-627b85e4c0fso843138a12.1; Sun, 07 Sep 2025 12:38:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757273898; x=1757878698; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FRP72IuDzoZ/XfbA/0wEkxk9POPHt2w20fSdf11AIDc=; b=BxFoGeusaaTST3yG2d/Rh6BP4KbJCxwokNDC27v6Q0srmZjjZ53hHpPpo99rVm4uAX ixB7wl1tL6QgF/t2Jj9e0sMs4r1fLsZBhbAwc3ajagnTaJXTddGraLrxjnV78dZe+ufp 0XDV6wsy3VRHKpYtG0c/4ABwUHAaX6HfqOb3eH6ZgVMaUb87HsX2Luj8Afjv+W10zzrz a5tbWcjNtIM0xzKiFhmClKDPvARixKCswOPZMrJjFNxs0tGHglhyzGxF3uogRu9oy06v BHWEaSokjU13VfIpSaCAvm2saTHnyXmzxgW3Y5Hzvq8Rbo2W/l6EvihoAm3xknWea3nt muzQ== X-Forwarded-Encrypted: i=1; AJvYcCUOIdVb8I4wHbaQm4BVRinMK6EznRPsDbKjbTe9W+zyu1yHuGHPJlln2wB7bt5P1N6/IVQkdwVzqMy0HqCJcp/UEkNn25E=@freebsd.org, AJvYcCURT6AhGLSt6hZxAYO8qXIl2mjDoxahVZkPult9HrjpZndOYZtYrBbzHZAFhDYKpdhArSXCFSli05mJi7bL56cPmKfX@freebsd.org X-Gm-Message-State: AOJu0YxuSqedxY/vuNT2OWGmbrpyIX+ZKiLycBRH4FbFzVrTaAz2LO9E nGqP6BJHGzhEhefL41HK3j6fmiPX9roK/YHjv6V60Tm6rWIgrmG2DiE1fyKWWf1OBD6xOLy36h7 nzkNajxnxbht7a1xXlnpYXXj1OEueuBpohg== X-Gm-Gg: ASbGncuq/fJRWzwowKoctv/CN3295cihw4noaD2Lu1HUef7WOX8so2jj0GBmp0mChcF HEtL+OlNX8IvKRHAA8YYHDqzW4JORJUJ1OxXuIKvGRgS1TKOkaCYfKHvkZF2e2kzvBUgYexCwXD vQPSeEgJZzZTuiu1TGUw9j/haQt5l5o6NjuciyDVGOl08etPW8VT0JYh7Ihfx7YbhbnAvZlV9/Q ptrCZg= X-Google-Smtp-Source: AGHT+IGOJ8c+MKp8gJTg5nJbBxIZ8iRTE/zT50VyPR84rHBXbmdk58vqbK7/FTNObace1kXzp9ffZCA3B9S9zQdhJHo= X-Received: by 2002:a05:6402:2185:b0:626:f59b:fca2 with SMTP id 4fb4d7f45d1cf-626f59c07camr2776733a12.15.1757273897569; Sun, 07 Sep 2025 12:38:17 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509022034.582KYMeX068298@gitrepo.freebsd.org> In-Reply-To: <202509022034.582KYMeX068298@gitrepo.freebsd.org> From: Alan Somers Date: Sun, 7 Sep 2025 13:38:05 -0600 X-Gm-Features: AS18NWCP1wqxufwX2ZyXOo4szxjaWV0AOyTpwEsVx3LRZJeXwzr2wSFY7KerBxo Message-ID: Subject: Re: git: 60d5a4216b34 - main - unix/stream: fix EVFILT_WRITE after we did shutdown(2) To: Gleb Smirnoff Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000070162c063e3b3607" X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.81 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.987]; NEURAL_HAM_LONG(-0.97)[-0.970]; NEURAL_HAM_SHORT(-0.96)[-0.956]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; MISSING_XM_UA(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.41:from]; FREEFALL_USER(0.00)[asomers]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.41:from] X-Rspamd-Queue-Id: 4cKgNr4Dfcz44hP --00000000000070162c063e3b3607 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Sep 2, 2025 at 2:34=E2=80=AFPM Gleb Smirnoff = wrote: > The branch main has been updated by glebius: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D60d5a4216b3479a2d62eb65f2cb03b7= 99546dcbb > > commit 60d5a4216b3479a2d62eb65f2cb03b799546dcbb > Author: Gleb Smirnoff > AuthorDate: 2025-09-02 20:34:12 +0000 > Commit: Gleb Smirnoff > CommitDate: 2025-09-02 20:34:12 +0000 > > unix/stream: fix EVFILT_WRITE after we did shutdown(2) > > When fixing bug 286692, the change eafe5967ac558, that fixed a case > when > peer side does close(), also had regressed a case when our side does > shutdown(SHUT_WR). These actually are two independent code paths, an= d > the > eafe5967ac558 shouldn't have touched the second block. The removal o= f > 'kn->kn_flags |=3D EV_EOF' was incorrect and the statement on origina= l > behavior in the commit message was also incorrect. > > Do not add back so_error setting, since I failed to find a test case > that > would return anything but 0 in kevent.fflags when run on stable/14. > > This was found with help of https://github.com/tokio-rs/mio. Add a > test > case into our test suite for that. > > Fixes: eafe5967ac558de142d91660e18e9238289890e3 > > Reviewed by: markj > Differential Revision: https://reviews.freebsd.org/D52327 > Thanks, Gleb. I can confirm that this fixes mio for me. --00000000000070162c063e3b3607 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Sep 2, 2025 at 2:34=E2=80=AFPM Gleb S= mirnoff <glebius@freebsd.org&= gt; wrote:
The b= ranch main has been updated by glebius:

URL: https://cgit.= FreeBSD.org/src/commit/?id=3D60d5a4216b3479a2d62eb65f2cb03b799546dcbb
commit 60d5a4216b3479a2d62eb65f2cb03b799546dcbb
Author:=C2=A0 =C2=A0 =C2=A0Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2025-09-02 20:34:12 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2025-09-02 20:34:12 +0000

=C2=A0 =C2=A0 unix/stream: fix EVFILT_WRITE after we did shutdown(2)

=C2=A0 =C2=A0 When fixing bug 286692, the change eafe5967ac558, that fixed = a case when
=C2=A0 =C2=A0 peer side does close(), also had regressed a case when our si= de does
=C2=A0 =C2=A0 shutdown(SHUT_WR).=C2=A0 These actually are two independent c= ode paths, and the
=C2=A0 =C2=A0 eafe5967ac558 shouldn't have touched the second block.=C2= =A0 The removal of
=C2=A0 =C2=A0 'kn->kn_flags |=3D EV_EOF' was incorrect and the s= tatement on original
=C2=A0 =C2=A0 behavior in the commit message was also incorrect.

=C2=A0 =C2=A0 Do not add back so_error setting, since I failed to find a te= st case that
=C2=A0 =C2=A0 would return anything but 0 in kevent.fflags when run on stab= le/14.

=C2=A0 =C2=A0 This was found with help of https://github.com/tokio-rs= /mio.=C2=A0 Add a test
=C2=A0 =C2=A0 case into our test suite for that.

=C2=A0 =C2=A0 Fixes:=C2=A0 eafe5967ac558de142d91660e18e9238289890e3

=C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 markj =C2=A0 =C2=A0 Differential Revision:=C2=A0 https://reviews.freebsd= .org/D52327

Thanks, Gleb.=C2=A0 I can confirm that= this fixes mio for me.=C2=A0
--00000000000070162c063e3b3607--