From nobody Sat Jul 10 12:33:51 2021 X-Original-To: stable@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 B431D8D334A for ; Sat, 10 Jul 2021 12:34:08 +0000 (UTC) (envelope-from lutz@iks-jena.de) Received: from annwfn.iks-jena.de (annwfn.iks-jena.de [IPv6:2001:4bd8::19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4GMTww38xzz4s0b; Sat, 10 Jul 2021 12:34:08 +0000 (UTC) (envelope-from lutz@iks-jena.de) X-SMTP-Sender: IPv6:2001:4bd8:0:666:248:54ff:fe12:ee3f Received: from belenus.iks-jena.de (belenus.iks-jena.de [IPv6:2001:4bd8:0:666:248:54ff:fe12:ee3f]) by annwfn.iks-jena.de (8.15.2/8.15.2) with ESMTPS id 16ACXqxd021228 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 10 Jul 2021 14:33:52 +0200 X-MSA-Host: belenus.iks-jena.de Received: (from lutz@localhost) by belenus.iks-jena.de (8.14.3/8.14.1/Submit) id 16ACXp29030988; Sat, 10 Jul 2021 14:33:51 +0200 Date: Sat, 10 Jul 2021 14:33:51 +0200 From: Lutz Donnerhacke To: Stefan Esser Cc: Karl Denninger , stable@freebsd.org Subject: Re: [PATCH] Re: 12.2 Splay Tree ipfw potential panic source Message-ID: <20210710123351.GA30826@belenus.iks-jena.de> References: <2e3dcd4d-c8e6-8381-0010-d0844c99901e@denninger.net> <20210708221134.GA32658@belenus.iks-jena.de> <7bfda38b-cf81-d8be-7691-e18946e6b56e@denninger.net> List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-message-flag: Please send plain text messages only. Thank you. User-Agent: Mutt/1.5.17 (2007-11-01) X-Rspamd-Queue-Id: 4GMTww38xzz4s0b X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N On Sat, Jul 10, 2021 at 10:52:48AM +0200, Stefan Esser wrote: > > /sys/netinet/libalias/alias_db.c:1753: > > > > if (packets % packet_limit == 0) { > > > > Seems that packet_limit can become zero, there ... > > > > At line 1780 within that function: > > > > if (now != LibAliasTime) { > > /* retry three times a second */ > > packet_limit = packets / 3; > > packets = 0; > > LibAliasTime = now; > > } Thank you for deducing the reason. Seem to be my fault. I only tested it with heavy traffic. The +1 solution seems to be the best one, because the real number is not important (+100 works, too) and this way the per packet code path is kept to a minimum of instructions. Does a bug ticket exists? I'll issue a review tomorrow.