Date: Wed, 8 Jul 2020 12:52:44 +0200 From: Kajetan Staszkiewicz <vegeta@tuxpowered.net> To: net@FreeBSD.org Subject: Re: Deadlocks when using pf tags or socket owner matching Message-ID: <eb66e05f-2f0b-5a03-20b4-a769940cf18a@tuxpowered.net> In-Reply-To: <48de3ee4-ba52-f6a7-b2d7-c7d77a635eb9@tuxpowered.net> References: <48de3ee4-ba52-f6a7-b2d7-c7d77a635eb9@tuxpowered.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --yEzZMLrgxrRIzpZa0bKJrQPIfBrwL7kMf Content-Type: multipart/mixed; boundary="kMSNcjkdGcBOG2IAD2bce4HKefCCGnhuE" --kMSNcjkdGcBOG2IAD2bce4HKefCCGnhuE Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable I have forgot to mention my system: it's FreeBSD 11.3-RELEASE-p9 I have also managed to replicate this (or a similar) issue on a test system built with lock debugging and I got this: Jul 8 10:32:07 hwlb-aw-01 kernel: lock order reversal: Jul 8 10:32:07 hwlb-aw-01 kernel: 1st 0xffffffff81850760 pf rulesets (pf rulesets) @ /usr/home/kajetan.staszkiewicz/freebsd.git/sys/netpfil/pf/pf.c:6006 Jul 8 10:32:07 hwlb-aw-01 kernel: 2nd 0xfffff8011f7028a8 tcpinp (tcpinp) @ /usr/home/kajetan.staszkiewicz/freebsd.git/sys/netinet/in_pcb.c:1994 Jul 8 10:32:07 hwlb-aw-01 kernel: stack backtrace: Jul 8 10:32:07 hwlb-aw-01 kernel: #0 0xffffffff806c2390 at witness_debugger+0x70 Jul 8 10:32:07 hwlb-aw-01 kernel: #1 0xffffffff806c222a at witness_checkorder+0xe3a Jul 8 10:32:07 hwlb-aw-01 kernel: #2 0xffffffff8065a01b at __rw_rlock_int+0x8b Jul 8 10:32:07 hwlb-aw-01 kernel: #3 0xffffffff80790af2 at in_pcblookup_hash+0x182 Jul 8 10:32:07 hwlb-aw-01 kernel: #4 0xffffffff81825546 at pf_socket_lookup+0xd6 Jul 8 10:32:07 hwlb-aw-01 kernel: #5 0xffffffff8182af00 at pf_test_rule+0x18c0 Jul 8 10:32:07 hwlb-aw-01 kernel: #6 0xffffffff81826e68 at pf_test+0x15e= 8 Jul 8 10:32:07 hwlb-aw-01 kernel: #7 0xffffffff81826b82 at pf_test+0x130= 2 Jul 8 10:32:07 hwlb-aw-01 kernel: #8 0xffffffff81837b7d at pf_check_in+0= x1d Jul 8 10:32:07 hwlb-aw-01 kernel: #9 0xffffffff80775107 at pfil_run_hooks+0x97 Jul 8 10:32:07 hwlb-aw-01 kernel: #10 0xffffffff8079548e at ip_input+0x3= fe Jul 8 10:32:07 hwlb-aw-01 kernel: #11 0xffffffff80774020 at netisr_dispatch_src+0x80 Jul 8 10:32:07 hwlb-aw-01 kernel: #12 0xffffffff807599af at ether_demux+0x14f Jul 8 10:32:07 hwlb-aw-01 kernel: #13 0xffffffff8075acfa at ether_nh_input+0x34a Jul 8 10:32:07 hwlb-aw-01 kernel: #14 0xffffffff80774020 at netisr_dispatch_src+0x80 Jul 8 10:32:07 hwlb-aw-01 kernel: #15 0xffffffff80759e12 at ether_input+0x62 Jul 8 10:32:07 hwlb-aw-01 kernel: #16 0xffffffff80762da3 at vlan_input+0x2a3 Jul 8 10:32:07 hwlb-aw-01 kernel: #17 0xffffffff80759995 at ether_demux+0x135 pf.c:6006 pf_test(): pd.pf_mtag =3D pf_find_mtag(m); PF_RULES_RLOCK(); if (ip_divert_ptr !=3D NULL && in_pcb.c:1994 in_pcblookup_hash(): } else { INP_RLOCK(inp); if (in_pcbrele_rlocked(inp)) --=20 | pozdrawiam / greetings | Powered by macOS, Debian and FreeBSD | | Kajetan Staszkiewicz | www: http://vegeta.tuxpowered.net | `------------------------^--------------------------------------' --kMSNcjkdGcBOG2IAD2bce4HKefCCGnhuE-- --yEzZMLrgxrRIzpZa0bKJrQPIfBrwL7kMf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSOEQZObv2B8mf0JbnjtFCvbXs6FAUCXwWlfAAKCRDjtFCvbXs6 FDxDAJ9Arp7gsaZJtsTOIIwNqk9VMelEwwCg9V5wV58/+g6BhNBidfXIV51+bFk= =Rn96 -----END PGP SIGNATURE----- --yEzZMLrgxrRIzpZa0bKJrQPIfBrwL7kMf--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?eb66e05f-2f0b-5a03-20b4-a769940cf18a>