From owner-freebsd-net@freebsd.org Tue Oct 13 12:02:42 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 21949440043; Tue, 13 Oct 2020 12:02:42 +0000 (UTC) (envelope-from emz@norma.perm.ru) Received: from elf.hq.norma.perm.ru (mail.norma.perm.ru [128.127.146.8]) (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 (2048 bits) client-digest SHA256) (Client CN "mail.norma.perm.ru", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C9Z1D1Tmpz4dJ6; Tue, 13 Oct 2020 12:02:39 +0000 (UTC) (envelope-from emz@norma.perm.ru) Received: from bsdrookie.norma.com. (net147.234.188-221.ertelecom.ru [188.234.147.221] (may be forged)) by elf.hq.norma.perm.ru (8.15.2/8.15.2) with ESMTPS id 09DC3FXe029117 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Tue, 13 Oct 2020 17:03:16 +0500 (+05) (envelope-from emz@norma.perm.ru) Subject: Re: pf and hnX interfaces To: freebsd-stable@freebsd.org References: <7166d87e-7547-6be8-42a7-b0957ca4f543@norma.perm.ru> <5FB9EFF9-0D95-4FC6-9469-2FC29D479379@FreeBSD.org> Cc: freebsd-net@freebsd.org From: "Eugene M. Zheganin" Message-ID: <7cf8b21a-b100-c6d6-fc98-4636386ed8b8@norma.perm.ru> Date: Tue, 13 Oct 2020 17:02:31 +0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <5FB9EFF9-0D95-4FC6-9469-2FC29D479379@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Server: elf.hq.norma.perm.ru X-Rspamd-Queue-Id: 4C9Z1D1Tmpz4dJ6 X-Spamd-Bar: +++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=perm.ru; spf=pass (mx1.freebsd.org: domain of emz@norma.perm.ru designates 128.127.146.8 as permitted sender) smtp.mailfrom=emz@norma.perm.ru X-Spamd-Result: default: False [5.98 / 15.00]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[188.234.147.221:received]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(0.00)[+a]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; HFILTER_HELO_IP_A(1.00)[elf.hq.norma.perm.ru]; NEURAL_SPAM_MEDIUM(1.00)[0.997]; HFILTER_HELO_NORES_A_OR_MX(0.30)[elf.hq.norma.perm.ru]; BAD_REP_POLICIES(0.10)[]; RBL_VIRUSFREE_BOTNET(2.00)[128.127.146.8:from]; NEURAL_SPAM_SHORT(0.69)[0.687]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(0.00)[perm.ru,none]; NEURAL_SPAM_LONG(1.00)[1.001]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:57401, ipnet:128.127.146.0/24, country:RU]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-stable,freebsd-net]; RCVD_COUNT_TWO(0.00)[2] 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:02:42 -0000 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 And these gazzillions of searches kinda bother me a lot, although this seems just to be a counting bug after PF reloading last time, because it's constantly diminished from 20 millions. To be honest I doubt 10 millions of searches per second can be reached on a pps of 22Kpps. Definitely a math bug. Eugene.