From owner-freebsd-pf@freebsd.org Sat Jun 23 15:27:33 2018 Return-Path: Delivered-To: freebsd-pf@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C9F31024E47 for ; Sat, 23 Jun 2018 15:27:33 +0000 (UTC) (envelope-from zarychtam@plan-b.pwste.edu.pl) Received: from plan-b.pwste.edu.pl (plan-b.pwste.edu.pl [IPv6:2001:678:618::40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "plan-b.pwste.edu.pl", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2E0F86D29 for ; Sat, 23 Jun 2018 15:27:32 +0000 (UTC) (envelope-from zarychtam@plan-b.pwste.edu.pl) Received: from plan-b.pwste.edu.pl (zarychtam@localhost [127.0.0.1]) by plan-b.pwste.edu.pl (8.15.2/8.15.2) with ESMTPS id w5NFRT8s081767 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sat, 23 Jun 2018 17:27:29 +0200 (CEST) (envelope-from zarychtam@plan-b.pwste.edu.pl) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=plan-b.pwste.edu.pl; s=plan-b-mailer; t=1529767649; bh=cfVfzTBnUkzQmE7tS1VBCCkS3Ki0cDTe//iYTJYpmOQ=; h=Date:From:To:Subject:References:In-Reply-To; b=tquOZZNQflBqHYCPElr2xTDFBmPa9ENxqRByn8W4sIBglDFz7a2qLAcUayj8Ic+3Y 73xzGxWdkjka9UE1uhw+73/PNVRmEBQ3hRBSOOwTpG4v0PyH3lDTWz4nmaE3i2yzmj aywp8UMUjmORohfZQunmU7n1BV1P5L5RUxEl0oJ0GZK9L1vsz0Y0tbdM7xUnaK2yeO AZow4iOEPsN5GdIw1f7J8/LivUKnSeEt0uyigjiHKAv2re1PU9THPNO/iG3fqt08pY /uhizVvOA1Jgi4JHLhYzRgKADveH4kdcH0IIW7EDBx9tSn0Gu7uIJo5ut3iTx/9H1R mMN29AmjfFYEQ== Received: (from zarychtam@localhost) by plan-b.pwste.edu.pl (8.15.2/8.15.2/Submit) id w5NFRTx3081766 for freebsd-pf@freebsd.org; Sat, 23 Jun 2018 17:27:29 +0200 (CEST) (envelope-from zarychtam) Date: Sat, 23 Jun 2018 17:27:29 +0200 From: Marek Zarychta To: freebsd-pf@freebsd.org Subject: Re: pfr_update_stats: assertion failed. Message-ID: <20180623152729.GA81271@plan-b.pwste.edu.pl> References: <20161016181713.GA95110@plan-b.pwste.edu.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2fHTh5uZTiUOsy+g" Content-Disposition: inline In-Reply-To: <20161016181713.GA95110@plan-b.pwste.edu.pl> User-Agent: Mutt/1.10.0 (2018-05-17) X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jun 2018 15:27:33 -0000 --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 16, 2016 at 08:17:13PM +0200, Marek Zarychta wrote: > The issue occurred first two years ago, after upgrade from 8 to 9 > branch. Now this i386 machine is running 11.0-STABLE and despite it was > compiled with "WITHOUT_ASSERT_DEBUG=3Dyes", still from time to time > message buffer is fed with: > pfr_update_stats: assertion failed. > pfr_update_stats: assertion failed. > pfr_update_stats: assertion failed. > pfr_update_stats: assertion failed. > pfr_update_stats: assertion failed. > pfr_update_stats: assertion failed. > pfr_update_stats: assertion failed. These messages are still filling system message buffer. According to pfctl (8) there is nothing wrong with incrementing "XPass" counters instead of the "Pass" counters. The message "pfr_update_stats: assertion failed" is printed for debugging purposes only. One could also compare the counters with the command "pfctl -sT -vv".=20 OpenBSD converted printf()'s to DPFDEBUG() macro in their sources almost 8 years ago. Only this printf() in pf_table.c has been converted to the level of LOG_DEBUG [1]. Perhaps this line of code could be removed from FreeBSD PF sources? --- sys/netpfil/pf/pf_table.orig.c 2018-06-23 16:40:14.876882000 +0200 +++ sys/netpfil/pf/pf_table.c 2018-06-23 16:40:23.621384000 +0200 @@ -1986,5 +1986,4 @@ if ((ke =3D=3D NULL || ke->pfrke_not) !=3D notrule) { if (op_pass !=3D PFR_OP_PASS) - printf("pfr_update_stats: assertion failed.\n"); op_pass =3D PFR_OP_XPASS; } [1] http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/net/pf_table.c?rev=3D1= =2E86&content-type=3Dtext/x-cvsweb-markup --=20 Marek Zarychta --2fHTh5uZTiUOsy+g Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEMOqvKm6wKvS1/ZeCdZ/s//1SjSwFAlsuZt4ACgkQdZ/s//1S jSznEwgAmde6gZb+hmM6oz9wIVREKETKUr7+pvrECYkq1OY57RnW5zANHbJOG6xM A1Y/XNaGL2Jk7OPvfcyL/edCBLGM0wf+u0neyQv3bPECi78/kdkyvA6Hf+gp3Eag ScF6LwqYP2wnhzFnX+PgcHYdgPUmCDz1wKcKxkPR/pW9oB024aUuM7kF0oeMkSZ0 M6cz0Kh5NoQvL+ObqlEdmYgOSDyXxD+6SN42laJiAj5xjmtCHBFBwYjQcs/3Jwok 4XNFZr2Xqbwcr7GzGFR7Ppddk5d6jCIyuRDvptK55hbf0w957D19Wmn14i5zP9Zu kNrM3rHI0HxxXLjv6VFhigVxxAEbFQ== =5WVh -----END PGP SIGNATURE----- --2fHTh5uZTiUOsy+g--