From nobody Fri Aug 04 15:16:39 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 4RHTp46Gj2z4Tlgt; Fri, 4 Aug 2023 15:16:44 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RHTp43KKlz3RTS; Fri, 4 Aug 2023 15:16:44 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x732.google.com with SMTP id af79cd13be357-76c93abeb83so170651685a.0; Fri, 04 Aug 2023 08:16:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691162202; x=1691767002; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :from:to:cc:subject:date:message-id:reply-to; bh=geAQseklUR/icIYaRObxR7a+H/IwCxQnF+C3DkWTESQ=; b=lNSv09c5z2/Cct4SXNiydOvcwvPqRbzwEUhK9M93s2+/uvwEnPQ+QzQ7SfcuI+khYE qjWfVZ+ya8Bb1H1eG+vMtpedExo4N2yyR00OkEIA3aiBGNYK1CX03q24JLuC1H1IPLb6 hxt9fgSfamGxHEbrUpy19zMX3dx5V7mqALqcgGh7UekoAYI9a41OkdnSLQN0r7wd3c5z hbcxXaYM9tvhnAcSv0PWNXIkHSqh/UuinzTGbqQngj1X9VDtgt6P52rLSz/eN0Ekd9+I SfPiflXsJOaG8+rLjE0+LwSo+wl2z8uLfAySuiSQx7oQzs448K/J1Mj32y78yr8xwaZv IeQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691162202; x=1691767002; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=geAQseklUR/icIYaRObxR7a+H/IwCxQnF+C3DkWTESQ=; b=UMPCIk9FJlxiXRRAY4MiIrfd7BkFj4LsLZVwAxa2fkLWJLF9mXzG2ah2NMAo+WeLLq 3ynG1X973HfFkCNqZeBry1Z0pmPwm6eKigrCUn/GRRLI+lK4M6OYpPzJmujWP/eIK00r PWDbG+3DucHrvgmz4N1vV9qXFbNzOpYe/boL7pOxjMdnLrAacQ35GxP8Secg2a5YmOj0 qYuUiMIo8QUdTAyBeqiOqFngUFco9O+i4Z2L2EZUwrEIRTcRgjppca4qlImYkx09wkP8 HtpP7fO4qKLTQKJHuVETpnVLZlIk/65WnZuF2u4TjRUkW/waEU7GV8RaCHWDEQtxuZ+X 7w2Q== X-Gm-Message-State: AOJu0YwYWp4GWC32y2Lya357Y6cu+bwPfcwf1Kv54anPg2tIEoQiNR5Q SKAFrGVbJoLOUZ5n+bZbg/7xyDhcZA4= X-Google-Smtp-Source: AGHT+IEaq782DcyDzUYYM2AbFlcebUxA+mZ04hhMx+Tirpx5cXmA9/pt1YTtArIIyZKo0aM4hP+n9w== X-Received: by 2002:a05:620a:3904:b0:76c:b87c:16cc with SMTP id qr4-20020a05620a390400b0076cb87c16ccmr2684262qkn.61.1691162202398; Fri, 04 Aug 2023 08:16:42 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id i17-20020a05620a145100b0076ca9269de7sm703211qkl.124.2023.08.04.08.16.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 08:16:41 -0700 (PDT) Date: Fri, 4 Aug 2023 11:16:39 -0400 From: Mark Johnston To: tuexen@freebsd.org Cc: Kristof Provost , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: b279e84a47dd - main - sctp: improve consistency Message-ID: References: <202307282203.36SM3C98056354@gitrepo.freebsd.org> 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 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspamd-Queue-Id: 4RHTp43KKlz3RTS 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:15169, ipnet:2607:f8b0::/32, country:US] On Fri, Aug 04, 2023 at 03:53:31PM +0200, tuexen@freebsd.org wrote: > > On 4. Aug 2023, at 15:03, Kristof Provost wrote: > > > > 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=b279e84a47ddb59e55b5a3cec31c51cd41bf0dc3 > > commit b279e84a47ddb59e55b5a3cec31c51cd41bf0dc3 > > Author: Michael Tuexen > > AuthorDate: 2023-07-28 12:36:11 +0000 > > Commit: Michael Tuexen > > CommitDate: 2023-07-28 12:36:11 +0000 > > sctp: improve consistency > > This is simplifying a patch to address PR 260116. > > PR: 260116 > > 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 = 7 > > time = 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 = 0x35c39ec8bda0, rsp = 0, rbp = 0x35c39ec8ec90 --- > > KDB: enter: panic > > > > 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’s 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!! > > 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. > > 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. 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?