From nobody Mon Feb 12 19:09:53 2024 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 4TYYtY5mvNz5BNsj; Mon, 12 Feb 2024 19:09:57 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TYYtX6GZCz4sMd; Mon, 12 Feb 2024 19:09:56 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 3.97.99.32) smtp.mailfrom=cy.schubert@cschubert.com Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id ZUtarkWVKxDxGZbgirnQqM; Mon, 12 Feb 2024 19:09:56 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id Zbggrg8MWWhyfZbghrZ4Mr; Mon, 12 Feb 2024 19:09:55 +0000 X-Authority-Analysis: v=2.4 cv=MenPuI/f c=1 sm=1 tr=0 ts=65ca6d03 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=k7vzHIieQBIA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=3J0l7d3P5gAvw77Of3YA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 43C6FB2; Mon, 12 Feb 2024 11:09:54 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 11A8BA8; Mon, 12 Feb 2024 11:09:54 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Richard Scheffenegger cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 62d47d73b7eb - main - tcp: stop timers and clean scoreboard in tcp_close() In-reply-to: <202402100934.41A9Y11l044213@gitrepo.freebsd.org> References: <202402100934.41A9Y11l044213@gitrepo.freebsd.org> Comments: In-reply-to Richard Scheffenegger message dated "Sat, 10 Feb 2024 09:34:01 +0000." 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 12 Feb 2024 11:09:53 -0800 Message-Id: <20240212190954.11A8BA8@slippy.cwsent.com> X-CMAE-Envelope: MS4xfDdRBJVr9KOlsUocOUSUzMAu4ROGNC0axequei6b+/7V8Mzew2yPVD2JYWcYfGLsn+ZEALhgtCDI2gyqUrXUijADE0mXxIDmzxNTcth5FVRSSH2P2GM4 D26d/8qEMQkm6pF/P7xdBS9KFvfSjIeoUFbUa9gvPcc8DWSc2Lf3DpIfGcIi2RMJr/Iz2H63BDEQS5y1E/CuNSE5Xe0D6ts2sf8rFYYvL6lItuUYAJsNNQA/ FrfoCF5lnfwRaWEz8m2yd8+7IIs1R9i25QzPuuewOvHm4y1w05YTiz24TxAvrM0bVKmbwnQxbsfSrBUp0PSz+1m5EqG/mHWLnNwpPlEZpok= X-Spamd-Bar: - X-Spamd-Result: default: False [-1.78 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.88)[-0.882]; MV_CASE(0.50)[]; RWL_MAILSPIKE_VERYGOOD(-0.20)[3.97.99.32:from]; RCVD_IN_DNSWL_LOW(-0.10)[3.97.99.32:from]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_THREE(0.00)[4]; R_SPF_NA(0.00)[no SPF record]; R_DKIM_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[cschubert.com]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org,dev-commits-src-all@freebsd.org]; REPLYTO_EQ_FROM(0.00)[] X-Rspamd-Queue-Id: 4TYYtX6GZCz4sMd In message <202402100934.41A9Y11l044213@gitrepo.freebsd.org>, Richard Scheffene gger writes: > The branch main has been updated by rscheff: > > URL: https://cgit.FreeBSD.org/src/commit/?id=62d47d73b7eb01f3b0a37541df5e7aaa > 36f54335 > > commit 62d47d73b7eb01f3b0a37541df5e7aaa36f54335 > Author: Richard Scheffenegger > AuthorDate: 2024-02-10 09:28:42 +0000 > Commit: Richard Scheffenegger > CommitDate: 2024-02-10 09:30:00 +0000 > > tcp: stop timers and clean scoreboard in tcp_close() > > Stop timers when in tcp_close() instead of doing that in tcp_discardcb(). > A connection in CLOSED state shall not need any timers. Assert that no > timer is rescheduled after that in tcp_timer_activate() and verfiy that > this is also the expected state in tcp_discardcb(). > > PR: 276761 > Reviewed By: glebius, tuexen, #transport > Sponsored by: NetApp, Inc. > Differential Revision: https://reviews.freebsd.org/D43792 > --- > sys/netinet/tcp_subr.c | 4 ++-- > sys/netinet/tcp_timer.c | 1 + > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c > index 6043a3d458e5..90e1496a822c 100644 > --- a/sys/netinet/tcp_subr.c > +++ b/sys/netinet/tcp_subr.c > @@ -2383,10 +2383,9 @@ tcp_discardcb(struct tcpcb *tp) > #endif > > INP_WLOCK_ASSERT(inp); > + MPASS(!callout_active(&tp->t_callout)); > MPASS(TAILQ_EMPTY(&tp->snd_holes)); > > - tcp_timer_stop(tp); > - > /* free the reassembly queue, if any */ > tcp_reass_flush(tp); > > @@ -2522,6 +2521,7 @@ tcp_close(struct tcpcb *tp) > tcp_fastopen_decrement_counter(tp->t_tfo_pending); > tp->t_tfo_pending = NULL; > } > + tcp_timer_stop(tp); > if (tp->t_fb->tfb_tcp_timer_stop_all != NULL) > tp->t_fb->tfb_tcp_timer_stop_all(tp); > in_pcbdrop(inp); > diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c > index f0eb3bad33cf..ed50659abf8e 100644 > --- a/sys/netinet/tcp_timer.c > +++ b/sys/netinet/tcp_timer.c > @@ -907,6 +907,7 @@ tcp_timer_activate(struct tcpcb *tp, tt_which which, u_in > t delta) > #endif > > INP_WLOCK_ASSERT(inp); > + MPASS(tp->t_state > TCPS_CLOSED); > > if (delta > 0) { > what = TT_STARTING; > Every machine in my farm is getting kernel page faults as of this revision. #0 __curthread () at /opt/src/git-src/sys/amd64/include/pcpu_aux.h:57 #1 doadump (textdump=textdump@entry=1) at /opt/src/git-src/sys/kern/kern_sh utdown.c:403 #2 0xffffffff806c68b9 in kern_reboot (howto=260) at /opt/src/git-src/sys/kern/kern_shutdown.c:521 #3 0xffffffff806c6dc2 in vpanic (fmt=0xffffffff80ae244b "%s", ap=ap@entry=0xfffffe008304abc0) at /opt/src/git-src/sys/kern/kern_shutdown.c :973 #4 0xffffffff806c6c13 in panic (fmt=) at /opt/src/git-src/sys/kern/kern_shutdown.c:889 #5 0xffffffff80a5b18f in trap_fatal (frame=0xfffffe008304acb0, eva=72) at /opt/src/git-src/sys/amd64/amd64/trap.c:950 #6 0xffffffff80a5b1df in trap_pfault (frame=0xfffffe008304acb0, usermode=false, signo=, ucode=) at /opt/src/git-src/sys/amd64/amd64/trap.c:758 #7 #8 0xffffffff8084dd72 in cc_cong_signal (tp=0xfffff8008d207540, th=0x0, type=2) at /opt/src/git-src/sys/netinet/tcp_input.c:465 #9 0xffffffff8086ba4f in tcp_timer_rexmt (tp=0xfffff8008d207540) at /opt/src/git-src/sys/netinet/tcp_timer.c:803 #10 0xffffffff8086b1fe in tcp_timer_enter (xtp=0xfffff8008d207540) at /opt/src/git-src/sys/netinet/tcp_timer.c:880 #11 0xffffffff806e603e in softclock_call_cc (c=0xfffff8008d2076d8, cc=cc@entry=0xffffffff820b10c0, direct=direct@entry=0) at /opt/src/git-src/sys/kern/kern_timeout.c:714 #12 0xffffffff806e77b8 in softclock_thread (arg=arg@entry=0xffffffff820b10c0 ) at /opt/src/git-src/sys/kern/kern_timeout.c:846 #13 0xffffffff8067f05f in fork_exit (callout=0xffffffff806e76c0 , arg=0xffffffff820b10c0, frame=0xfffffe008304af40) at /opt/src/git-src/sys/kern/kern_fork.c:1157 #14 #15 0x21ffa5a87b4e3f70 in ?? () When rebooting one of my machines, the others panic as above. This is 100% reproducible when one of the machines in my basement are rebooted. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0