From owner-freebsd-net@freebsd.org Tue Oct 13 12:28:49 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E64BD4412DA; Tue, 13 Oct 2020 12:28:49 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C9ZbP5qKFz3RcG; Tue, 13 Oct 2020 12:28:49 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 90D361622B; Tue, 13 Oct 2020 12:28:49 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id B7D763777E; Tue, 13 Oct 2020 14:28:47 +0200 (CEST) From: "Kristof Provost" To: "Eugene M. Zheganin" Cc: freebsd-stable@freebsd.org, freebsd-net@freebsd.org Subject: Re: pf and hnX interfaces Date: Tue, 13 Oct 2020 14:28:44 +0200 X-Mailer: MailMate (1.13.2r5673) Message-ID: <4DB3A1EB-CC4B-440E-9370-7597EFAAEB38@FreeBSD.org> In-Reply-To: <7cf8b21a-b100-c6d6-fc98-4636386ed8b8@norma.perm.ru> References: <7166d87e-7547-6be8-42a7-b0957ca4f543@norma.perm.ru> <5FB9EFF9-0D95-4FC6-9469-2FC29D479379@FreeBSD.org> <7cf8b21a-b100-c6d6-fc98-4636386ed8b8@norma.perm.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2020 12:28:50 -0000 On 13 Oct 2020, at 14:02, Eugene M. Zheganin wrote: > Hello, > > On 13.10.2020 14:19, Kristof Provost wrote: >> Are these symptoms of a bug ? >>> >> Perhaps. It can also be a symptom of resource exhaustion. >> Are there any signs of memory allocation failures, or incrementing >> error counters (in netstat or in pfctl)? >> >> > Well, the only signs of resource exhaustion I know so far are: > > - "PF state limit reached" in /var/log/messages (none so far) > > - mbufs starvation in netstat -m (zero so far) > > - various queue failure counters in netstat -s -p tcp, but since this > only applies to TCP this is hardly related (although it seems like > there's also none). > > > so, what should I take a look at ? > > > Disabled PF shows in pfctl -s info: > > > [root@gw1:/var/log]# pfctl -s info > Status: Disabled for 0 days 00:41:42          Debug: Urgent > > State Table                          > Total             Rate >   current entries                     9634 >   searches                     > 24212900618      9677418.3/s >   inserts                        > 222708269        89012.1/s >   removals                       > 222698635        89008.2/s > Counters >   match                          > 583327668       233144.6/s >   bad-offset                             > 0            0.0/s >   > fragment                               > 1            0.0/s >   > short                                  > 0            0.0/s >   normalize                              > 0            0.0/s >   > memory                                 > 0            0.0/s >   bad-timestamp                          > 0            0.0/s >   congestion                             > 0            0.0/s >   ip-option                          > 76057           30.4/s >   proto-cksum                         > 9669            3.9/s >   state-mismatch                   > 3007108         1201.9/s >   state-insert                       > 13236            5.3/s >   state-limit                            > 0            0.0/s >   src-limit                              > 0            0.0/s >   > synproxy                               > 0            0.0/s >   map-failed                             > 0            0.0/s > > What’s your current state limit? You’re getting a lot of state-mismatches. (Also note that ip-options and proto-cksum also indicate dropped packets.) If you set pfctl -x loud you should get reports for those state mismatches. There’ll be a lot though, so maybe pick a quiet time to do that. Kristof