From nobody Fri Aug 04 21:12:35 2023 X-Original-To: dev-commits-src-all@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 4RHdht3TyCz4m41P; Fri, 4 Aug 2023 21:12:46 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHdht0Z2fz4ZBq; Fri, 4 Aug 2023 21:12:46 +0000 (UTC) (envelope-from tuexen@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from smtpclient.apple (ip4d15f6ca.dynamic.kabel-deutschland.de [77.21.246.202]) (Authenticated sender: micmac) by mail-n.franken.de (Postfix) with ESMTPSA id 0790475DB4D5C; Fri, 4 Aug 2023 23:12:36 +0200 (CEST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: b279e84a47dd - main - sctp: improve consistency From: tuexen@freebsd.org In-Reply-To: Date: Fri, 4 Aug 2023 23:12:35 +0200 Cc: Kristof Provost , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <1C294E86-083A-45E9-8032-51F5B45C18B6@freebsd.org> References: <202307282203.36SM3C98056354@gitrepo.freebsd.org> To: Mark Johnston X-Mailer: Apple Mail (2.3731.700.6) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Rspamd-Queue-Id: 4RHdht0Z2fz4ZBq X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:680, ipnet:2001:638::/32, country:DE] > On 4. Aug 2023, at 17:16, Mark Johnston wrote: >=20 > On Fri, Aug 04, 2023 at 03:53:31PM +0200, tuexen@freebsd.org wrote: >>> On 4. Aug 2023, at 15:03, Kristof Provost wrote: >>>=20 >>> On 29 Jul 2023, at 0:03, Michael Tuexen wrote: >>> The branch main has been updated by tuexen: >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Db279e84a47ddb59e55b5a3cec31c51cd= 41bf0dc3 >>> commit b279e84a47ddb59e55b5a3cec31c51cd41bf0dc3=20 >>> Author: Michael Tuexen =20 >>> AuthorDate: 2023-07-28 12:36:11 +0000=20 >>> Commit: Michael Tuexen =20 >>> CommitDate: 2023-07-28 12:36:11 +0000 >>> sctp: improve consistency >>> This is simplifying a patch to address PR 260116. >>> PR: 260116=20 >>> MFC after: 1 week >>> It looks like this commit (or maybe the next one, = c620788150d274c09a070ab486602c98407d73b0) causes a panic in the SCTP = code during the sys/netpfil/pf/sctp:basic_v4 test: >>> panic: Counter goes negative >>> cpuid =3D 7 >>> time =3D 1691145655 >>> KDB: stack backtrace: >>> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame = 0xfffffe026ea9a3a0 >>> vpanic() at vpanic+0x132/frame 0xfffffe026ea9a4d0 >>> panic() at panic+0x43/frame 0xfffffe026ea9a530 >>> sctp_abort_notification() at sctp_abort_notification/frame = 0xfffffe026ea9a540 >>> sctp_express_handle_sack() at sctp_express_handle_sack+0x647/frame = 0xfffffe026ea9a640 >>> sctp_process_control() at sctp_process_control+0xf62/frame = 0xfffffe026ea9a990 >>> sctp_common_input_processing() at = sctp_common_input_processing+0x561/frame 0xfffffe026ea9ab10 >>> sctp_input_with_port() at sctp_input_with_port+0x1fa/frame = 0xfffffe026ea9abe0 >>> sctp_input() at sctp_input+0x10/frame 0xfffffe026ea9abf0 >>> ip_input() at ip_input+0x2ab/frame 0xfffffe026ea9ac50 >>> netisr_dispatch_src() at netisr_dispatch_src+0xad/frame = 0xfffffe026ea9acb0 >>> ether_demux() at ether_demux+0x17a/frame 0xfffffe026ea9ace0 >>> ether_nh_input() at ether_nh_input+0x39f/frame 0xfffffe026ea9ad30 >>> netisr_dispatch_src() at netisr_dispatch_src+0xad/frame = 0xfffffe026ea9ad90 >>> ether_input() at ether_input+0xd9/frame 0xfffffe026ea9adf0 >>> epair_tx_start_deferred() at epair_tx_start_deferred+0xd7/frame = 0xfffffe026ea9ae40 >>> taskqueue_run_locked() at taskqueue_run_locked+0xab/frame = 0xfffffe026ea9aec0 >>> taskqueue_thread_loop() at taskqueue_thread_loop+0xd3/frame = 0xfffffe026ea9aef0 >>> fork_exit() at fork_exit+0x82/frame 0xfffffe026ea9af30 >>> fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe026ea9af30 >>> --- trap 0, rip =3D 0x35c39ec8bda0, rsp =3D 0, rbp =3D = 0x35c39ec8ec90 --- >>> KDB: enter: panic >>>=20 >>> That seems to be panicking during SCTP packet handling, so I do not = believe this to be a pf bug. >>> Reverting both commits avoids the problem. >>> It=E2=80=99s also failing during the CI tests: = https://ci.freebsd.org/view/Test/job/FreeBSD-main-amd64-test/23957/console= >>> (To reproduce, kldload pf sctp ; cd /usr/tests/sys/netpfil/pf ; sudo = kyua test sctp:basic_v4). >> Thank you very much for that line!! >>=20 >> I think I know what the problem is. It comes down to an inconsistent = handling of shutdown() calls. >> This results in inconsistent sb_ccc / sb_acc values which are now = caught. >>=20 >> I'm working on a patch which also fixes several syzkaller issues. = Using the above line, I'll also make >> sure it fixes the issue you are observing. Should be fixed by Monday. >=20 > In the meantime, it's impossible to run through the test suite. Would > it be possible to revert the offending commit(s) until a bug fix is > ready? I committed a fix for the particular problem triggering the panic when running the SCTP tests in = https://cgit.FreeBSD.org/src/commit/?id=3Defb04fb404b240a99c618e49174cd626= 0217edaa Thanks to kp@ for providing a hint how to run the particular tests. The = SCTP pf tests should pass now again. Best regards Michael=