From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 9 23:01:20 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13A9816A41F for ; Fri, 9 Sep 2005 23:01:20 +0000 (GMT) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D4BD43D46 for ; Fri, 9 Sep 2005 23:01:19 +0000 (GMT) (envelope-from max@love2party.net) Received: from p54A3E79B.dip.t-dialin.net [84.163.231.155] (helo=donor.laier.local) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0ML2ov-1EDrrv2TlO-00043y; Sat, 10 Sep 2005 01:01:15 +0200 From: Max Laier To: freebsd-hackers@freebsd.org Date: Sat, 10 Sep 2005 01:00:58 +0200 User-Agent: KMail/1.8.2 References: <2845.195.12.22.194.1126261787.squirrel@www.helenmarks.co.uk> <3178.195.12.22.194.1126271140.squirrel@www.helenmarks.co.uk> <200509091919.22875.max@love2party.net> In-Reply-To: <200509091919.22875.max@love2party.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3498579.yPsiltEobq"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200509100101.13974.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: dominic.marks@graphdata.co.uk, Dominic Marks Subject: Re: FreeBSD 6.0-BETA4 panics when when configuring pfsync0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2005 23:01:20 -0000 --nextPart3498579.yPsiltEobq Content-Type: multipart/mixed; boundary="Boundary-01=_1QhIDM7Dn63Hw3n" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_1QhIDM7Dn63Hw3n Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 09 September 2005 19:19, Max Laier wrote: > On Friday 09 September 2005 15:05, Dominic Marks wrote: > > Dominic Marks wrote: > > > Hello, > > > > > > I am setting up a redundant firewall setup for our company, the syste= ms > > > are identically configured Dell servers running FreeBSD 6.0-BETA4. > > > Software being used is pf, carp, pfsync and altq. > > > > > > When I attempt to configure the pfsync0 interface the systems panic. > > > The systems currently have HTT enabled, I've googled but I didn't find > > > anything to suggest pfsync was not SMP/HTT friendly. Could this be a > > > configuration problem? > > > > > > interface: > > > > > > # ifconfig em2 > > > em2: flags=3D8843 mtu 1500 > > > options=3Db > > > inet 172.16.254.2 netmask 0xffffff00 broadcast 172.16.254.255 > > > ether 00:04:23:bd:7a:ef > > > media: Ethernet autoselect (100baseTX ) > > > status: active > > > > > > command: > > > > > > # ifconfig pfsync0 syncdev em2 syncpeer 172.16.254.1 > > > > Following a little more testing: > > > > If I don't specify a syncpeer I don't get the panic. > > Thanks for the dump. Seems like we were leaking a lock from pfsyncioctl(= ). > Can you please try this patch and report back. Thanks in advance. And the patch ... sorry. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --Boundary-01=_1QhIDM7Dn63Hw3n Content-Type: text/x-diff; charset="iso-8859-6"; name="if_pfsync.lockleak.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="if_pfsync.lockleak.diff" Index: if_pfsync.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/store/mlaier/fcvs/src/sys/contrib/pf/net/if_pfsync.c,v retrieving revision 1.19.2.2 diff -u -p -r1.19.2.2 if_pfsync.c =2D-- if_pfsync.c 25 Aug 2005 05:01:03 -0000 1.19.2.2 +++ if_pfsync.c 9 Sep 2005 17:16:39 -0000 @@ -1128,14 +1128,14 @@ pfsyncioctl(struct ifnet *ifp, u_long cm imo->imo_multicast_ifp =3D sc->sc_sync_ifp; imo->imo_multicast_ttl =3D PFSYNC_DFLTTL; imo->imo_multicast_loop =3D 0; +#ifdef __FreeBSD__ + PF_LOCK(); +#endif } =20 if (sc->sc_sync_ifp || sc->sc_sendaddr.s_addr !=3D INADDR_PFSYNC_GROUP) { /* Request a full state table update. */ =2D#ifdef __FreeBSD__ =2D PF_LOCK(); =2D#endif sc->sc_ureq_sent =3D time_uptime; #if NCARP > 0 if (pfsync_sync_ok) --Boundary-01=_1QhIDM7Dn63Hw3n-- --nextPart3498579.yPsiltEobq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDIhQ5XyyEoT62BG0RAvaWAJ4uTJQYilTCE7faIMRwJVlZmjTkTgCfW9kF iTEAfvc18NEZojxMvEZnY5Y= =kCjX -----END PGP SIGNATURE----- --nextPart3498579.yPsiltEobq--