From owner-freebsd-net@FreeBSD.ORG Sun Aug 21 00:13:51 2011 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEF2C1065670 for ; Sun, 21 Aug 2011 00:13:51 +0000 (UTC) (envelope-from ask@develooper.com) Received: from mbox1.develooper.com (mbox1.develooper.com [207.171.7.178]) by mx1.freebsd.org (Postfix) with ESMTP id 3F78F8FC15 for ; Sun, 21 Aug 2011 00:13:51 +0000 (UTC) Received: (qmail 8500 invoked from network); 20 Aug 2011 23:47:09 -0000 Received: from cpe-75-83-150-233.socal.res.rr.com (HELO embla.bn.dev) (ask@mail.dev@75.83.150.233) by smtp.develooper.com with ESMTPA; 20 Aug 2011 23:47:09 -0000 Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: multipart/signed; boundary="Apple-Mail=_F8BCD913-F8F2-4B6B-802A-54316BBCA012"; protocol="application/pkcs7-signature"; micalg=sha1 From: =?iso-8859-1?Q?Ask_Bj=F8rn_Hansen?= In-Reply-To: <201108190830.p7J8UJPW041136@freefall.freebsd.org> Date: Sat, 20 Aug 2011 16:47:07 -0700 Message-Id: <70CAC026-8187-4080-8FAE-B9A494F8D4E5@develooper.com> References: <201108190830.p7J8UJPW041136@freefall.freebsd.org> To: Paul Herman X-Mailer: Apple Mail (2.1244.3) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@FreeBSD.org Subject: Re: kern/127050: [carp] ipv6 does not work on carp interfaces [regression] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Aug 2011 00:13:52 -0000 --Apple-Mail=_F8BCD913-F8F2-4B6B-802A-54316BBCA012 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Aug 19, 2011, at 1:30, Paul Herman wrote: > --------------010305010708060807000808 > Content-Type: application/gzip; > name=3D"carp_ip6_alias.patch.gz" > Content-Transfer-Encoding: base64 > Content-Disposition: attachment; > filename=3D"carp_ip6_alias.patch.gz" I wanted to try it, but gzip doesn't seem to like that file =85 (downloaded from http://www.freebsd.org/cgi/query-pr.cgi?pr=3D127050&cat=3D= ) - ask= --Apple-Mail=_F8BCD913-F8F2-4B6B-802A-54316BBCA012-- From owner-freebsd-net@FreeBSD.ORG Sun Aug 21 01:45:16 2011 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCBBA106564A; Sun, 21 Aug 2011 01:45:16 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 959848FC12; Sun, 21 Aug 2011 01:45:16 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p7L1jGvs074413; Sun, 21 Aug 2011 01:45:16 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p7L1jGCT074409; Sun, 21 Aug 2011 01:45:16 GMT (envelope-from linimon) Date: Sun, 21 Aug 2011 01:45:16 GMT Message-Id: <201108210145.p7L1jGCT074409@freefall.freebsd.org> To: vadval15@gmail.com, linimon@FreeBSD.org, freebsd-net@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/159927: Support of ethernet devices X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Aug 2011 01:45:16 -0000 Synopsis: Support of ethernet devices State-Changed-From-To: open->closed State-Changed-By: linimon State-Changed-When: Sun Aug 21 01:44:51 UTC 2011 State-Changed-Why: See kern/159936. http://www.freebsd.org/cgi/query-pr.cgi?pr=159927 From owner-freebsd-net@FreeBSD.ORG Sun Aug 21 04:09:24 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 553F3106564A for ; Sun, 21 Aug 2011 04:09:24 +0000 (UTC) (envelope-from bhutchings@solarflare.com) Received: from exchange.solarflare.com (mail.solarflare.com [216.237.3.220]) by mx1.freebsd.org (Postfix) with ESMTP id 376AB8FC0C for ; Sun, 21 Aug 2011 04:09:23 +0000 (UTC) Received: from [192.168.4.185] ([88.96.1.126]) by exchange.solarflare.com with Microsoft SMTPSVC(6.0.3790.4675); Sat, 20 Aug 2011 21:09:23 -0700 From: Ben Hutchings To: freebsd-net@freebsd.org In-Reply-To: <17D3FAD0-1372-45BA-B4A1-02840B925F1F@gmail.com> References: <4E4E3522.6030207@gmail.com> <1313806260.2814.57.camel@deadeye> <17D3FAD0-1372-45BA-B4A1-02840B925F1F@gmail.com> Content-Type: text/plain; charset="UTF-8" Organization: Solarflare Communications Date: Sun, 21 Aug 2011 05:09:17 +0100 Message-ID: <1313899757.3142.13.camel@deadeye> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 21 Aug 2011 04:09:23.0359 (UTC) FILETIME=[1BE622F0:01CC5FB8] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.500.1024-18334.005 X-TM-AS-Result: No--21.703400-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No Subject: Re: Test tools for new network driver X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Aug 2011 04:09:24 -0000 On Sat, 2011-08-20 at 11:18 +0100, Ben Gray wrote: > Thanks everyone, > > Cheers for the tips on the mac address, I must admit I wasn't aware > of the locally assigned bit in the address. > > As for H/W checksum offloading, the main problem is the datasheet > for the chip is under NDA which I'm unwilling to sign, so I'm working > off the Linux driver. It seems under Linux if the TCP/UDP checksum > fails it reverts to a software calculation and as far as I can tell > FreeBSD doesn't do this. Hence it seems under Linux the driver reports > incorrect csums but the kernel covers up for it. [...] That's right. Linux doesn't entirely trust hardware checksum validation, so drivers can't report that the checksum was definitely bad. You should be able to get this behaviour on FreeBSD by not setting any checksum flags if the hardware says the checksum is bad. Ben. -- Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked. From owner-freebsd-net@FreeBSD.ORG Sun Aug 21 08:12:05 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6814E106564A for ; Sun, 21 Aug 2011 08:12:05 +0000 (UTC) (envelope-from s.khanchi@gmail.com) Received: from mail-pz0-f45.google.com (mail-pz0-f45.google.com [209.85.210.45]) by mx1.freebsd.org (Postfix) with ESMTP id 446F28FC12 for ; Sun, 21 Aug 2011 08:12:05 +0000 (UTC) Received: by pzk33 with SMTP id 33so13231914pzk.18 for ; Sun, 21 Aug 2011 01:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=Qo+MoFZIaVvxVQvfQkogoH4fE8ieMQja5TIko/i891g=; b=n2K2T1/DUvpbgr0U9jxHwSA5fZzrR9dpuCsxHK1jbP0thkxL8pTE94h+q1b1WU4ox3 ndiWYgDBN1cZGvF3hOXTI1HIPNR14tmnzTJPf7dAHp4QQZaK373mSrxdhh2mpo3lcxH6 IGmEbWoQ9ww+y8tYSh8URxYTB5+0DNWsiwCew= MIME-Version: 1.0 Received: by 10.142.201.20 with SMTP id y20mr910459wff.133.1313912859160; Sun, 21 Aug 2011 00:47:39 -0700 (PDT) Sender: s.khanchi@gmail.com Received: by 10.142.53.6 with HTTP; Sun, 21 Aug 2011 00:47:39 -0700 (PDT) Date: Sun, 21 Aug 2011 12:17:39 +0430 X-Google-Sender-Auth: Bck_UaJc0lei5u3_0u5zUU7gBS0 Message-ID: From: h bagade To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: problem with setting nat using pf X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Aug 2011 08:12:05 -0000 Hi all, I am trying to use pf nat rules with pool support on FreeBsd 8.0, working together with ipfw as the main firewall. According to the natting concepts i faced in manuals and docs, nat concept is to map the source address to the natted address when sending the packets from that source and then map the destination address of the related reply packets. but when I define pf nat rules with a pool of IP addresses not available on the outside interface ip addresses, the outgoing traffic is natted to one of the pool addresses but the response is not received via that interface so the pf can map the destination address to the real one. here is one of my configs i used during my tests: *configurations:* *pf.conf:* nat on eth1 from { 11.11.11.0/24} to any -> {172.16.10.1,172.16.10.2,172. 16.10.3,172.16.10.4,172.16.10.5,172.16.10.6,172.16.10.7,172.16.10.8,172.16.10.9,172.16.10.10} main system configurations: eth0: 11.11.11.1 eth1: 172.16.10.64 system A: directly connected to eth0- 11.11.11.11 system B: directly connected to eth1- 172.16.10.65 in this configs the dafult route of system A and system B are the middle systems connected ip address. as mentioned, when systemA pings systemB, the ping requests are natted to 172.16.10.1 and received at systemB but systemB doesn't send icmp replies because it doesn't know to whom it should send the replies (no answer to system B 's ARP requests about who has the natted IP). now my question is, isn't it the pf nat responsibilty to manage this condition and send the ARP replies to SystemB? or, are my configs wrong? or i misunderstood the nat concepts? any ideas or helps are really appreciated as i have to set this nat on my main system, asap. Thanks in advance. From owner-freebsd-net@FreeBSD.ORG Sun Aug 21 08:50:23 2011 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90AFC106566C; Sun, 21 Aug 2011 08:50:23 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id E4AD58FC08; Sun, 21 Aug 2011 08:50:22 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p7L8Oa92016649 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 21 Aug 2011 11:24:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p7L8OaJZ039838; Sun, 21 Aug 2011 11:24:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p7L8OawK039837; Sun, 21 Aug 2011 11:24:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 21 Aug 2011 11:24:36 +0300 From: Kostik Belousov To: Ask Bj?rn Hansen Message-ID: <20110821082436.GD17489@deviant.kiev.zoral.com.ua> References: <4E4AB3BE.4090603@sentex.net> <9255C71C-BB78-417E-A900-85140FC2050C@develooper.com> <20110817002911.GA7614@michelle.cdnetworks.com> <865C098E-2A24-481B-9B97-2E426AE481CB@develooper.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HdLezCswwuDmNOis" Content-Disposition: inline In-Reply-To: <865C098E-2A24-481B-9B97-2E426AE481CB@develooper.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: embedded@freebsd.org, net@freebsd.org Subject: Re: Hang with ZERO_COPY_SOCKETS or TCP_SIGNATURE enabled? (was: system locks up with vr driver on alix board) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Aug 2011 08:50:23 -0000 --HdLezCswwuDmNOis Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 20, 2011 at 04:58:59PM -0700, Ask Bj?rn Hansen wrote: >=20 > On Aug 17, 2011, at 7:52, Ask Bj?rn Hansen wrote: >=20 > > Grasping at straws here, but when enabling BREAK_TO_DEBUGGER I noticed = that the kernel had ZERO_COPY_SOCKETS and TCP_SIGNATURE enabled. I disable= d those, "just in case". >=20 > Hi everyone, >=20 > Thanks again for your help and hints getting this fixed for me. >=20 > I just wanted to send an update that those kernel options seemed to be th= e ticket to make it stable again. I haven't had it hang since disabling IP= SEC, ZERO_COPY_SOCKETS and TCP_SIGNATURE (I wasn't using md5 signatures, ha= ving any ipsec sessions or to my knowledge running any applications that'd = be using zero copy sockets). ZERO_COPY_SOCKETS are known to be broken. --HdLezCswwuDmNOis Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk5QwMIACgkQC3+MBN1Mb4ii8QCg6lJZe+71tOugiSKEAsiVcLSk tygAoO82WrsQ4IkzbYsLt717RGF7/Pe1 =dNdC -----END PGP SIGNATURE----- --HdLezCswwuDmNOis-- From owner-freebsd-net@FreeBSD.ORG Sun Aug 21 19:46:41 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 748AF106566C for ; Sun, 21 Aug 2011 19:46:41 +0000 (UTC) (envelope-from dave@dogwood.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 2AA8C8FC0C for ; Sun, 21 Aug 2011 19:46:40 +0000 (UTC) Received: by qyk4 with SMTP id 4so1177846qyk.13 for ; Sun, 21 Aug 2011 12:46:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dogwood.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=+Q3xA32zkJk8zlD/+lFKcjC52AkIytd8m2Qv1AtqRzM=; b=lpWsd+mVF9mVDometDIWOo46Zn6kITgqHlXI4yR3bmGrbkKdShelv71tV2cZV0HSzW Jix/c9Y9n3IBTJEGgkMkC78L/JDbhFLteUyaMg0MHU6rKTyNFsd53E+MJv+5hVA/su1A My3XSDYK8W3zKzqESnUZgkN/qVwLtq30K2ivg= MIME-Version: 1.0 Received: by 10.229.13.130 with SMTP id c2mr834888qca.259.1313954667506; Sun, 21 Aug 2011 12:24:27 -0700 (PDT) Received: by 10.229.18.143 with HTTP; Sun, 21 Aug 2011 12:24:27 -0700 (PDT) In-Reply-To: References: Date: Sun, 21 Aug 2011 09:24:27 -1000 Message-ID: From: David Cornejo To: h bagade Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org Subject: Re: problem with setting nat using pf X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Aug 2011 19:46:41 -0000 On Sat, Aug 20, 2011 at 9:47 PM, h bagade wrote: > Hi all, > > I am trying to use pf nat rules with pool support on FreeBsd 8.0, working > together with ipfw as the main firewall. According to the natting concepts > i > faced in manuals and docs, nat concept is to map the source address to the > natted address when sending the packets from that source and then map the > destination address of the related reply packets. > > but when I define pf nat rules with a pool of IP addresses not available on > the outside interface ip addresses, the outgoing traffic is natted to one > of > the pool addresses but the response is not received via that interface so > the pf can map the destination address to the real one. here is one of my > configs i used during my tests: > > *configurations:* > *pf.conf:* > nat on eth1 from { 11.11.11.0/24} to any -> > {172.16.10.1,172.16.10.2,172. > > 16.10.3,172.16.10.4,172.16.10.5,172.16.10.6,172.16.10.7,172.16.10.8,172.16.10.9,172.16.10.10} > > main system configurations: > eth0: 11.11.11.1 > eth1: 172.16.10.64 > > system A: directly connected to eth0- 11.11.11.11 > system B: directly connected to eth1- 172.16.10.65 > > in this configs the dafult route of system A and system B are the middle > systems connected ip address. > > as mentioned, when systemA pings systemB, the ping requests are natted to > 172.16.10.1 and received at systemB but systemB doesn't send icmp replies > because it doesn't know to whom it should send the replies (no answer to > system B 's ARP requests about who has the natted IP). > > now my question is, isn't it the pf nat responsibilty to manage this > condition and send the ARP replies to SystemB? > or, are my configs wrong? > or i misunderstood the nat concepts? > > any ideas or helps are really appreciated as i have to set this nat on my > main system, asap. > Thanks in advance. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > ARP is not handled by pf. You need to get the interface to respond to that IP address by creating an alias for the address using ifconfig - if you need more help please post your rc.conf From owner-freebsd-net@FreeBSD.ORG Mon Aug 22 00:10:31 2011 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B5B9106566B; Mon, 22 Aug 2011 00:10:31 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7C8A38FC12; Mon, 22 Aug 2011 00:10:31 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p7M0AV4F054582; Mon, 22 Aug 2011 00:10:31 GMT (envelope-from yongari@freefall.freebsd.org) Received: (from yongari@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p7M0AV3I054542; Mon, 22 Aug 2011 00:10:31 GMT (envelope-from yongari) Date: Mon, 22 Aug 2011 00:10:31 GMT Message-Id: <201108220010.p7M0AV3I054542@freefall.freebsd.org> To: vadval15@gmail.com, yongari@FreeBSD.org, freebsd-net@FreeBSD.org, yongari@FreeBSD.org From: yongari@FreeBSD.org Cc: Subject: Re: kern/159936: [request] add support for ALI PCI fast ethernet controllers X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2011 00:10:31 -0000 Synopsis: [request] add support for ALI PCI fast ethernet controllers State-Changed-From-To: open->feedback State-Changed-By: yongari State-Changed-When: Mon Aug 22 00:07:49 UTC 2011 State-Changed-Why: The controller looks like a tulip clone but it seems it's somewhat difficult to add it to dc(4) and may require a new driver for that. I'm willing to write a driver for this controller if I can access to this controller. It seems it's not easy to buy a stand-alone controller in market so can you guys donate the controller for me to write a driver? Responsible-Changed-From-To: freebsd-net->yongari Responsible-Changed-By: yongari Responsible-Changed-When: Mon Aug 22 00:07:49 UTC 2011 Responsible-Changed-Why: Grab. http://www.freebsd.org/cgi/query-pr.cgi?pr=159936 From owner-freebsd-net@FreeBSD.ORG Mon Aug 22 02:17:31 2011 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66724106566C; Mon, 22 Aug 2011 02:17:31 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3EE958FC0C; Mon, 22 Aug 2011 02:17:31 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p7M2HVEQ072599; Mon, 22 Aug 2011 02:17:31 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p7M2HVcX072595; Mon, 22 Aug 2011 02:17:31 GMT (envelope-from linimon) Date: Mon, 22 Aug 2011 02:17:31 GMT Message-Id: <201108220217.p7M2HVcX072595@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-i386@FreeBSD.org, freebsd-net@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/159817: [udp] write UDPv4: No buffer space available (code=55) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2011 02:17:31 -0000 Old Synopsis: write UDPv4: No buffer space available (code=55) New Synopsis: [udp] write UDPv4: No buffer space available (code=55) Responsible-Changed-From-To: freebsd-i386->freebsd-net Responsible-Changed-By: linimon Responsible-Changed-When: Mon Aug 22 02:16:29 UTC 2011 Responsible-Changed-Why: reclassify. http://www.freebsd.org/cgi/query-pr.cgi?pr=159817 From owner-freebsd-net@FreeBSD.ORG Mon Aug 22 08:29:14 2011 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34DC3106566C for ; Mon, 22 Aug 2011 08:29:14 +0000 (UTC) (envelope-from herman@cleverbridge.com) Received: from mail.cleverbridge.com (mail.cleverbridge.com [89.1.11.32]) by mx1.freebsd.org (Postfix) with ESMTP id E75458FC13 for ; Mon, 22 Aug 2011 08:29:13 +0000 (UTC) Received: from [10.0.38.109] (whistler.cgn.cleverbridge.com [10.0.38.109]) by mail.cleverbridge.com (Postfix) with ESMTP id 41B719C566B; Mon, 22 Aug 2011 10:12:04 +0200 (CEST) Message-ID: <4E520F54.3090904@cleverbridge.com> Date: Mon, 22 Aug 2011 10:12:04 +0200 From: Paul Herman User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: =?windows-1252?Q?Ask_Bj=F8rn_Hansen?= References: <201108190830.p7J8UJPW041136@freefall.freebsd.org> <70CAC026-8187-4080-8FAE-B9A494F8D4E5@develooper.com> In-Reply-To: <70CAC026-8187-4080-8FAE-B9A494F8D4E5@develooper.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-net@FreeBSD.org, Paul Herman Subject: Re: kern/127050: [carp] ipv6 does not work on carp interfaces [regression] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2011 08:29:14 -0000 On 8/21/2011 1:47 AM, Ask Bjørn Hansen wrote: > > On Aug 19, 2011, at 1:30, Paul Herman wrote: > >> --------------010305010708060807000808 >> Content-Type: application/gzip; >> name="carp_ip6_alias.patch.gz" >> Content-Transfer-Encoding: base64 >> Content-Disposition: attachment; >> filename="carp_ip6_alias.patch.gz" > > I wanted to try it, but gzip doesn't seem to like that file … > > (downloaded from http://www.freebsd.org/cgi/query-pr.cgi?pr=127050&cat= ) It's base64 encoded of course -- works for me when I pipe the text into openssl base64 -d | zcat (zipped to preserve white spacing) For those craving instant satisfaction, here it is in plain text. -Paul. --- sys/netinet/ip_carp.c.orig 2011-08-19 07:52:56.000000000 +0000 +++ sys/netinet/ip_carp.c 2011-08-19 07:15:03.000000000 +0000 @@ -1670,9 +1670,11 @@ struct carp_if *cif; struct in6_ifaddr *ia, *ia_if; struct ip6_moptions *im6o = &sc->sc_im6o; + struct in6_multi *in6m; struct in6_addr in6; int own, error; + error = 0; if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { @@ -1729,8 +1731,6 @@ } if (!sc->sc_naddrs6) { - struct in6_multi *in6m; - im6o->im6o_multicast_ifp = ifp; /* join CARP multicast address */ @@ -1745,24 +1745,24 @@ goto cleanup; im6o->im6o_membership[0] = in6m; im6o->im6o_num_memberships++; - - /* join solicited multicast address */ - bzero(&in6, sizeof(in6)); - in6.s6_addr16[0] = htons(0xff02); - in6.s6_addr32[1] = 0; - in6.s6_addr32[2] = htonl(1); - in6.s6_addr32[3] = sin6->sin6_addr.s6_addr32[3]; - in6.s6_addr8[12] = 0xff; - if (in6_setscope(&in6, ifp, NULL) != 0) - goto cleanup; - in6m = NULL; - error = in6_mc_join(ifp, &in6, NULL, &in6m, 0); - if (error) - goto cleanup; - im6o->im6o_membership[1] = in6m; - im6o->im6o_num_memberships++; } + /* join solicited multicast address */ + bzero(&in6, sizeof(in6)); + in6.s6_addr16[0] = htons(0xff02); + in6.s6_addr32[1] = 0; + in6.s6_addr32[2] = htonl(1); + in6.s6_addr32[3] = sin6->sin6_addr.s6_addr32[3]; + in6.s6_addr8[12] = 0xff; + if (in6_setscope(&in6, ifp, NULL) != 0) + goto cleanup; + in6m = NULL; + error = in6_mc_join(ifp, &in6, NULL, &in6m, 0); + if (error) + goto cleanup; + im6o->im6o_membership[1] = in6m; + im6o->im6o_num_memberships++; + if (!ifp->if_carp) { cif = malloc(sizeof(*cif), M_CARP, M_WAITOK|M_ZERO); From owner-freebsd-net@FreeBSD.ORG Mon Aug 22 11:07:07 2011 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33F4A1065695 for ; Mon, 22 Aug 2011 11:07:07 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 21CC48FC23 for ; Mon, 22 Aug 2011 11:07:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p7MB772v097207 for ; Mon, 22 Aug 2011 11:07:07 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p7MB76nN097205 for freebsd-net@FreeBSD.org; Mon, 22 Aug 2011 11:07:06 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 22 Aug 2011 11:07:06 GMT Message-Id: <201108221107.p7MB76nN097205@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-net@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-net@FreeBSD.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2011 11:07:07 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/159817 net [udp] write UDPv4: No buffer space available (code=55) o kern/159795 net [tcp] excessive duplicate ACKs and TCP session freezes o kern/159629 net [ipsec] [panic] kernel panic with IPsec in transport m o kern/159621 net [tcp] [panic] panic: soabort: so_count o kern/159603 net [netinet] [patch] in_ifscrubprefix() - network route c o kern/159602 net [netinet] [patch] arp_ifscrub() is called even if IFF_ o kern/159601 net [netinet] [patch] in_scrubprefix() - loopback route re o kern/159353 net [netinet] [patch] conditional call of ifa_del_loopback o kern/159294 net [em] em watchdog timeouts o kern/159203 net [wpi] Intel 3945ABG Wireless LAN not support IBSS o kern/158930 net [bpf] BPF element leak in ifp->bpf_if->bif_dlist o kern/158726 net [ip6] [patch] ICMPv6 Router Announcement flooding limi o kern/158694 net [ix] [lagg] ix0 is not working within lagg(4) o kern/158665 net [ip6] [panic] kernel pagefault in in6_setscope() o kern/158635 net [em] TSO breaks BPF packet captures with em driver f kern/158426 net [e1000] [panic] _mtx_lock_sleep: recursed on non-recur o kern/158156 net [bce] bce driver shows "no carrier" on IBM blade (HS22 f kern/157802 net [dummynet] [panic] kernel panic in dummynet o kern/157785 net amd64 + jail + ipfw + natd = very slow outbound traffi o kern/157429 net [re] Realtek RTL8169 doesn't work with re(4) o kern/157418 net [em] em driver lockup during boot on Supermicro X9SCM- o kern/157410 net [ip6] IPv6 Router Advertisements Cause Excessive CPU U o kern/157287 net [re] [panic] INVARIANTS panic (Memory modified after f o kern/157209 net [ip6] [patch] locking error in rip6_input() (sys/netin o kern/157200 net [network.subr] [patch] stf(4) can not communicate betw o kern/157182 net [lagg] lagg interface not working together with epair o kern/156877 net [dummynet] [panic] dummynet move_pkt() null ptr derefe o kern/156667 net [em] em0 fails to init on CURRENT after March 17 o kern/156408 net [vlan] Routing failure when using VLANs vs. Physical e o kern/156328 net [icmp]: host can ping other subnet but no have IP from o kern/156317 net [ip6] Wrong order of IPv6 NS DAD/MLD Report o kern/156283 net [ip6] [patch] nd6_ns_input - rtalloc_mpath does not re o kern/156279 net [if_bridge][divert][ipfw] unable to correctly re-injec o kern/156226 net [lagg]: failover does not announce the failover to swi o kern/156030 net [ip6] [panic] Crash in nd6_dad_start() due to null ptr o kern/155772 net ifconfig(8): ioctl (SIOCAIFADDR): File exists on direc o kern/155680 net [multicast] problems with multicast s kern/155642 net [request] Add driver for Realtek RTL8191SE/RTL8192SE W o kern/155604 net [flowtable] Flowtable excessively caches dest MAC addr o kern/155597 net [panic] Kernel panics with "sbdrop" message o kern/155585 net [tcp] [panic] tcp_output tcp_mtudisc loop until kernel o kern/155420 net [vlan] adding vlan break existent vlan o bin/155365 net [patch] routed(8): if.c in routed fails to compile if o kern/155177 net [route] [panic] Panic when inject routes in kernel o kern/155030 net [igb] igb(4) DEVICE_POLLING does not work with carp(4) o kern/155010 net [msk] ntfs-3g via iscsi using msk driver cause kernel o kern/155004 net [bce] [panic] kernel panic in bce0 driver o kern/154943 net [gif] ifconfig gifX create on existing gifX clears IP s kern/154851 net [request]: Port brcm80211 driver from Linux to FreeBSD o kern/154850 net [netgraph] [patch] ng_ether fails to name nodes when t o kern/154679 net [em] Fatal trap 12: "em1 taskq" only at startup (8.1-R o kern/154600 net [tcp] [panic] Random kernel panics on tcp_output o kern/154557 net [tcp] Freeze tcp-session of the clients, if in the gat o kern/154443 net [if_bridge] Kernel module bridgestp.ko missing after u o kern/154286 net [netgraph] [panic] 8.2-PRERELEASE panic in netgraph o kern/154255 net [nfs] NFS not responding o kern/154214 net [stf] [panic] Panic when creating stf interface o kern/154185 net race condition in mb_dupcl o kern/154169 net [multicast] [ip6] Node Information Query multicast add o kern/154134 net [ip6] stuck kernel state in LISTEN on ipv6 daemon whic o kern/154091 net [netgraph] [panic] netgraph, unaligned mbuf? o conf/154062 net [vlan] [patch] change to way of auto-generatation of v o kern/153937 net [ral] ralink panics the system (amd64 freeBSDD 8.X) wh o kern/153936 net [ixgbe] [patch] MPRC workaround incorrectly applied to o kern/153816 net [ixgbe] ixgbe doesn't work properly with the Intel 10g o kern/153772 net [ixgbe] [patch] sysctls reference wrong XON/XOFF varia o kern/153497 net [netgraph] netgraph panic due to race conditions o kern/153454 net [patch] [wlan] [urtw] Support ad-hoc and hostap modes o kern/153308 net [em] em interface use 100% cpu o kern/153244 net [em] em(4) fails to send UDP to port 0xffff o kern/152893 net [netgraph] [panic] 8.2-PRERELEASE panic in netgraph o kern/152853 net [em] tftpd (and likely other udp traffic) fails over e o kern/152828 net [em] poor performance on 8.1, 8.2-PRE o kern/152569 net [net]: Multiple ppp connections and routing table prob o kern/152235 net [arp] Permanent local ARP entries are not properly upd o kern/152141 net [vlan] [patch] encapsulate vlan in ng_ether before out o kern/152036 net [libc] getifaddrs(3) returns truncated sockaddrs for n o kern/151690 net [ep] network connectivity won't work until dhclient is o kern/151681 net [nfs] NFS mount via IPv6 leads to hang on client with o kern/151593 net [igb] [panic] Kernel panic when bringing up igb networ o kern/150920 net [ixgbe][igb] Panic when packets are dropped with heade o kern/150557 net [igb] igb0: Watchdog timeout -- resetting o kern/150251 net [patch] [ixgbe] Late cable insertion broken o kern/150249 net [ixgbe] Media type detection broken o bin/150224 net ppp(8) does not reassign static IP after kill -KILL co f kern/149969 net [wlan] [ral] ralink rt2661 fails to maintain connectio o kern/149937 net [ipfilter] [patch] kernel panic in ipfilter IP fragmen o kern/149643 net [rum] device not sending proper beacon frames in ap mo o kern/149609 net [panic] reboot after adding second default route o kern/149117 net [inet] [patch] in_pcbbind: redundant test o kern/149086 net [multicast] Generic multicast join failure in 8.1 o kern/148018 net [flowtable] flowtable crashes on ia64 o kern/147912 net [boot] FreeBSD 8 Beta won't boot on Thinkpad i1300 11 o kern/147894 net [ipsec] IPv6-in-IPv4 does not work inside an ESP-only o kern/147155 net [ip6] setfb not work with ipv6 o kern/146845 net [libc] close(2) returns error 54 (connection reset by f kern/146792 net [flowtable] flowcleaner 100% cpu's core load o kern/146719 net [pf] [panic] PF or dumynet kernel panic o kern/146534 net [icmp6] wrong source address in echo reply o kern/146427 net [mwl] Additional virtual access points don't work on m o kern/146426 net [mwl] 802.11n rates not possible on mwl o kern/146425 net [mwl] mwl dropping all packets during and after high u f kern/146394 net [vlan] IP source address for outgoing connections o bin/146377 net [ppp] [tun] Interface doesn't clear addresses when PPP o kern/146358 net [vlan] wrong destination MAC address o kern/146165 net [wlan] [panic] Setting bssid in adhoc mode causes pani o kern/146082 net [ng_l2tp] a false invaliant check was performed in ng_ o kern/146037 net [panic] mpd + CoA = kernel panic o bin/145934 net [patch] add count option to netstat(1) o kern/145825 net [panic] panic: soabort: so_count o kern/145728 net [lagg] Stops working lagg between two servers. f kern/144917 net [flowtable] [panic] flowtable crashes system [regressi o kern/144882 net MacBookPro =>4.1 does not connect to BSD in hostap wit o kern/144874 net [if_bridge] [patch] if_bridge frees mbuf after pfil ho o conf/144700 net [rc.d] async dhclient breaks stuff for too many people o kern/144616 net [nat] [panic] ip_nat panic FreeBSD 7.2 o kern/144572 net [carp] CARP preemption mode traffic partially goes to f kern/144315 net [ipfw] [panic] freebsd 8-stable reboot after add ipfw o kern/144231 net bind/connect/sendto too strict about sockaddr length o kern/143846 net [gif] bringing gif3 tunnel down causes gif0 tunnel to s kern/143673 net [stf] [request] there should be a way to support multi s kern/143666 net [ip6] [request] PMTU black hole detection not implemen o kern/143622 net [pfil] [patch] unlock pfil lock while calling firewall o kern/143593 net [ipsec] When using IPSec, tcpdump doesn't show outgoin o kern/143591 net [ral] RT2561C-based DLink card (DWL-510) fails to work o kern/143208 net [ipsec] [gif] IPSec over gif interface not working o kern/143034 net [panic] system reboots itself in tcp code [regression] o kern/142877 net [hang] network-related repeatable 8.0-STABLE hard hang o kern/142774 net Problem with outgoing connections on interface with mu o kern/142772 net [libc] lla_lookup: new lle malloc failed o kern/142018 net [iwi] [patch] Possibly wrong interpretation of beacon- o kern/141861 net [wi] data garbled with WEP and wi(4) with Prism 2.5 f kern/141741 net Etherlink III NIC won't work after upgrade to FBSD 8, o kern/141023 net [carp] CARP arp replays with wrong src mac o kern/140742 net rum(4) Two asus-WL167G adapters cannot talk to each ot o kern/140682 net [netgraph] [panic] random panic in netgraph o kern/140634 net [vlan] destroying if_lagg interface with if_vlan membe o kern/140619 net [ifnet] [patch] refine obsolete if_var.h comments desc o kern/140346 net [wlan] High bandwidth use causes loss of wlan connecti o kern/140142 net [ip6] [panic] FreeBSD 7.2-amd64 panic w/IPv6 o kern/140066 net [bwi] install report for 8.0 RC 2 (multiple problems) o kern/139565 net [ipfilter] ipfilter ioctl SIOCDELST broken o kern/139387 net [ipsec] Wrong lenth of PF_KEY messages in promiscuous o bin/139346 net [patch] arp(8) add option to remove static entries lis o kern/139268 net [if_bridge] [patch] allow if_bridge to forward just VL p kern/139204 net [arp] DHCP server replies rejected, ARP entry lost bef o kern/139117 net [lagg] + wlan boot timing (EBUSY) o kern/139058 net [ipfilter] mbuf cluster leak on FreeBSD 7.2 o kern/138850 net [dummynet] dummynet doesn't work correctly on a bridge o kern/138782 net [panic] sbflush_internal: cc 0 || mb 0xffffff004127b00 o kern/138688 net [rum] possibly broken on 8 Beta 4 amd64: able to wpa a o kern/138678 net [lo] FreeBSD does not assign linklocal address to loop o kern/138620 net [lagg] [patch] lagg port bpf-writes blocked o kern/138407 net [gre] gre(4) interface does not come up after reboot o kern/138332 net [tun] [lor] ifconfig tun0 destroy causes LOR if_adata/ o kern/138266 net [panic] kernel panic when udp benchmark test used as r o kern/138177 net [ipfilter] FreeBSD crashing repeatedly in ip_nat.c:257 f kern/138029 net [bpf] [panic] periodically kernel panic and reboot o kern/137881 net [netgraph] [panic] ng_pppoe fatal trap 12 p bin/137841 net [patch] wpa_supplicant(8) cannot verify SHA256 signed p kern/137776 net [rum] panic in rum(4) driver on 8.0-BETA2 o bin/137641 net ifconfig(8): various problems with "vlan_device.vlan_i o kern/137392 net [ip] [panic] crash in ip_nat.c line 2577 o kern/137372 net [ral] FreeBSD doesn't support wireless interface from o kern/137089 net [lagg] lagg falsely triggers IPv6 duplicate address de o bin/136994 net [patch] ifconfig(8) print carp mac address o kern/136911 net [netgraph] [panic] system panic on kldload ng_bpf.ko t o bin/136661 net [patch] ndp(8) ignores -f option o kern/136618 net [pf][stf] panic on cloning interface without unit numb o kern/136426 net [panic] spawning several dhclients in parallel panics o kern/135502 net [periodic] Warning message raised by rtfree function i o kern/134583 net [hang] Machine with jail freezes after random amount o o kern/134531 net [route] [panic] kernel crash related to routes/zebra o kern/134157 net [dummynet] dummynet loads cpu for 100% and make a syst o kern/133969 net [dummynet] [panic] Fatal trap 12: page fault while in o kern/133968 net [dummynet] [panic] dummynet kernel panic o kern/133736 net [udp] ip_id not protected ... o kern/133595 net [panic] Kernel Panic at pcpu.h:195 o kern/133572 net [ppp] [hang] incoming PPTP connection hangs the system o kern/133490 net [bpf] [panic] 'kmem_map too small' panic on Dell r900 o kern/133235 net [netinet] [patch] Process SIOCDLIFADDR command incorre o kern/133218 net [carp] [hang] use of carp(4) causes system to freeze f kern/133213 net arp and sshd errors on 7.1-PRERELEASE o kern/133060 net [ipsec] [pfsync] [panic] Kernel panic with ipsec + pfs o kern/132889 net [ndis] [panic] NDIS kernel crash on load BCM4321 AGN d o conf/132851 net [patch] rc.conf(5): allow to setfib(1) for service run o kern/132734 net [ifmib] [panic] panic in net/if_mib.c o kern/132705 net [libwrap] [patch] libwrap - infinite loop if hosts.all o kern/132672 net [ndis] [panic] ndis with rt2860.sys causes kernel pani o kern/132554 net [ipl] There is no ippool start script/ipfilter magic t o kern/132354 net [nat] Getting some packages to ipnat(8) causes crash o kern/132285 net [carp] alias gives incorrect hash in dmesg o kern/132277 net [crypto] [ipsec] poor performance using cryptodevice f o kern/132107 net [carp] carp(4) advskew setting ignored when carp IP us o kern/131781 net [ndis] ndis keeps dropping the link o kern/131776 net [wi] driver fails to init o kern/131753 net [altq] [panic] kernel panic in hfsc_dequeue o kern/131601 net [ipfilter] [panic] 7-STABLE panic in nat_finalise (tcp o bin/131567 net [socket] [patch] Update for regression/sockets/unix_cm o bin/131365 net route(8): route add changes interpretation of network f kern/130820 net [ndis] wpa_supplicant(8) returns 'no space on device' o kern/130628 net [nfs] NFS / rpc.lockd deadlock on 7.1-R o conf/130555 net [rc.d] [patch] No good way to set ipfilter variables a o kern/130525 net [ndis] [panic] 64 bit ar5008 ndisgen-erated driver cau o kern/130311 net [wlan_xauth] [panic] hostapd restart causing kernel pa o kern/130109 net [ipfw] Can not set fib for packets originated from loc f kern/130059 net [panic] Leaking 50k mbufs/hour f kern/129719 net [nfs] [panic] Panic during shutdown, tcp_ctloutput: in o kern/129517 net [ipsec] [panic] double fault / stack overflow o kern/129508 net [carp] [panic] Kernel panic with EtherIP (may be relat o kern/129219 net [ppp] Kernel panic when using kernel mode ppp o kern/129197 net [panic] 7.0 IP stack related panic o bin/128954 net ifconfig(8) deletes valid routes o bin/128602 net [an] wpa_supplicant(8) crashes with an(4) o kern/128448 net [nfs] 6.4-RC1 Boot Fails if NFS Hostname cannot be res o bin/128295 net [patch] ifconfig(8) does not print TOE4 or TOE6 capabi o bin/128001 net wpa_supplicant(8), wlan(4), and wi(4) issues o kern/127826 net [iwi] iwi0 driver has reduced performance and connecti o kern/127815 net [gif] [patch] if_gif does not set vlan attributes from o kern/127724 net [rtalloc] rtfree: 0xc5a8f870 has 1 refs f bin/127719 net [arp] arp: Segmentation fault (core dumped) f kern/127528 net [icmp]: icmp socket receives icmp replies not owned by p kern/127360 net [socket] TOE socket options missing from sosetopt() o bin/127192 net routed(8) removes the secondary alias IP of interface f kern/127145 net [wi]: prism (wi) driver crash at bigger traffic o kern/127050 net [carp] ipv6 does not work on carp interfaces [regressi o kern/126945 net [carp] CARP interface destruction with ifconfig destro o kern/126895 net [patch] [ral] Add antenna selection (marked as TBD) o kern/126874 net [vlan]: Zebra problem if ifconfig vlanX destroy o kern/126714 net [carp] CARP interface renaming makes system no longer o kern/126695 net rtfree messages and network disruption upon use of if_ o kern/126339 net [ipw] ipw driver drops the connection o kern/126075 net [inet] [patch] internet control accesses beyond end of o bin/125922 net [patch] Deadlock in arp(8) o kern/125920 net [arp] Kernel Routing Table loses Ethernet Link status o kern/125845 net [netinet] [patch] tcp_lro_rx() should make use of hard o kern/125816 net [carp] [if_bridge] carp stuck in init when using bridg f kern/125442 net [carp] [lagg] CARP combined with LAGG causes system pa o kern/125258 net [socket] socket's SO_REUSEADDR option does not work o kern/125239 net [gre] kernel crash when using gre o kern/124341 net [ral] promiscuous mode for wireless device ral0 looses o kern/124225 net [ndis] [patch] ndis network driver sometimes loses net o kern/124160 net [libc] connect(2) function loops indefinitely o kern/124021 net [ip6] [panic] page fault in nd6_output() o kern/123968 net [rum] [panic] rum driver causes kernel panic with WPA. o kern/123892 net [tap] [patch] No buffer space available o kern/123890 net [ppp] [panic] crash & reboot on work with PPP low-spee o kern/123858 net [stf] [patch] stf not usable behind a NAT o kern/123796 net [ipf] FreeBSD 6.1+VPN+ipnat+ipf: port mapping does not o kern/123758 net [panic] panic while restarting net/freenet6 o bin/123633 net ifconfig(8) doesn't set inet and ether address in one o kern/123559 net [iwi] iwi periodically disassociates/associates [regre o bin/123465 net [ip6] route(8): route add -inet6 -interfac o kern/123463 net [ipsec] [panic] repeatable crash related to ipsec-tool o conf/123330 net [nsswitch.conf] Enabling samba wins in nsswitch.conf c o kern/123160 net [ip] Panic and reboot at sysctl kern.polling.enable=0 f kern/123045 net [ng_mppc] ng_mppc_decompress - disabling node o kern/122989 net [swi] [panic] 6.3 kernel panic in swi1: net o kern/122954 net [lagg] IPv6 EUI64 incorrectly chosen for lagg devices f kern/122780 net [lagg] tcpdump on lagg interface during high pps wedge o kern/122685 net It is not visible passing packets in tcpdump(1) o kern/122319 net [wi] imposible to enable ad-hoc demo mode with Orinoco o kern/122290 net [netgraph] [panic] Netgraph related "kmem_map too smal o kern/122033 net [ral] [lor] Lock order reversal in ral0 at bootup ieee o bin/121895 net [patch] rtsol(8)/rtsold(8) doesn't handle managed netw s kern/121774 net [swi] [panic] 6.3 kernel panic in swi1: net o kern/121555 net [panic] Fatal trap 12: current process = 12 (swi1: net o kern/121443 net [gif] [lor] icmp6_input/nd6_lookup o kern/121437 net [vlan] Routing to layer-2 address does not work on VLA o bin/121359 net [patch] [security] ppp(8): fix local stack overflow in o kern/121257 net [tcp] TSO + natd -> slow outgoing tcp traffic o kern/121181 net [panic] Fatal trap 3: breakpoint instruction fault whi o kern/120966 net [rum] kernel panic with if_rum and WPA encryption o kern/120566 net [request]: ifconfig(8) make order of arguments more fr o kern/120304 net [netgraph] [patch] netgraph source assumes 32-bit time o kern/120266 net [udp] [panic] gnugk causes kernel panic when closing U o kern/120130 net [carp] [panic] carp causes kernel panics in any conste o bin/120060 net routed(8) deletes link-level routes in the presence of o kern/119945 net [rum] [panic] rum device in hostap mode, cause kernel o kern/119791 net [nfs] UDP NFS mount of aliased IP addresses from a Sol o kern/119617 net [nfs] nfs error on wpa network when reseting/shutdown f kern/119516 net [ip6] [panic] _mtx_lock_sleep: recursed on non-recursi o kern/119432 net [arp] route add -host -iface causes arp e o kern/119225 net [wi] 7.0-RC1 no carrier with Prism 2.5 wifi card [regr o kern/118727 net [netgraph] [patch] [request] add new ng_pf module o kern/117448 net [carp] 6.2 kernel crash [regression] o kern/117423 net [vlan] Duplicate IP on different interfaces o bin/117339 net [patch] route(8): loading routing management commands o kern/117271 net [tap] OpenVPN TAP uses 99% CPU on releng_6 when if_tap o bin/116643 net [patch] [request] fstat(1): add INET/INET6 socket deta o kern/116185 net [iwi] if_iwi driver leads system to reboot o kern/115239 net [ipnat] panic with 'kmem_map too small' using ipnat o kern/115019 net [netgraph] ng_ether upper hook packet flow stops on ad o kern/115002 net [wi] if_wi timeout. failed allocation (busy bit). ifco o kern/114915 net [patch] [pcn] pcn (sys/pci/if_pcn.c) ethernet driver f o kern/113432 net [ucom] WARNING: attempt to net_add_domain(netgraph) af o kern/112722 net [ipsec] [udp] IP v4 udp fragmented packet reject o kern/112686 net [patm] patm driver freezes System (FreeBSD 6.2-p4) i38 o bin/112557 net [patch] ppp(8) lock file should not use symlink name o kern/112528 net [nfs] NFS over TCP under load hangs with "impossible p o kern/111537 net [inet6] [patch] ip6_input() treats mbuf cluster wrong o kern/111457 net [ral] ral(4) freeze o kern/110284 net [if_ethersubr] Invalid Assumption in SIOCSIFADDR in et o kern/110249 net [kernel] [regression] [patch] setsockopt() error regre o kern/109470 net [wi] Orinoco Classic Gold PC Card Can't Channel Hop o bin/108895 net pppd(8): PPPoE dead connections on 6.2 [regression] o kern/107944 net [wi] [patch] Forget to unlock mutex-locks o conf/107035 net [patch] bridge(8): bridge interface given in rc.conf n o kern/106444 net [netgraph] [panic] Kernel Panic on Binding to an ip to o kern/106438 net [ipf] ipfilter: keep state does not seem to allow repl o kern/106316 net [dummynet] dummynet with multipass ipfw drops packets o kern/105945 net Address can disappear from network interface s kern/105943 net Network stack may modify read-only mbuf chain copies o bin/105925 net problems with ifconfig(8) and vlan(4) [regression] o kern/104851 net [inet6] [patch] On link routes not configured when usi o kern/104751 net [netgraph] kernel panic, when getting info about my tr o kern/103191 net Unpredictable reboot o kern/103135 net [ipsec] ipsec with ipfw divert (not NAT) encodes a pac o kern/102540 net [netgraph] [patch] supporting vlan(4) by ng_fec(4) o conf/102502 net [netgraph] [patch] ifconfig name does't rename netgrap o kern/102035 net [plip] plip networking disables parallel port printing o kern/101948 net [ipf] [panic] Kernel Panic Trap No 12 Page Fault - cau o kern/100709 net [libc] getaddrinfo(3) should return TTL info o kern/100519 net [netisr] suggestion to fix suboptimal network polling o kern/98978 net [ipf] [patch] ipfilter drops OOW packets under 6.1-Rel o kern/98597 net [inet6] Bug in FreeBSD 6.1 IPv6 link-local DAD procedu o bin/98218 net wpa_supplicant(8) blacklist not working o kern/97306 net [netgraph] NG_L2TP locks after connection with failed o conf/97014 net [gif] gifconfig_gif? in rc.conf does not recognize IPv f kern/96268 net [socket] TCP socket performance drops by 3000% if pack o kern/95519 net [ral] ral0 could not map mbuf o kern/95288 net [pppd] [tty] [panic] if_ppp panic in sys/kern/tty_subr o kern/95277 net [netinet] [patch] IP Encapsulation mask_match() return o kern/95267 net packet drops periodically appear f kern/93378 net [tcp] Slow data transfer in Postfix and Cyrus IMAP (wo o kern/93019 net [ppp] ppp and tunX problems: no traffic after restarti o kern/92880 net [libc] [patch] almost rewritten inet_network(3) functi s kern/92279 net [dc] Core faults everytime I reboot, possible NIC issu o kern/91859 net [ndis] if_ndis does not work with Asus WL-138 s kern/91777 net [ipf] [patch] wrong behaviour with skip rule inside an o kern/91364 net [ral] [wep] WF-511 RT2500 Card PCI and WEP o kern/91311 net [aue] aue interface hanging s kern/90086 net [hang] 5.4p8 on supermicro P8SCT hangs during boot if o kern/87521 net [ipf] [panic] using ipfilter "auth" keyword leads to k o kern/87421 net [netgraph] [panic]: ng_ether + ng_eiface + if_bridge s kern/86920 net [ndis] ifconfig: SIOCS80211: Invalid argument [regress o kern/86871 net [tcp] [patch] allocation logic for PCBs in TIME_WAIT s o kern/86427 net [lor] Deadlock with FASTIPSEC and nat o kern/86103 net [ipf] Illegal NAT Traversal in IPFilter o kern/85780 net 'panic: bogus refcnt 0' in routing/ipv6 o bin/85445 net ifconfig(8): deprecated keyword to ifconfig inoperativ p kern/85320 net [gre] [patch] possible depletion of kernel stack in ip o bin/82975 net route change does not parse classfull network as given o kern/82881 net [netgraph] [panic] ng_fec(4) causes kernel panic after o kern/82468 net Using 64MB tcp send/recv buffers, trafficflow stops, i o bin/82185 net [patch] ndp(8) can delete the incorrect entry o kern/81095 net IPsec connection stops working if associated network i o kern/79895 net [ipf] 5.4-RC2 breaks ipfilter NAT when using netgraph o kern/78968 net FreeBSD freezes on mbufs exhaustion (network interface o kern/78090 net [ipf] ipf filtering on bridged packets doesn't work if o kern/77341 net [ip6] problems with IPV6 implementation o kern/77273 net [ipf] ipfilter breaks ipv6 statefull filtering on 5.3 s kern/77195 net [ipf] [patch] ipfilter ioctl SIOCGNATL does not match o kern/75873 net Usability problem with non-RFC-compliant IP spoof prot s kern/75407 net [an] an(4): no carrier after short time a kern/71474 net [route] route lookup does not skip interfaces marked d o kern/71469 net default route to internet magically disappears with mu o kern/70904 net [ipf] ipfilter ipnat problem with h323 proxy support o kern/68889 net [panic] m_copym, length > size of mbuf chain o kern/66225 net [netgraph] [patch] extend ng_eiface(4) control message o kern/65616 net IPSEC can't detunnel GRE packets after real ESP encryp s kern/60293 net [patch] FreeBSD arp poison patch a kern/56233 net IPsec tunnel (ESP) over IPv6: MTU computation is wrong s bin/41647 net ifconfig(8) doesn't accept lladdr along with inet addr s kern/39937 net ipstealth issue a kern/38554 net [patch] changing interface ipaddress doesn't seem to w o kern/34665 net [ipf] [hang] ipfilter rcmd proxy "hangs". o kern/31940 net ip queue length too short for >500kpps o kern/31647 net [libc] socket calls can return undocumented EINVAL o kern/30186 net [libc] getaddrinfo(3) does not handle incorrect servna o kern/27474 net [ipf] [ppp] Interactive use of user PPP and ipfilter c f kern/24959 net [patch] proper TCP_NOPUSH/TCP_CORK compatibility o conf/23063 net [arp] [patch] for static ARP tables in rc.network o kern/21998 net [socket] [patch] ident only for outgoing connections o kern/5877 net [socket] sb_cc counts control data as well as data dat 385 problems total. From owner-freebsd-net@FreeBSD.ORG Mon Aug 22 11:08:47 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4744C1065693; Mon, 22 Aug 2011 11:08:47 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id E509F8FC15; Mon, 22 Aug 2011 11:08:46 +0000 (UTC) Received: by gxk28 with SMTP id 28so3904577gxk.13 for ; Mon, 22 Aug 2011 04:08:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=66lEGglPaxeZy9wMNytxAmQVR+EwO3CfiSZ7qbHWLTM=; b=oYWblFk84xZ/LpzHxEa5DP5KiSjSbotJORAZDti3H19Bflj0u3gAfu/96DTr9MFroE GhRWIupHZxKheM1X5r70JySv5o9rnoaLpzOedSkqPD7DnM5C3OUV0RyLUDORxxsTzKxb eLTB26fXXMu3ewqeFPmi7q/lu7XDLSEWOz19M= MIME-Version: 1.0 Received: by 10.150.14.3 with SMTP id 3mr2338959ybn.425.1314011326080; Mon, 22 Aug 2011 04:08:46 -0700 (PDT) Received: by 10.150.188.9 with HTTP; Mon, 22 Aug 2011 04:08:46 -0700 (PDT) In-Reply-To: References: Date: Mon, 22 Aug 2011 15:08:46 +0400 Message-ID: From: Sergey Kandaurov To: Tom Vijlbrief Content-Type: multipart/mixed; boundary=000e0cd762ae5266d904ab161afa Cc: FreeBSD Net , freebsd-current@freebsd.org Subject: Re: BETA1 IPv6 crash X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2011 11:08:47 -0000 --000e0cd762ae5266d904ab161afa Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 8 August 2011 22:06, Tom Vijlbrief wrote: > 2011/8/7 Sergey Kandaurov : >> On 7 August 2011 17:11, Tom Vijlbrief wrote: >>> I installed BETA1 in a fresh ubuntu 11.04 KVM virtual machine with the >>> new installer. >>> >>> Major issue I noticed was the missing /home. >>> >>> It took me quite some time to get IPv6 working in the guest (a Linux >>> configuration issue), but now that it works >>> BETA1 panics in about 50% of the boot attempts: >>> >>> testbsd dumped core - see /var/crash/vmcore.0 >>> >>> Sun Aug =A07 08:25:28 CEST 2011 >>> >>> FreeBSD testbsd 9.0-BETA1 FreeBSD 9.0-BETA1 #0: Thu Jul 28 16:34:16 >>> UTC 2011 =A0 =A0 root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENER= IC >>> i386 >>> >>> panic: _mtx_lock_sleep: recursed on non-recursive mutex if_addr_mtx @ >>> /usr/src/sys/netinet6/mld6.c:1676 >>> >>> GNU gdb 6.1.1 [FreeBSD] >>> Copyright 2004 Free Software Foundation, Inc. >>> GDB is free software, covered by the GNU General Public License, and yo= u are >>> welcome to change it and/or distribute copies of it under certain condi= tions. >>> Type "show copying" to see the conditions. >>> There is absolutely no warranty for GDB. =A0Type "show warranty" for de= tails. >>> This GDB was configured as "i386-marcel-freebsd"... >> [..] >>> panic: _mtx_lock_sleep: recursed on non-recursive mutex if_addr_mtx @ >>> /usr/src/sys/netinet6/mld6.c:1676 >>> >>> cpuid =3D 0 >>> KDB: enter: panic >>> Uptime: 28s >>> Physical memory: 491 MB >>> Dumping 45 MB: 30 14 >>> >>> #0 =A0doadump (textdump=3D1) at pcpu.h:244 >>> 244 =A0 =A0 pcpu.h: No such file or directory. >>> =A0 =A0 =A0 =A0in pcpu.h >>> (kgdb) #0 =A0doadump (textdump=3D1) at pcpu.h:244 >>> #1 =A00xc0a04965 in kern_reboot (howto=3D260) >>> =A0 =A0at /usr/src/sys/kern/kern_shutdown.c:430 >>> #2 =A00xc0a04291 in panic (fmt=3DVariable "fmt" is not available. >>> ) at /usr/src/sys/kern/kern_shutdown.c:595 >>> #3 =A00xc09f4a4a in _mtx_lock_sleep (m=3D0xc35f3a28, tid=3D3278693824, = opts=3D0, >>> =A0 =A0file=3D0xc0f1ab65 "/usr/src/sys/netinet6/mld6.c", line=3D1676) >>> =A0 =A0at /usr/src/sys/kern/kern_mutex.c:341 >>> #4 =A00xc09f4c67 in _mtx_lock_flags (m=3D0xc35f3a28, opts=3D0, >>> =A0 =A0file=3D0xc0f1ab65 "/usr/src/sys/netinet6/mld6.c", line=3D1676) >>> =A0 =A0at /usr/src/sys/kern/kern_mutex.c:203 >>> #5 =A00xc0bbf007 in mld_set_version (mli=3D0xc3589a00, version=3DVariab= le >>> "version" is not available. >>> ) >>> =A0 =A0at /usr/src/sys/netinet6/mld6.c:1676 >>> #6 =A00xc0bc0c00 in mld_input (m=3D0xc3951e00, off=3D48, icmp6len=3D24) >>> =A0 =A0at /usr/src/sys/netinet6/mld6.c:690 >>> #7 =A00xc0ba5696 in icmp6_input (mp=3D0xc3313a54, offp=3D0xc3313a68, pr= oto=3D58) >>> =A0 =A0at /usr/src/sys/netinet6/icmp6.c:654 >>> #8 =A00xc0bba23a in ip6_input (m=3D0xc3951e00) >>> =A0 =A0at /usr/src/sys/netinet6/ip6_input.c:964 >>> #9 =A00xc0ac9b1c in netisr_dispatch_src (proto=3D10, source=3D0, m=3D0x= c3951e00) >>> =A0 =A0at /usr/src/sys/net/netisr.c:1013 >>> #10 0xc0ac9da0 in netisr_dispatch (proto=3D10, m=3D0xc3951e00) >>> =A0 =A0at /usr/src/sys/net/netisr.c:1104 >>> #11 0xc0abecf1 in ether_demux (ifp=3D0xc35f3800, m=3D0xc3951e00) >>> =A0 =A0at /usr/src/sys/net/if_ethersubr.c:936 >>> #12 0xc0abf1b3 in ether_nh_input (m=3D0xc3951e00) >>> =A0 =A0at /usr/src/sys/net/if_ethersubr.c:755 >>> #13 0xc0ac9b1c in netisr_dispatch_src (proto=3D9, source=3D0, m=3D0xc39= 51e00) >>> =A0 =A0at /usr/src/sys/net/netisr.c:1013 >>> #14 0xc0ac9da0 in netisr_dispatch (proto=3D9, m=3D0xc3951e00) >>> =A0 =A0at /usr/src/sys/net/netisr.c:1104 >>> #15 0xc0abe7f5 in ether_input (ifp=3D0xc35f3800, m=3D0xc3951e00) >>> =A0 =A0at /usr/src/sys/net/if_ethersubr.c:796 >>> #16 0xc0672bc9 in lem_handle_rxtx (context=3D0xc3732000, pending=3D1) >>> =A0 =A0at /usr/src/sys/dev/e1000/if_lem.c:3554 >>> #17 0xc0a468ab in taskqueue_run_locked (queue=3D0xc359ca80) >>> =A0 =A0at /usr/src/sys/kern/subr_taskqueue.c:306 >>> #18 0xc0a47307 in taskqueue_thread_loop (arg=3D0xc37365ec) >>> =A0 =A0at /usr/src/sys/kern/subr_taskqueue.c:495 >>> #19 0xc09d7af8 in fork_exit (callout=3D0xc0a472a0 , >>> =A0 =A0arg=3D0xc37365ec, frame=3D0xc3313d28) at /usr/src/sys/kern/kern_= fork.c:941 >>> #20 0xc0d1d714 in fork_trampoline () at /usr/src/sys/i386/i386/exceptio= n.s:275 >>> (kgdb) >>> >> >> This is the same as in PR kern/158426. >> Can you try the patch from PR followup and report us whether it helps? >> Full link to PR with patch: >> http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/158426 >> > > I applied the patch and tried about 15 reboots and all went fine.... > Hi, Tom. A better fix for this problem has been developed since then. Would you please try it as well? For doing that, you need to revert a previous patch and apply this one. Please report if this change also fixes the panic for you, so it has better chances to get into 9.0 release. Index: sys/netinet6/mld6.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 --- sys/netinet6/mld6.c (revision 224471) +++ sys/netinet6/mld6.c (working copy) @@ -680,7 +680,6 @@ mld_v1_input_query(struct ifnet *ifp, const struct IN6_MULTI_LOCK(); MLD_LOCK(); - IF_ADDR_LOCK(ifp); /* * Switch to MLDv1 host compatibility mode. @@ -693,6 +692,7 @@ mld_v1_input_query(struct ifnet *ifp, const struct if (timer =3D=3D 0) timer =3D 1; + IF_ADDR_LOCK(ifp); if (is_general_query) { /* * For each reporting group joined on this @@ -888,7 +888,6 @@ mld_v2_input_query(struct ifnet *ifp, const struct IN6_MULTI_LOCK(); MLD_LOCK(); - IF_ADDR_LOCK(ifp); mli =3D MLD_IFINFO(ifp); KASSERT(mli !=3D NULL, ("%s: no mld_ifinfo for ifp %p", __func__, i= fp)); @@ -936,14 +935,18 @@ mld_v2_input_query(struct ifnet *ifp, const struct * Queries for groups we are not a member of on this * link are simply ignored. */ + IF_ADDR_LOCK(ifp); inm =3D in6m_lookup_locked(ifp, &mld->mld_addr); - if (inm =3D=3D NULL) + if (inm =3D=3D NULL) { + IF_ADDR_UNLOCK(ifp); goto out_locked; + } if (nsrc > 0) { if (!ratecheck(&inm->in6m_lastgsrtv, &V_mld_gsrdelay)) { CTR1(KTR_MLD, "%s: GS query throttled.", __func__); + IF_ADDR_UNLOCK(ifp); goto out_locked; } } @@ -961,10 +964,10 @@ mld_v2_input_query(struct ifnet *ifp, const struct /* XXX Clear embedded scope ID as userland won't expect it.= */ in6_clearscope(&mld->mld_addr); + IF_ADDR_UNLOCK(ifp); } out_locked: - IF_ADDR_UNLOCK(ifp); MLD_UNLOCK(); IN6_MULTI_UNLOCK(); --=20 wbr, pluknet --000e0cd762ae5266d904ab161afa Content-Type: application/octet-stream; name="mld6.locking.2.patch" Content-Disposition: attachment; filename="mld6.locking.2.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_grncdatp0 SW5kZXg6IHN5cy9uZXRpbmV0Ni9tbGQ2LmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL25ldGluZXQ2L21s ZDYuYwkocmV2aXNpb24gMjI0NDcxKQorKysgc3lzL25ldGluZXQ2L21sZDYuYwkod29ya2luZyBj b3B5KQpAQCAtNjgwLDcgKzY4MCw2IEBAIG1sZF92MV9pbnB1dF9xdWVyeShzdHJ1Y3QgaWZuZXQg KmlmcCwgY29uc3Qgc3RydWN0CiAKIAlJTjZfTVVMVElfTE9DSygpOwogCU1MRF9MT0NLKCk7Ci0J SUZfQUREUl9MT0NLKGlmcCk7CiAKIAkvKgogCSAqIFN3aXRjaCB0byBNTER2MSBob3N0IGNvbXBh dGliaWxpdHkgbW9kZS4KQEAgLTY5Myw2ICs2OTIsNyBAQCBtbGRfdjFfaW5wdXRfcXVlcnkoc3Ry dWN0IGlmbmV0ICppZnAsIGNvbnN0IHN0cnVjdAogCWlmICh0aW1lciA9PSAwKQogCQl0aW1lciA9 IDE7CiAKKwlJRl9BRERSX0xPQ0soaWZwKTsKIAlpZiAoaXNfZ2VuZXJhbF9xdWVyeSkgewogCQkv KgogCQkgKiBGb3IgZWFjaCByZXBvcnRpbmcgZ3JvdXAgam9pbmVkIG9uIHRoaXMKQEAgLTg4OCw3 ICs4ODgsNiBAQCBtbGRfdjJfaW5wdXRfcXVlcnkoc3RydWN0IGlmbmV0ICppZnAsIGNvbnN0IHN0 cnVjdAogCiAJSU42X01VTFRJX0xPQ0soKTsKIAlNTERfTE9DSygpOwotCUlGX0FERFJfTE9DSyhp ZnApOwogCiAJbWxpID0gTUxEX0lGSU5GTyhpZnApOwogCUtBU1NFUlQobWxpICE9IE5VTEwsICgi JXM6IG5vIG1sZF9pZmluZm8gZm9yIGlmcCAlcCIsIF9fZnVuY19fLCBpZnApKTsKQEAgLTkzNiwx NCArOTM1LDE4IEBAIG1sZF92Ml9pbnB1dF9xdWVyeShzdHJ1Y3QgaWZuZXQgKmlmcCwgY29uc3Qg c3RydWN0CiAJCSAqIFF1ZXJpZXMgZm9yIGdyb3VwcyB3ZSBhcmUgbm90IGEgbWVtYmVyIG9mIG9u IHRoaXMKIAkJICogbGluayBhcmUgc2ltcGx5IGlnbm9yZWQuCiAJCSAqLworCQlJRl9BRERSX0xP Q0soaWZwKTsKIAkJaW5tID0gaW42bV9sb29rdXBfbG9ja2VkKGlmcCwgJm1sZC0+bWxkX2FkZHIp OwotCQlpZiAoaW5tID09IE5VTEwpCisJCWlmIChpbm0gPT0gTlVMTCkgeworCQkJSUZfQUREUl9V TkxPQ0soaWZwKTsKIAkJCWdvdG8gb3V0X2xvY2tlZDsKKwkJfQogCQlpZiAobnNyYyA+IDApIHsK IAkJCWlmICghcmF0ZWNoZWNrKCZpbm0tPmluNm1fbGFzdGdzcnR2LAogCQkJICAgICZWX21sZF9n c3JkZWxheSkpIHsKIAkJCQlDVFIxKEtUUl9NTEQsICIlczogR1MgcXVlcnkgdGhyb3R0bGVkLiIs CiAJCQkJICAgIF9fZnVuY19fKTsKKwkJCQlJRl9BRERSX1VOTE9DSyhpZnApOwogCQkJCWdvdG8g b3V0X2xvY2tlZDsKIAkJCX0KIAkJfQpAQCAtOTYxLDEwICs5NjQsMTAgQEAgbWxkX3YyX2lucHV0 X3F1ZXJ5KHN0cnVjdCBpZm5ldCAqaWZwLCBjb25zdCBzdHJ1Y3QKIAogCQkvKiBYWFggQ2xlYXIg ZW1iZWRkZWQgc2NvcGUgSUQgYXMgdXNlcmxhbmQgd29uJ3QgZXhwZWN0IGl0LiAqLwogCQlpbjZf Y2xlYXJzY29wZSgmbWxkLT5tbGRfYWRkcik7CisJCUlGX0FERFJfVU5MT0NLKGlmcCk7CiAJfQog CiBvdXRfbG9ja2VkOgotCUlGX0FERFJfVU5MT0NLKGlmcCk7CiAJTUxEX1VOTE9DSygpOwogCUlO Nl9NVUxUSV9VTkxPQ0soKTsKIAo= --000e0cd762ae5266d904ab161afa-- From owner-freebsd-net@FreeBSD.ORG Mon Aug 22 18:40:56 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1A30106564A; Mon, 22 Aug 2011 18:40:56 +0000 (UTC) (envelope-from tvijlbrief@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 4E5F28FC0A; Mon, 22 Aug 2011 18:40:55 +0000 (UTC) Received: by qyk4 with SMTP id 4so1778802qyk.13 for ; Mon, 22 Aug 2011 11:40:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ouq6zc3NnCSWvIMrvDhebAPJiuqQIzOlNK8SsFeND0U=; b=X8DgpYXXFrGvyhWKwJ/C0UGavc5zDqqyQZ9vqMrR/GmaQoEenwChpLwlyXMr3FWR8p InsIE1Z/c5H+2GSwNzg4i2IZtx/K5DoAgzm1qlwY1R6AXQPvP/0GRipRDTN9Cc+7NqED B4PcxYn40Eg0HhBQOU9hu+NDUlJepIqI37gIA= MIME-Version: 1.0 Received: by 10.229.77.78 with SMTP id f14mr1863429qck.38.1314038454536; Mon, 22 Aug 2011 11:40:54 -0700 (PDT) Sender: tvijlbrief@gmail.com Received: by 10.229.230.130 with HTTP; Mon, 22 Aug 2011 11:40:54 -0700 (PDT) In-Reply-To: References: Date: Mon, 22 Aug 2011 20:40:54 +0200 X-Google-Sender-Auth: jbMOBIqThuhTCrXAukPT-offTj8 Message-ID: From: Tom Vijlbrief To: Sergey Kandaurov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Net , freebsd-current@freebsd.org Subject: Re: BETA1 IPv6 crash X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2011 18:40:56 -0000 2011/8/22 Sergey Kandaurov : > On 8 August 2011 22:06, Tom Vijlbrief wrote: >> 2011/8/7 Sergey Kandaurov : >>> On 7 August 2011 17:11, Tom Vijlbrief wrote: >>>> I installed BETA1 in a fresh ubuntu 11.04 KVM virtual machine with the >>>> new installer. >>>> >>>> Major issue I noticed was the missing /home. >>>> >>>> It took me quite some time to get IPv6 working in the guest (a Linux >>>> configuration issue), but now that it works >>>> BETA1 panics in about 50% of the boot attempts: >>>> >>>> testbsd dumped core - see /var/crash/vmcore.0 >>>> >>>> Sun Aug =A07 08:25:28 CEST 2011 >>>> >>>> FreeBSD testbsd 9.0-BETA1 FreeBSD 9.0-BETA1 #0: Thu Jul 28 16:34:16 >>>> UTC 2011 =A0 =A0 root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENE= RIC >>>> i386 >>>> >>>> panic: _mtx_lock_sleep: recursed on non-recursive mutex if_addr_mtx @ >>>> /usr/src/sys/netinet6/mld6.c:1676 >>>> >>>> GNU gdb 6.1.1 [FreeBSD] >>>> Copyright 2004 Free Software Foundation, Inc. >>>> GDB is free software, covered by the GNU General Public License, and y= ou are >>>> welcome to change it and/or distribute copies of it under certain cond= itions. >>>> Type "show copying" to see the conditions. >>>> There is absolutely no warranty for GDB. =A0Type "show warranty" for d= etails. >>>> This GDB was configured as "i386-marcel-freebsd"... >>> [..] >>>> panic: _mtx_lock_sleep: recursed on non-recursive mutex if_addr_mtx @ >>>> /usr/src/sys/netinet6/mld6.c:1676 >>>> >>>> cpuid =3D 0 >>>> KDB: enter: panic >>>> Uptime: 28s >>>> Physical memory: 491 MB >>>> Dumping 45 MB: 30 14 >>>> >>>> #0 =A0doadump (textdump=3D1) at pcpu.h:244 >>>> 244 =A0 =A0 pcpu.h: No such file or directory. >>>> =A0 =A0 =A0 =A0in pcpu.h >>>> (kgdb) #0 =A0doadump (textdump=3D1) at pcpu.h:244 >>>> #1 =A00xc0a04965 in kern_reboot (howto=3D260) >>>> =A0 =A0at /usr/src/sys/kern/kern_shutdown.c:430 >>>> #2 =A00xc0a04291 in panic (fmt=3DVariable "fmt" is not available. >>>> ) at /usr/src/sys/kern/kern_shutdown.c:595 >>>> #3 =A00xc09f4a4a in _mtx_lock_sleep (m=3D0xc35f3a28, tid=3D3278693824,= opts=3D0, >>>> =A0 =A0file=3D0xc0f1ab65 "/usr/src/sys/netinet6/mld6.c", line=3D1676) >>>> =A0 =A0at /usr/src/sys/kern/kern_mutex.c:341 >>>> #4 =A00xc09f4c67 in _mtx_lock_flags (m=3D0xc35f3a28, opts=3D0, >>>> =A0 =A0file=3D0xc0f1ab65 "/usr/src/sys/netinet6/mld6.c", line=3D1676) >>>> =A0 =A0at /usr/src/sys/kern/kern_mutex.c:203 >>>> #5 =A00xc0bbf007 in mld_set_version (mli=3D0xc3589a00, version=3DVaria= ble >>>> "version" is not available. >>>> ) >>>> =A0 =A0at /usr/src/sys/netinet6/mld6.c:1676 >>>> #6 =A00xc0bc0c00 in mld_input (m=3D0xc3951e00, off=3D48, icmp6len=3D24= ) >>>> =A0 =A0at /usr/src/sys/netinet6/mld6.c:690 >>>> #7 =A00xc0ba5696 in icmp6_input (mp=3D0xc3313a54, offp=3D0xc3313a68, p= roto=3D58) >>>> =A0 =A0at /usr/src/sys/netinet6/icmp6.c:654 >>>> #8 =A00xc0bba23a in ip6_input (m=3D0xc3951e00) >>>> =A0 =A0at /usr/src/sys/netinet6/ip6_input.c:964 >>>> #9 =A00xc0ac9b1c in netisr_dispatch_src (proto=3D10, source=3D0, m=3D0= xc3951e00) >>>> =A0 =A0at /usr/src/sys/net/netisr.c:1013 >>>> #10 0xc0ac9da0 in netisr_dispatch (proto=3D10, m=3D0xc3951e00) >>>> =A0 =A0at /usr/src/sys/net/netisr.c:1104 >>>> #11 0xc0abecf1 in ether_demux (ifp=3D0xc35f3800, m=3D0xc3951e00) >>>> =A0 =A0at /usr/src/sys/net/if_ethersubr.c:936 >>>> #12 0xc0abf1b3 in ether_nh_input (m=3D0xc3951e00) >>>> =A0 =A0at /usr/src/sys/net/if_ethersubr.c:755 >>>> #13 0xc0ac9b1c in netisr_dispatch_src (proto=3D9, source=3D0, m=3D0xc3= 951e00) >>>> =A0 =A0at /usr/src/sys/net/netisr.c:1013 >>>> #14 0xc0ac9da0 in netisr_dispatch (proto=3D9, m=3D0xc3951e00) >>>> =A0 =A0at /usr/src/sys/net/netisr.c:1104 >>>> #15 0xc0abe7f5 in ether_input (ifp=3D0xc35f3800, m=3D0xc3951e00) >>>> =A0 =A0at /usr/src/sys/net/if_ethersubr.c:796 >>>> #16 0xc0672bc9 in lem_handle_rxtx (context=3D0xc3732000, pending=3D1) >>>> =A0 =A0at /usr/src/sys/dev/e1000/if_lem.c:3554 >>>> #17 0xc0a468ab in taskqueue_run_locked (queue=3D0xc359ca80) >>>> =A0 =A0at /usr/src/sys/kern/subr_taskqueue.c:306 >>>> #18 0xc0a47307 in taskqueue_thread_loop (arg=3D0xc37365ec) >>>> =A0 =A0at /usr/src/sys/kern/subr_taskqueue.c:495 >>>> #19 0xc09d7af8 in fork_exit (callout=3D0xc0a472a0 , >>>> =A0 =A0arg=3D0xc37365ec, frame=3D0xc3313d28) at /usr/src/sys/kern/kern= _fork.c:941 >>>> #20 0xc0d1d714 in fork_trampoline () at /usr/src/sys/i386/i386/excepti= on.s:275 >>>> (kgdb) >>>> >>> >>> This is the same as in PR kern/158426. >>> Can you try the patch from PR followup and report us whether it helps? >>> Full link to PR with patch: >>> http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/158426 >>> >> >> I applied the patch and tried about 15 reboots and all went fine.... >> > > Hi, Tom. > A better fix for this problem has been developed since then. Would you > please try it as well? For doing that, you need to revert a previous > patch and apply this one. > Please report if this change also fixes the panic for you, so it =A0has > better chances to get into 9.0 release. > > > Index: sys/netinet6/mld6.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 > --- sys/netinet6/mld6.c (revision 224471) > +++ sys/netinet6/mld6.c (working copy) > @@ -680,7 +680,6 @@ mld_v1_input_query(struct ifnet *ifp, const struct > > =A0 =A0 =A0 =A0IN6_MULTI_LOCK(); > =A0 =A0 =A0 =A0MLD_LOCK(); > - =A0 =A0 =A0 IF_ADDR_LOCK(ifp); > > =A0 =A0 =A0 =A0/* > =A0 =A0 =A0 =A0 * Switch to MLDv1 host compatibility mode. > @@ -693,6 +692,7 @@ mld_v1_input_query(struct ifnet *ifp, const struct > =A0 =A0 =A0 =A0if (timer =3D=3D 0) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0timer =3D 1; > > + =A0 =A0 =A0 IF_ADDR_LOCK(ifp); > =A0 =A0 =A0 =A0if (is_general_query) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * For each reporting group joined on this > @@ -888,7 +888,6 @@ mld_v2_input_query(struct ifnet *ifp, const struct > > =A0 =A0 =A0 =A0IN6_MULTI_LOCK(); > > =A0 =A0 =A0 =A0MLD_LOCK(); > - =A0 =A0 =A0 IF_ADDR_LOCK(ifp); > > =A0 =A0 =A0 =A0mli =3D MLD_IFINFO(ifp); > =A0 =A0 =A0 =A0KASSERT(mli !=3D NULL, ("%s: no mld_ifinfo for ifp %p", __= func__, ifp)); > @@ -936,14 +935,18 @@ mld_v2_input_query(struct ifnet *ifp, const struct > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * Queries for groups we are not a member = of on this > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * link are simply ignored. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 */ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 IF_ADDR_LOCK(ifp); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0inm =3D in6m_lookup_locked(ifp, &mld->mld_= addr); > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (inm =3D=3D NULL) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (inm =3D=3D NULL) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 IF_ADDR_UNLOCK(ifp); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto out_locked; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (nsrc > 0) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (!ratecheck(&inm->in6m_= lastgsrtv, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&V_mld_gsrdelay)) = { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0CTR1(KTR_M= LD, "%s: GS query throttled.", > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0__= func__); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 IF_ADDR_UNL= OCK(ifp); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto out_l= ocked; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > @@ -961,10 +964,10 @@ mld_v2_input_query(struct ifnet *ifp, const struct > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* XXX Clear embedded scope ID as userland= won't expect it. */ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0in6_clearscope(&mld->mld_addr); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 IF_ADDR_UNLOCK(ifp); > =A0 =A0 =A0 =A0} > > =A0out_locked: > - =A0 =A0 =A0 IF_ADDR_UNLOCK(ifp); > =A0 =A0 =A0 =A0MLD_UNLOCK(); > =A0 =A0 =A0 =A0IN6_MULTI_UNLOCK(); > > > -- > wbr, > pluknet > Applied your patch and rebooted about 10 times without problems, so the new patch works ok for me! From owner-freebsd-net@FreeBSD.ORG Mon Aug 22 23:40:12 2011 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCE141065677 for ; Mon, 22 Aug 2011 23:40:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 933D78FC0C for ; Mon, 22 Aug 2011 23:40:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p7MNeCJ5035483 for ; Mon, 22 Aug 2011 23:40:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p7MNeCfc035482; Mon, 22 Aug 2011 23:40:12 GMT (envelope-from gnats) Date: Mon, 22 Aug 2011 23:40:12 GMT Message-Id: <201108222340.p7MNeCfc035482@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/158426: commit references a PR X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2011 23:40:12 -0000 The following reply was made to PR kern/158426; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/158426: commit references a PR Date: Mon, 22 Aug 2011 23:39:50 +0000 (UTC) Author: pluknet Date: Mon Aug 22 23:39:40 2011 New Revision: 225096 URL: http://svn.freebsd.org/changeset/base/225096 Log: Fix if_addr_mtx recursion in mld6. mld_set_version() is called only from mld_v1_input_query() and mld_v2_input_query() both holding the if_addr_mtx lock, and then calling into mld_v2_cancel_link_timers() acquires it the second time, which results in mtx recursion. To avoid that, delay if_addr_mtx acquisition until after mld_set_version() is called; while here, further reduce locking scope to protect only the needed pieces: if_multiaddrs, in6m_lookup_locked(). PR: kern/158426 Reported by: Thomas , Tom Vijlbrief Tested by: Tom Vijlbrief Reviewed by: bz Approved by: re (kib) Modified: head/sys/netinet6/mld6.c Modified: head/sys/netinet6/mld6.c ============================================================================== --- head/sys/netinet6/mld6.c Mon Aug 22 23:27:23 2011 (r225095) +++ head/sys/netinet6/mld6.c Mon Aug 22 23:39:40 2011 (r225096) @@ -680,7 +680,6 @@ mld_v1_input_query(struct ifnet *ifp, co IN6_MULTI_LOCK(); MLD_LOCK(); - IF_ADDR_LOCK(ifp); /* * Switch to MLDv1 host compatibility mode. @@ -693,6 +692,7 @@ mld_v1_input_query(struct ifnet *ifp, co if (timer == 0) timer = 1; + IF_ADDR_LOCK(ifp); if (is_general_query) { /* * For each reporting group joined on this @@ -888,7 +888,6 @@ mld_v2_input_query(struct ifnet *ifp, co IN6_MULTI_LOCK(); MLD_LOCK(); - IF_ADDR_LOCK(ifp); mli = MLD_IFINFO(ifp); KASSERT(mli != NULL, ("%s: no mld_ifinfo for ifp %p", __func__, ifp)); @@ -936,14 +935,18 @@ mld_v2_input_query(struct ifnet *ifp, co * Queries for groups we are not a member of on this * link are simply ignored. */ + IF_ADDR_LOCK(ifp); inm = in6m_lookup_locked(ifp, &mld->mld_addr); - if (inm == NULL) + if (inm == NULL) { + IF_ADDR_UNLOCK(ifp); goto out_locked; + } if (nsrc > 0) { if (!ratecheck(&inm->in6m_lastgsrtv, &V_mld_gsrdelay)) { CTR1(KTR_MLD, "%s: GS query throttled.", __func__); + IF_ADDR_UNLOCK(ifp); goto out_locked; } } @@ -961,10 +964,10 @@ mld_v2_input_query(struct ifnet *ifp, co /* XXX Clear embedded scope ID as userland won't expect it. */ in6_clearscope(&mld->mld_addr); + IF_ADDR_UNLOCK(ifp); } out_locked: - IF_ADDR_UNLOCK(ifp); MLD_UNLOCK(); IN6_MULTI_UNLOCK(); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-net@FreeBSD.ORG Mon Aug 22 23:43:31 2011 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D520A1065672; Mon, 22 Aug 2011 23:43:31 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id ABB998FC08; Mon, 22 Aug 2011 23:43:31 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p7MNhVQb043701; Mon, 22 Aug 2011 23:43:31 GMT (envelope-from pluknet@freefall.freebsd.org) Received: (from pluknet@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p7MNhVWJ043697; Mon, 22 Aug 2011 23:43:31 GMT (envelope-from pluknet) Date: Mon, 22 Aug 2011 23:43:31 GMT Message-Id: <201108222343.p7MNhVWJ043697@freefall.freebsd.org> To: tps@vr-web.de, pluknet@FreeBSD.org, freebsd-net@FreeBSD.org From: pluknet@FreeBSD.org Cc: Subject: Re: kern/158426: [e1000] [panic] _mtx_lock_sleep: recursed on non-recursive mutex if_addr_mtx @ /usr/src/sys/netinet6/mld6.c:1676 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2011 23:43:31 -0000 Synopsis: [e1000] [panic] _mtx_lock_sleep: recursed on non-recursive mutex if_addr_mtx @ /usr/src/sys/netinet6/mld6.c:1676 State-Changed-From-To: feedback->closed State-Changed-By: pluknet State-Changed-When: Mon Aug 22 23:42:16 UTC 2011 State-Changed-Why: A different fix was committed in svn r225096. http://www.freebsd.org/cgi/query-pr.cgi?pr=158426 From owner-freebsd-net@FreeBSD.ORG Mon Aug 22 23:44:52 2011 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B19F106566C; Mon, 22 Aug 2011 23:44:52 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 522088FC1F; Mon, 22 Aug 2011 23:44:52 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p7MNiqJt043859; Mon, 22 Aug 2011 23:44:52 GMT (envelope-from pluknet@freefall.freebsd.org) Received: (from pluknet@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p7MNiqm8043855; Mon, 22 Aug 2011 23:44:52 GMT (envelope-from pluknet) Date: Mon, 22 Aug 2011 23:44:52 GMT Message-Id: <201108222344.p7MNiqm8043855@freefall.freebsd.org> To: pluknet@FreeBSD.org, freebsd-net@FreeBSD.org, pluknet@FreeBSD.org From: pluknet@FreeBSD.org Cc: Subject: Re: kern/158426: [e1000] [panic] _mtx_lock_sleep: recursed on non-recursive mutex if_addr_mtx @ /usr/src/sys/netinet6/mld6.c:1676 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2011 23:44:52 -0000 Synopsis: [e1000] [panic] _mtx_lock_sleep: recursed on non-recursive mutex if_addr_mtx @ /usr/src/sys/netinet6/mld6.c:1676 Responsible-Changed-From-To: freebsd-net->pluknet Responsible-Changed-By: pluknet Responsible-Changed-When: Mon Aug 22 23:44:24 UTC 2011 Responsible-Changed-Why: Track. http://www.freebsd.org/cgi/query-pr.cgi?pr=158426 From owner-freebsd-net@FreeBSD.ORG Mon Aug 22 23:48:13 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F04F41065670 for ; Mon, 22 Aug 2011 23:48:13 +0000 (UTC) (envelope-from b.gruel@woody.hopto.org) Received: from smtp2-g21.free.fr (unknown [IPv6:2a01:e0c:1:1599::11]) by mx1.freebsd.org (Postfix) with ESMTP id 6D81C8FC1B for ; Mon, 22 Aug 2011 23:48:11 +0000 (UTC) Received: from ob1.woody.hopto.org (unknown [88.184.221.92]) by smtp2-g21.free.fr (Postfix) with ESMTP id 0B5564B000F for ; Tue, 23 Aug 2011 01:48:05 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by ob1.woody.hopto.org (Postfix) with ESMTP id 3BC631F52CB for ; Tue, 23 Aug 2011 02:00:04 +0200 (CEST) X-Virus-Scanned: amavisd-new at woody.hopto.org Received: from ob1.woody.hopto.org ([127.0.0.1]) by localhost (ob1.woody.hopto.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mwrcCngseAEs for ; Tue, 23 Aug 2011 02:00:04 +0200 (CEST) Received: from woody.hopto.org (localhost [127.0.0.1]) by ob1.woody.hopto.org (Postfix) with ESMTP id 0434A1F52CA for ; Tue, 23 Aug 2011 02:00:04 +0200 (CEST) MIME-Version: 1.0 X-Mailer: AfterLogic WebMail Pro PHP X-Originating-IP: 192.168.16.5 X-Priority: 3 (Normal) Message-ID: <22nf6gv.f7e5576e46b333319f833f6b24f24d73@private.woody.hopto.org> From: "Gruel Bruno" To: freebsd-net@freebsd.org Date: Tue, 23 Aug 2011 02:00:03 +0200 (CEST) Content-Type: text/plain; charset="windows-1250" Content-Transfer-Encoding: Quoted-Printable Subject: MPD as LAC + Radius X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2011 23:48:14 -0000 Hello, I use MPD on FreeBSD 8.2 as LAC but i can't (or don't hnow how) check (user/= password) off the pppoe client before "forwarding" the connection. I try a lot off variant on my mpd.conf without success. This is my config file (mpd.conf) : default: load killa_lac killa_lac: create link template L1 pppoe set pppoe iface le0 load radius set link enable multilink set link action forward L2 set link enable incoming create link template L2 l2tp set l2tp peer X.X.X.X set l2tp secret xxxxx radius: set radius server X.X.X.X killa_lac set radius retries 3 set radius timeout 3 set radius me X.X.X.X set auth acct-update 300 set auth enable radius-auth set auth enable radius-acct set radius disable message-authentic Have got a idea ? Thank's Bruno Gruel This message has been scanned for viruses and dangerous content by Amavisd-new, and is believed to be clean. From owner-freebsd-net@FreeBSD.ORG Mon Aug 22 23:49:21 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 648DB1065674 for ; Mon, 22 Aug 2011 23:49:21 +0000 (UTC) (envelope-from jwd@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5381D8FC0A for ; Mon, 22 Aug 2011 23:49:21 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p7MNnLn7044734 for ; Mon, 22 Aug 2011 23:49:21 GMT (envelope-from jwd@freefall.freebsd.org) Received: (from jwd@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p7MNnLwU044733 for freebsd-net@freebsd.org; Mon, 22 Aug 2011 23:49:21 GMT (envelope-from jwd) Date: Mon, 22 Aug 2011 23:49:21 +0000 From: John To: FreeBSD Net Message-ID: <20110822234921.GA34843@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Subject: ifconfig -alias with duplicate netmasks work? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2011 23:49:21 -0000 Fellow Net'ers Debugging an nfs locking problem to a linux host, I accidently issued some ifconfig commands on the bsd server (9-current) and found that duplicate netmasks seem to work fine. For instance: bce0: flags=8843 metric 0 mtu 1500 options=c01bb ether d4:85:64:66:2a:14 inet6 fe80::d685:64ff:fe66:2a14%bce0 prefixlen 64 scopeid 0x1 inet 10.24.99.127 netmask 0xffff0000 broadcast 10.24.255.255 inet 10.24.99.128 netmask 0xffff0000 broadcast 10.24.255.255 inet 10.24.99.126 netmask 0xffff0000 broadcast 10.24.255.255 nd6 options=29 media: Ethernet autoselect (1000baseT ) status: active via the commands: ifconfig bce0 inet 10.24.99.127 netmask 0xffff0000 broadcast 10.24.255.255 ifconfig bce0 inet 10.24.99.128 netmask 0xffff0000 broadcast 10.24.255.255 alias ifconfig bce0 inet 10.24.99.126 netmask 0xffff0000 broadcast 10.24.255.255 alias The man page for ifconfig says one 'must' use a different netmask, typically 0xffffffff. However, everything still seems to work ok. Has something changed, is the manpage wrong, am I totally missing something? Thanks, John man ifconfig If the address is on the same subnet as the first network address for this interface, a non-conflicting netmask must be given. Usually 0xffffffff is most appropriate. From owner-freebsd-net@FreeBSD.ORG Tue Aug 23 00:42:34 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id EFEE1106566C; Tue, 23 Aug 2011 00:42:34 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 43B5C152057; Tue, 23 Aug 2011 00:42:15 +0000 (UTC) Message-ID: <4E52F766.8070102@FreeBSD.org> Date: Mon, 22 Aug 2011 17:42:14 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:6.0) Gecko/20110819 Thunderbird/6.0 MIME-Version: 1.0 To: John References: <20110822234921.GA34843@FreeBSD.org> In-Reply-To: <20110822234921.GA34843@FreeBSD.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD Net Subject: Re: ifconfig -alias with duplicate netmasks work? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 23 Aug 2011 00:42:35 -0000 On 08/22/2011 16:49, John wrote: > Fellow Net'ers > > Debugging an nfs locking problem to a linux host, I accidently > issued some ifconfig commands on the bsd server (9-current) and > found that duplicate netmasks seem to work fine. For instance: > > bce0: flags=8843 metric 0 mtu 1500 > options=c01bb > ether d4:85:64:66:2a:14 > inet6 fe80::d685:64ff:fe66:2a14%bce0 prefixlen 64 scopeid 0x1 > inet 10.24.99.127 netmask 0xffff0000 broadcast 10.24.255.255 > inet 10.24.99.128 netmask 0xffff0000 broadcast 10.24.255.255 > inet 10.24.99.126 netmask 0xffff0000 broadcast 10.24.255.255 > nd6 options=29 > media: Ethernet autoselect (1000baseT ) > status: active My experience on 8.x is that this will work for most things, but then fail in odd ways. You're still better off following the old advice of making the aliases for the same network have the all-1s netmask. -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-freebsd-net@FreeBSD.ORG Tue Aug 23 01:29:58 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C28061065676 for ; Tue, 23 Aug 2011 01:29:58 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from fallbackmx08.syd.optusnet.com.au (fallbackmx08.syd.optusnet.com.au [211.29.132.10]) by mx1.freebsd.org (Postfix) with ESMTP id 546038FC08 for ; Tue, 23 Aug 2011 01:29:57 +0000 (UTC) Received: from mail15.syd.optusnet.com.au (mail15.syd.optusnet.com.au [211.29.132.196]) by fallbackmx08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p7MN7tH1027393 for ; Tue, 23 Aug 2011 09:07:55 +1000 Received: from server.vk2pj.dyndns.org (c220-239-116-103.belrs4.nsw.optusnet.com.au [220.239.116.103]) by mail15.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p7MN7q4F016500 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 23 Aug 2011 09:07:53 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.4/8.14.4) with ESMTP id p7MN7ptQ029038 for ; Tue, 23 Aug 2011 09:07:51 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.4/8.14.4/Submit) id p7MN7p3k029037 for freebsd-net@freebsd.org; Tue, 23 Aug 2011 09:07:51 +1000 (EST) (envelope-from peter) Date: Tue, 23 Aug 2011 09:07:51 +1000 From: Peter Jeremy To: freebsd-net@freebsd.org Message-ID: <20110822230751.GA28157@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5mCyUwZo2JvN/JJP" Content-Disposition: inline X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Statistics collection broken in "new" dummynet X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 23 Aug 2011 01:29:58 -0000 --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I have been using dummynet(4) to do traffic shaping for simulated WANs for over a decade now and it has been very effective - thanks Luigi. I am currently looking at migrating the network simulator from 7.1 to 8.2 and have noticed that the statistics reported are now meaningless. Instead of reporting cumulative statistics, it now appears to reset them regularly - apparently whenever the pipe is empty. Sample results from 7.1 (currently inactive): 00224: 2.000 Mbit/s 9 ms 64 KB 1 queues (1 buckets) droptail mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000 BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte= Drp 0 udp 192.168.224.183/0 192.168.216.179/0 5404902 598099622 0 = 0 0 Sample results from 8.2 (currently active simulator): 00224: 2.000 Mbit/s 18 ms burst 0=20 q131296 64 KB 0 flows (1 buckets) sched 65760 weight 0 lmax 0 pri 0 droptail sched 65760 type FIFO flags 0x0 0 buckets 1 active 0 ip 0.0.0.0/0 0.0.0.0/0 2 1785 0 0 = 0 (and most of the time, the last line doesn't appear). I have checked a recent 9.0-BETA1 and it is still broken. Looking at the dummynet.txt file, I cannot see this mentioned. I have looked through the source and it does appear that scheduler instances are marked inactive in serve_sched() once they have no packets queued and are then garbage-collected via drain_scheduler_cb(). Is this the intent? If so, how can statistics be collected? --=20 Peter Jeremy --5mCyUwZo2JvN/JJP Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk5S4UcACgkQ/opHv/APuIeIpgCfSnxp/YdfNQgkFOwXjzZacWNo njcAmwSleEGLPokHCmRV+SOxcSjtP6oJ =TjH3 -----END PGP SIGNATURE----- --5mCyUwZo2JvN/JJP-- From owner-freebsd-net@FreeBSD.ORG Tue Aug 23 02:02:45 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A31A2106566B for ; Tue, 23 Aug 2011 02:02:45 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 68F258FC16 for ; Tue, 23 Aug 2011 02:02:45 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 33A1B7300B; Tue, 23 Aug 2011 04:20:43 +0200 (CEST) Date: Tue, 23 Aug 2011 04:20:43 +0200 From: Luigi Rizzo To: Peter Jeremy Message-ID: <20110823022043.GB93269@onelab2.iet.unipi.it> References: <20110822230751.GA28157@server.vk2pj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110822230751.GA28157@server.vk2pj.dyndns.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org Subject: Re: Statistics collection broken in "new" dummynet X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 23 Aug 2011 02:02:45 -0000 On Tue, Aug 23, 2011 at 09:07:51AM +1000, Peter Jeremy wrote: > I have been using dummynet(4) to do traffic shaping for simulated WANs > for over a decade now and it has been very effective - thanks Luigi. > > I am currently looking at migrating the network simulator from 7.1 to > 8.2 and have noticed that the statistics reported are now meaningless. > Instead of reporting cumulative statistics, it now appears to reset > them regularly - apparently whenever the pipe is empty. ... it's not that the stats are reset, it is that pipes and queues are deleted when they carry no useful state (which is different from "empty" -- but the timescale for changes from empty to useless is normally too short for humans. Deleting entries saves memory and speeds up lookups in the data structures, but is extremely annoying if you want to collect per-flow statistics. If i remember well there is a knob to enable/disable removal of useless pipes/queues but i am not sure if there is a sysctl or timer or other mechanism to control it. If you have the time to look at the source there might be some documentation. cheers luigi > Sample results from 7.1 (currently inactive): > 00224: 2.000 Mbit/s 9 ms 64 KB 1 queues (1 buckets) droptail > mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000 > BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp > 0 udp 192.168.224.183/0 192.168.216.179/0 5404902 598099622 0 0 0 > > Sample results from 8.2 (currently active simulator): > 00224: 2.000 Mbit/s 18 ms burst 0 > q131296 64 KB 0 flows (1 buckets) sched 65760 weight 0 lmax 0 pri 0 droptail > sched 65760 type FIFO flags 0x0 0 buckets 1 active > 0 ip 0.0.0.0/0 0.0.0.0/0 2 1785 0 0 0 > (and most of the time, the last line doesn't appear). > > I have checked a recent 9.0-BETA1 and it is still broken. Looking at > the dummynet.txt file, I cannot see this mentioned. I have looked > through the source and it does appear that scheduler instances are > marked inactive in serve_sched() once they have no packets queued and > are then garbage-collected via drain_scheduler_cb(). Is this the > intent? If so, how can statistics be collected? > > -- > Peter Jeremy From owner-freebsd-net@FreeBSD.ORG Tue Aug 23 03:39:09 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 563311065670 for ; Tue, 23 Aug 2011 03:39:09 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail18.syd.optusnet.com.au (mail18.syd.optusnet.com.au [211.29.132.199]) by mx1.freebsd.org (Postfix) with ESMTP id C53D98FC14 for ; Tue, 23 Aug 2011 03:39:08 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c220-239-116-103.belrs4.nsw.optusnet.com.au [220.239.116.103]) by mail18.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p7N3d3Tk017265 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Aug 2011 13:39:06 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.4/8.14.4) with ESMTP id p7N3d2KK030591; Tue, 23 Aug 2011 13:39:02 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.4/8.14.4/Submit) id p7N3d0qN030588; Tue, 23 Aug 2011 13:39:00 +1000 (EST) (envelope-from peter) Date: Tue, 23 Aug 2011 13:38:59 +1000 From: Peter Jeremy To: Luigi Rizzo Message-ID: <20110823033859.GB28157@server.vk2pj.dyndns.org> References: <20110822230751.GA28157@server.vk2pj.dyndns.org> <20110823022043.GB93269@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vGgW1X5XWziG23Ko" Content-Disposition: inline In-Reply-To: <20110823022043.GB93269@onelab2.iet.unipi.it> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-net@freebsd.org Subject: Re: Statistics collection broken in "new" dummynet X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 23 Aug 2011 03:39:09 -0000 --vGgW1X5XWziG23Ko Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2011-Aug-23 04:20:43 +0200, Luigi Rizzo wrote: >Deleting entries saves memory and speeds up lookups in the data >structures, but is extremely annoying if you want to collect per-flow >statistics. Which I do. >If i remember well there is a knob to enable/disable removal of >useless pipes/queues but i am not sure if there is a sysctl or >timer or other mechanism to control it. Thanks - that was enough of a pointer to find net.inet.ip.dummynet.expire --=20 Peter Jeremy --vGgW1X5XWziG23Ko Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk5TINMACgkQ/opHv/APuId4aQCgwkb8HlShU12bzCDkhViE/4az puUAnA5Kf2bG1seRyl/v4PPRCqo6nDF1 =XyqB -----END PGP SIGNATURE----- --vGgW1X5XWziG23Ko-- From owner-freebsd-net@FreeBSD.ORG Tue Aug 23 05:45:16 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E007106564A for ; Tue, 23 Aug 2011 05:45:16 +0000 (UTC) (envelope-from s.khanchi@gmail.com) Received: from mail-pz0-f45.google.com (mail-pz0-f45.google.com [209.85.210.45]) by mx1.freebsd.org (Postfix) with ESMTP id C25978FC0A for ; Tue, 23 Aug 2011 05:45:15 +0000 (UTC) Received: by pzk33 with SMTP id 33so18788484pzk.18 for ; Mon, 22 Aug 2011 22:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=rFq72BLsvM/3TPWnq0Cqp8SZhQw5naj3D7eAwPCA3Qs=; b=TJ97sFdB64rNFCP8SJE7jdz7ScRsRM8wrFqFlFF5UZFflza78P3RNC+YNwQ5PW5qXM 92u6obWTZMXTZ7L+dytFXn+rLQbRtl6QONJUsSHOHBgpuSA12RyoRvEFYjUlz7xS7gRe bo84Qy4nwvg3LtFEuWptIYu5//++98zoY1oTg= Received: by 10.143.59.10 with SMTP id m10mr2056910wfk.418.1314078315102; Mon, 22 Aug 2011 22:45:15 -0700 (PDT) MIME-Version: 1.0 Sender: s.khanchi@gmail.com Received: by 10.143.26.30 with HTTP; Mon, 22 Aug 2011 22:44:55 -0700 (PDT) In-Reply-To: References: From: h bagade Date: Tue, 23 Aug 2011 10:14:55 +0430 X-Google-Sender-Auth: 3-8yq6SWMGTjkZRvjlMacv6WMAA Message-ID: To: David Cornejo Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org Subject: Re: problem with setting nat using pf X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 23 Aug 2011 05:45:16 -0000 thanks for your reply. defining an alias on interfaces has its drawbacks. Only natted addresses should be accessible via interface, not the remaining addresses in pool which still no session is natted to them. Is there a way to make pf do the task? or get helps of other utilities which accept the responsibility of pool address arp requests? On Sun, Aug 21, 2011 at 11:54 PM, David Cornejo wrote: > > > On Sat, Aug 20, 2011 at 9:47 PM, h bagade wrote: > >> Hi all, >> >> I am trying to use pf nat rules with pool support on FreeBsd 8.0, working >> together with ipfw as the main firewall. According to the natting concepts >> i >> faced in manuals and docs, nat concept is to map the source address to the >> natted address when sending the packets from that source and then map the >> destination address of the related reply packets. >> >> but when I define pf nat rules with a pool of IP addresses not available >> on >> the outside interface ip addresses, the outgoing traffic is natted to one >> of >> the pool addresses but the response is not received via that interface so >> the pf can map the destination address to the real one. here is one of my >> configs i used during my tests: >> >> *configurations:* >> *pf.conf:* >> nat on eth1 from { 11.11.11.0/24} to any -> >> {172.16.10.1,172.16.10.2,172. >> >> 16.10.3,172.16.10.4,172.16.10.5,172.16.10.6,172.16.10.7,172.16.10.8,172.16.10.9,172.16.10.10} >> >> main system configurations: >> eth0: 11.11.11.1 >> eth1: 172.16.10.64 >> >> system A: directly connected to eth0- 11.11.11.11 >> system B: directly connected to eth1- 172.16.10.65 >> >> in this configs the dafult route of system A and system B are the middle >> systems connected ip address. >> >> as mentioned, when systemA pings systemB, the ping requests are natted to >> 172.16.10.1 and received at systemB but systemB doesn't send icmp replies >> because it doesn't know to whom it should send the replies (no answer to >> system B 's ARP requests about who has the natted IP). >> >> now my question is, isn't it the pf nat responsibilty to manage this >> condition and send the ARP replies to SystemB? >> or, are my configs wrong? >> or i misunderstood the nat concepts? >> >> any ideas or helps are really appreciated as i have to set this nat on my >> main system, asap. >> Thanks in advance. >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >> > > ARP is not handled by pf. You need to get the interface to respond to that > IP address by creating an alias for the address using ifconfig - if you need > more help please post your rc.conf > > > > > From owner-freebsd-net@FreeBSD.ORG Tue Aug 23 07:51:18 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F215E106564A; Tue, 23 Aug 2011 07:51:18 +0000 (UTC) (envelope-from gadidot@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 645DE8FC15; Tue, 23 Aug 2011 07:51:18 +0000 (UTC) Received: by wwi36 with SMTP id 36so5763343wwi.31 for ; Tue, 23 Aug 2011 00:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=W3G8JvJy9XOCmlb04eWwhWPbBan31j1+Iq+gOMHlvoU=; b=cLL+r2qhojJvBgud8i2AmiXpMEz1niqmEb0l194ecYaCMzrEdJbzh6VClx4otGqRu9 ucSE9Jnkd10lV9yR7uEFfyCcQgu3y74d00dM0s+2rZYS4QKtuLBUhYsIGIEXZ9WWs0gF jhLWdoXjM5WdAZ3GReipNPR/c3iZgn+9MCNvM= MIME-Version: 1.0 Received: by 10.216.232.158 with SMTP id n30mr2917573weq.69.1314084568933; Tue, 23 Aug 2011 00:29:28 -0700 (PDT) Received: by 10.216.61.76 with HTTP; Tue, 23 Aug 2011 00:29:28 -0700 (PDT) Date: Tue, 23 Aug 2011 15:29:28 +0800 Message-ID: From: Gi Dot To: freebsd-pf@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org Subject: Error - mysql_connect: Operation not permitted. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 23 Aug 2011 07:51:19 -0000 Hi, I'm getting the following errors in my apache22 log: [Mon Aug 22 23:09:02 2011] [error] [client 192.168.30.10] PHP Warning: mysql_connect(): Operation not permitted in /usr/local/sites/xxx/demonlords4.lib.php on line 23, referer: http://a.b.com/main.php?location=missiondungeon&action=launchstop&perform=start&mid=358 [Mon Aug 22 23:09:03 2011] [error] [client 192.168.30.10] PHP Warning: mysql_connect(): [2002] Operation not permitted (trying to connect via tcp://10.10.10.101:3306) in /usr/local/sites/xxx/demonlords4.lib.php on line 23, referer: http://a.b.com/main.php?location=group [Mon Aug 22 23:09:03 2011] [error] [client 192.168.30.10] PHP Warning: mysql_connect(): Operation not permitted in /usr/local/sites/xxx/demonlords4.lib.php on line 23, referer: http://a.b.com/main.php?location=group . . . [Tue Aug 23 07:31:46 2011] [error] [client 192.168.30.10] PHP Warning: mysql_pconnect(): MySQL server has gone away in /usr/local/sites/xxx/test.php on line 282, referer: http://a.b.com/test.php [Tue Aug 23 07:31:50 2011] [error] [client 192.168.30.10] PHP Warning: mysql_pconnect(): MySQL server has gone away in /usr/local/sites/xxx/test.php on line 282 I just wonder if it could be caused by improper configurations in my pf.conf. I have found a couple of threads where the users managed to solve the problem by lowering the value of tcp.closed. It doesn't work for me though (I lowered the value from 90s to 15s). My apache22 run on jails and managed by haproxy. Both haproxy and apache22 reside in the same server (haproxy runs on host, apache22 run on 2 jails). Database also running on a jail but on a different host. All jails are using private IP addresses. Following is my pf.conf on web server(haproxy-1.4.15 & apache-2.2.19): http://pastebin.com/HM7jWH3X And this is my pf.conf on db server (mysql-server-5.5.14): http://pastebin.com/vFB7Jagt Both servers' uname -a: 8.2-RELEASE FreeBSD 8.2-RELEASE #7: Sun Jul 17 06:32:10 CEST 2011 root@webm01.xx.xx:/usr/obj/usr/src/sys/WEBM01 amd64 Appreciate any advice offered. Thanks. From owner-freebsd-net@FreeBSD.ORG Tue Aug 23 14:40:04 2011 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF373106564A for ; Tue, 23 Aug 2011 14:40:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AD8D78FC0A for ; Tue, 23 Aug 2011 14:40:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p7NEe4jh007542 for ; Tue, 23 Aug 2011 14:40:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p7NEe4tq007541; Tue, 23 Aug 2011 14:40:04 GMT (envelope-from gnats) Date: Tue, 23 Aug 2011 14:40:04 GMT Message-Id: <201108231440.p7NEe4tq007541@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/158156: commit references a PR X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2011 14:40:05 -0000 The following reply was made to PR kern/158156; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/158156: commit references a PR Date: Tue, 23 Aug 2011 14:33:22 +0000 (UTC) Author: marius Date: Tue Aug 23 14:32:53 2011 New Revision: 225116 URL: http://svn.freebsd.org/changeset/base/225116 Log: MFC: r225014 r221812 (MFC'ed to stable/8 in r222159) reveals that at least some Broadcom PHYs default to being not only isolated but also powered down after a reset and while they just work fine [sic] when both is the case they don't if they are only deisolate but still powered down. So in order to put PHYs in an overall normal operation mode for the common case, ensure in mii_phy_reset() that they are not powered down after a reset. Unfortunately, this only helps in case of BCM5421, while BCM5709S apparently only work when they remain isolated and powered down after a reset. So don't call mii_phy_reset() in brgphy_reset() and implement the reset locally leaving the problematic bits alone. Effectively this bypasses r221812 for brgphy(4). Thanks to Justin Hibbits for doing a binary search in order to identify the problematic commit. PR: 157405, 158156 Reviewed by: yongari (mii_phy_reset() part) Modified: stable/8/sys/dev/mii/brgphy.c stable/8/sys/dev/mii/mii_physubr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/mii/brgphy.c ============================================================================== --- stable/8/sys/dev/mii/brgphy.c Tue Aug 23 14:01:04 2011 (r225115) +++ stable/8/sys/dev/mii/brgphy.c Tue Aug 23 14:32:53 2011 (r225116) @@ -913,10 +913,22 @@ brgphy_reset(struct mii_softc *sc) struct bge_softc *bge_sc = NULL; struct bce_softc *bce_sc = NULL; struct ifnet *ifp; - int val; + int i, val; - /* Perform a standard PHY reset. */ - mii_phy_reset(sc); + /* + * Perform a reset. Note that at least some Broadcom PHYs default to + * being powered down as well as isolated after a reset but don't work + * if one or both of these bits are cleared. However, they just work + * fine if both bits remain set, so we don't use mii_phy_reset() here. + */ + PHY_WRITE(sc, BRGPHY_MII_BMCR, BRGPHY_BMCR_RESET); + + /* Wait 100ms for it to complete. */ + for (i = 0; i < 100; i++) { + if ((PHY_READ(sc, BRGPHY_MII_BMCR) & BRGPHY_BMCR_RESET) == 0) + break; + DELAY(1000); + } /* Handle any PHY specific procedures following the reset. */ switch (bsc->mii_oui) { Modified: stable/8/sys/dev/mii/mii_physubr.c ============================================================================== --- stable/8/sys/dev/mii/mii_physubr.c Tue Aug 23 14:01:04 2011 (r225115) +++ stable/8/sys/dev/mii/mii_physubr.c Tue Aug 23 14:32:53 2011 (r225116) @@ -276,8 +276,8 @@ mii_phy_reset(struct mii_softc *sc) DELAY(1000); } - /* NB: a PHY may default to isolation. */ - reg &= ~BMCR_ISO; + /* NB: a PHY may default to being powered down and/or isolated. */ + reg &= ~(BMCR_PDOWN | BMCR_ISO); if ((sc->mii_flags & MIIF_NOISOLATE) == 0 && ((ife == NULL && sc->mii_inst != 0) || (ife != NULL && IFM_INST(ife->ifm_media) != sc->mii_inst))) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-net@FreeBSD.ORG Tue Aug 23 14:40:08 2011 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61D3B106564A for ; Tue, 23 Aug 2011 14:40:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 51D278FC12 for ; Tue, 23 Aug 2011 14:40:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p7NEe8Jj007569 for ; Tue, 23 Aug 2011 14:40:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p7NEe8iI007568; Tue, 23 Aug 2011 14:40:08 GMT (envelope-from gnats) Date: Tue, 23 Aug 2011 14:40:08 GMT Message-Id: <201108231440.p7NEe8iI007568@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/158156: commit references a PR X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2011 14:40:08 -0000 The following reply was made to PR kern/158156; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/158156: commit references a PR Date: Tue, 23 Aug 2011 14:33:28 +0000 (UTC) Author: marius Date: Tue Aug 23 14:32:59 2011 New Revision: 225117 URL: http://svn.freebsd.org/changeset/base/225117 Log: MFC: r225014 r221812 (MFC'ed to stable/7 in r222160) reveals that at least some Broadcom PHYs default to being not only isolated but also powered down after a reset and while they just work fine [sic] when both is the case they don't if they are only deisolate but still powered down. So in order to put PHYs in an overall normal operation mode for the common case, ensure in mii_phy_reset() that they are not powered down after a reset. Unfortunately, this only helps in case of BCM5421, while BCM5709S apparently only work when they remain isolated and powered down after a reset. So don't call mii_phy_reset() in brgphy_reset() and implement the reset locally leaving the problematic bits alone. Effectively this bypasses r221812 for brgphy(4). Thanks to Justin Hibbits for doing a binary search in order to identify the problematic commit. PR: 157405, 158156 Reviewed by: yongari (mii_phy_reset() part) Modified: stable/7/sys/dev/mii/brgphy.c stable/7/sys/dev/mii/mii_physubr.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/brgphy.c ============================================================================== --- stable/7/sys/dev/mii/brgphy.c Tue Aug 23 14:32:53 2011 (r225116) +++ stable/7/sys/dev/mii/brgphy.c Tue Aug 23 14:32:59 2011 (r225117) @@ -913,10 +913,22 @@ brgphy_reset(struct mii_softc *sc) struct bge_softc *bge_sc = NULL; struct bce_softc *bce_sc = NULL; struct ifnet *ifp; - int val; + int i, val; - /* Perform a standard PHY reset. */ - mii_phy_reset(sc); + /* + * Perform a reset. Note that at least some Broadcom PHYs default to + * being powered down as well as isolated after a reset but don't work + * if one or both of these bits are cleared. However, they just work + * fine if both bits remain set, so we don't use mii_phy_reset() here. + */ + PHY_WRITE(sc, BRGPHY_MII_BMCR, BRGPHY_BMCR_RESET); + + /* Wait 100ms for it to complete. */ + for (i = 0; i < 100; i++) { + if ((PHY_READ(sc, BRGPHY_MII_BMCR) & BRGPHY_BMCR_RESET) == 0) + break; + DELAY(1000); + } /* Handle any PHY specific procedures following the reset. */ switch (bsc->mii_oui) { Modified: stable/7/sys/dev/mii/mii_physubr.c ============================================================================== --- stable/7/sys/dev/mii/mii_physubr.c Tue Aug 23 14:32:53 2011 (r225116) +++ stable/7/sys/dev/mii/mii_physubr.c Tue Aug 23 14:32:59 2011 (r225117) @@ -276,8 +276,8 @@ mii_phy_reset(struct mii_softc *sc) DELAY(1000); } - /* NB: a PHY may default to isolation. */ - reg &= ~BMCR_ISO; + /* NB: a PHY may default to being powered down and/or isolated. */ + reg &= ~(BMCR_PDOWN | BMCR_ISO); if ((sc->mii_flags & MIIF_NOISOLATE) == 0 && ((ife == NULL && sc->mii_inst != 0) || (ife != NULL && IFM_INST(ife->ifm_media) != sc->mii_inst))) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-net@FreeBSD.ORG Tue Aug 23 14:52:07 2011 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF7551065670; Tue, 23 Aug 2011 14:52:07 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 87B808FC12; Tue, 23 Aug 2011 14:52:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p7NEq7Ym024422; Tue, 23 Aug 2011 14:52:07 GMT (envelope-from marius@freefall.freebsd.org) Received: (from marius@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p7NEq6JZ024418; Tue, 23 Aug 2011 14:52:06 GMT (envelope-from marius) Date: Tue, 23 Aug 2011 14:52:06 GMT Message-Id: <201108231452.p7NEq6JZ024418@freefall.freebsd.org> To: jsc@ntu.edu.tw, marius@FreeBSD.org, freebsd-net@FreeBSD.org From: marius@FreeBSD.org Cc: Subject: Re: kern/158156: [bce] bce driver shows "no carrier" on IBM blade (HS22 with BCM5709) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 23 Aug 2011 14:52:07 -0000 Synopsis: [bce] bce driver shows "no carrier" on IBM blade (HS22 with BCM5709) State-Changed-From-To: open->closed State-Changed-By: marius State-Changed-When: Tue Aug 23 14:51:51 UTC 2011 State-Changed-Why: close http://www.freebsd.org/cgi/query-pr.cgi?pr=158156 From owner-freebsd-net@FreeBSD.ORG Tue Aug 23 22:56:09 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D60B3106566C for ; Tue, 23 Aug 2011 22:56:09 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6746B8FC08 for ; Tue, 23 Aug 2011 22:56:09 +0000 (UTC) Received: by fxe4 with SMTP id 4so766495fxe.13 for ; Tue, 23 Aug 2011 15:56:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=LceYVsrVIzEI89RgroNUn3P9lqLeddl3n1GsOLOhbwk=; b=CaxAS1aY434bMs2hqUGhv/F66140RA/Pp5kVdwli/S/Vcirj/my/PLCWzJZVjcJI2A G/uWPbzsTxhgMLNeUetiF5gCKIlTWjgayBAQQhBigv4oDoXw8U+sqNu7tnzRku9x8dXh S1Qh4czKFOjAVvR8E8lFMP/YpISZIYsnXTvMY= Received: by 10.223.62.145 with SMTP id x17mr6272360fah.21.1314138340221; Tue, 23 Aug 2011 15:25:40 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id q1sm317475faa.3.2011.08.23.15.25.38 (version=SSLv3 cipher=OTHER); Tue, 23 Aug 2011 15:25:38 -0700 (PDT) Sender: Alexander Motin Message-ID: <4E5428BF.3070600@FreeBSD.org> Date: Wed, 24 Aug 2011 01:25:03 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Gruel Bruno References: In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=windows-1250 Content-Transfer-Encoding: 7bit Cc: freebsd-net Subject: Re: MPD as LAC + Radius X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 23 Aug 2011 22:56:09 -0000 Hi. Gruel Bruno wrote: > I use MPD on FreeBSD 8.2 as LAC but i can't (or don't hnow how) check (user/password) off the pppoe client before "forwarding" the connection. > > I try a lot off variant on my mpd.conf without success. > > This is my config file (mpd.conf) : > > default: > load killa_lac > > killa_lac: > create link template L1 pppoe > set pppoe iface le0 > load radius > set link enable multilink > set link action forward L2 > set link enable incoming > create link template L2 l2tp > set l2tp peer X.X.X.X > set l2tp secret xxxxx > > radius: > set radius server X.X.X.X killa_lac > set radius retries 3 > set radius timeout 3 > set radius me X.X.X.X > set auth acct-update 300 > set auth enable radius-auth > set auth enable radius-acct > set radius disable message-authentic > > > Have got a idea ? In your configuration forwarding will happen without authorization just after link accepted. To have authorization you should remove "set link action forward L2" (or replace it with some "set link action bundle B1", if you want to terminate some calls locally by default) and instead make your RADIUS server to include to response vendor-specific AV-pair: mpd-action => "forward L2" As result, your RADIUS will be able to choose forward call (how and where), terminate it locally or just drop. -- Alexander Motin From owner-freebsd-net@FreeBSD.ORG Wed Aug 24 18:28:41 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23D78106566B for ; Wed, 24 Aug 2011 18:28:41 +0000 (UTC) (envelope-from mahan@mahan.org) Received: from ns.mahan.org (ns.mahan.org [67.116.10.138]) by mx1.freebsd.org (Postfix) with ESMTP id E17D88FC0A for ; Wed, 24 Aug 2011 18:28:39 +0000 (UTC) Received: from gypsy.mahan.org (localhost [127.0.0.1]) by ns.mahan.org (8.13.6/8.13.6) with ESMTP id p7OIFFRu032211 for ; Wed, 24 Aug 2011 11:15:18 -0700 (PDT) (envelope-from mahan@mahan.org) Message-ID: <4E553F29.7020101@mahan.org> Date: Wed, 24 Aug 2011 11:12:57 -0700 From: Patrick Mahan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: freebsd-net@freebsd.org X-Enigmail-Version: 1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Usage of IFQ_DEQUEUE vs IFQ_DRV_DEQUEUE X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2011 18:28:41 -0000 Can somebody confirm my assumption on the following: If I am supporting ALTQ in a driver, then I should use the IFQ_DRV_DEQUEUE() macro. If I am not supporting ALTQ then it is okay IFQ_DEQUEUE() macro? If not what's the difference? Slightly confused... Thanks, Patrick From owner-freebsd-net@FreeBSD.ORG Wed Aug 24 18:42:29 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EF7E106566C for ; Wed, 24 Aug 2011 18:42:29 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9ADA98FC16 for ; Wed, 24 Aug 2011 18:42:28 +0000 (UTC) Received: by ewy1 with SMTP id 1so857103ewy.13 for ; Wed, 24 Aug 2011 11:42:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=6hyM4o9uGDu+YYXFTpQUqn9oPbTsC8KEQzpNkwQtVsg=; b=Er0E9c6kCIW8csuSrzE2j/RECgW3zlqSlnRmaCwTeTP0xqOt4V5NlmfFeNP16bnYlM hG/UtZLYqY2SKhnfxtzGFP6j6gDyOnih/z6CrC4HdgJKN7rNM/hA3p9PFQkcrU8rAdfL qke/8NKCRRNWgCquxEduvBXDx144VOTDT03fw= MIME-Version: 1.0 Received: by 10.14.1.15 with SMTP id 15mr592817eec.100.1314211347353; Wed, 24 Aug 2011 11:42:27 -0700 (PDT) Received: by 10.14.98.73 with HTTP; Wed, 24 Aug 2011 11:42:27 -0700 (PDT) In-Reply-To: <4E553F29.7020101@mahan.org> References: <4E553F29.7020101@mahan.org> Date: Wed, 24 Aug 2011 22:42:27 +0400 Message-ID: From: Sergey Kandaurov To: Patrick Mahan Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-net@freebsd.org Subject: Re: Usage of IFQ_DEQUEUE vs IFQ_DRV_DEQUEUE X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2011 18:42:29 -0000 On 24 August 2011 22:12, Patrick Mahan wrote: > Can somebody confirm my assumption on the following: > > =A0If I am supporting ALTQ in a driver, then I should use the > =A0IFQ_DRV_DEQUEUE() macro. =A0If I am not supporting ALTQ then > =A0it is okay IFQ_DEQUEUE() macro? =A0If not what's the difference? > > Slightly confused... > Just in case, have you read man 9 altq? It has a good description of these macros. --=20 wbr, pluknet From owner-freebsd-net@FreeBSD.ORG Thu Aug 25 23:00:44 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45D62106564A for ; Thu, 25 Aug 2011 23:00:44 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0488B8FC16 for ; Thu, 25 Aug 2011 23:00:43 +0000 (UTC) Received: by gxk28 with SMTP id 28so2627448gxk.13 for ; Thu, 25 Aug 2011 16:00:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=5NwSuCp78H/j3IgP+4QjoXHdvPAJqbJ8Tjj6VG6PRxg=; b=AbxJBOdYRpBSP9jZMHzvPv1abb1M94Libb/f3AZ60C72NFYXI7COlSvJRzLgrFdt6R BAH1NgzfE5T+6UbJKrAazIqGYXPdvAy8LkHrcq+VxDzh995/mUSHTf1lmOPmpWBXPj/T c9MNPYNKHRSD6QwibR9pR0w0KguLUTMdkjx1U= MIME-Version: 1.0 Received: by 10.236.173.131 with SMTP id v3mr1923793yhl.112.1314311544870; Thu, 25 Aug 2011 15:32:24 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.236.102.147 with HTTP; Thu, 25 Aug 2011 15:32:24 -0700 (PDT) In-Reply-To: <4E144C00.9020804@aon.at> References: <4E144C00.9020804@aon.at> Date: Thu, 25 Aug 2011 15:32:24 -0700 X-Google-Sender-Auth: cLwEOz7qH9KUo68IwB9gMxJtOm4 Message-ID: From: Artem Belevich To: Martin Birgmeier Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-net@freebsd.org Subject: Re: amd + NFS reconnect = ICMP storm + unkillable process. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Aug 2011 23:00:44 -0000 On Wed, Jul 6, 2011 at 4:50 AM, Martin Birgmeier wrote: > Hi Artem, > > I have exactly the same problem as you are describing below, also with qu= ite > a number of amd mounts. > > In addition to the scenario you describe, another way this happens here > is when downloading a file via firefox to a directory currently open in > dolphin (KDE file manager). This will almost surely trigger the symptoms > you describe. > > I've had 7.4 running on the box before, now with 8.2 this has started to > happen. > > Alas, I don't have a solution. I may be on to something. Here's what seems to be happening in my case: * Process, that's in the middle of a syscall accessing amd mountpoint gets interrupted. * If the syscall was restartable, msleep at the beginning of get_reply: loop in in clnt_dg_call() would return ERESTART. * ERESTART will result in clnt_dg_call() returning with RPC_CANTRECV * clnt_reconnect_call() then will try to reconnect, and msleep will eventually fail with ERESTART in clnt_dg_call() again and the whole thing will be repeating for a while. I'm not familiar enough with the RPC code, but looking and clnt_vc.c and other RPC places, it appears that both EINTR and ERESTART should translate into RPC_INTR error. However in clnt_dg.c that's not the case and that's what seems to make amd-mounted accesses hang. Following patch (against RELENG-8 @ r225118) seems to have fixed the issue for me. With the patch I no longer see the hangs or ICMP storms on the test case that could reliably reproduce the issue within minutes. Let me know if it helps in your case. --- a/sys/rpc/clnt_dg.c +++ b/sys/rpc/clnt_dg.c @@ -636,7 +636,7 @@ get_reply: */ if (error !=3D EWOULDBLOCK) { errp->re_errno =3D error; - if (error =3D=3D EINTR) + if (error =3D=3D EINTR || error =3D=3D ERESTART) errp->re_status =3D stat =3D RPC_INTR; else errp->re_status =3D stat =3D RPC_CANTRECV; --Artem > > We should probably file a PR, but I don't even know where to assign it to= . > Amd does not seem much maintained, it's probably using some old-style > mounts (it never mounts anything via IPv6, for example). > > Regards, > > Martin > >> Hi, >> >> I wonder if someone else ran into this issue before and, maybe, have a >> solution. >> >> I've been running into a problem where access to filesystems mouted >> with amd wedges processes in an unkillable state and produces ICMP >> storm on loopback interface.I've managed to narrow down to NFS >> reconnect, but that's when I ran out of ideas. >> >> Usually the problem happens when I abort a parallel build job in an >> i386 jail on FreeBSD-8/amd64 (r223055). When the build job is killed >> now and then I end up with one process consuming 100% of CPU time on >> one of the cores. At the same time I get a lot of messages on the >> console saying "Limiting icmp unreach response from 49837 to 200 >> packets/sec" and the loopback traffic goes way up. >> >> As far as I can tell here's what's happening: >> >> * My setup uses a lot of filesystems mounted by amd. >> * amd itself pretends to be an NFS server running on the localhost and >> serving requests for amd mounts. >> * Now and then amd seems to change the ports it uses. Beats me why. >> * the problem seems to happen when some process is about to access amd >> mountpoint when amd instance disappears from the port it used to >> listen on. In my case it does correlate with interrupted builds, but I >> have no clue why. >> * NFS client detects disconnect and tries to reconnect using the same >> destination port. >> * That generates ICMP response as port is unreachable and it reconnect >> call returns almost immediatelly. >> * We try to reconnect again, and again, and again.... >> * the process in this state is unkillable >> >> Here's what the stack of the 'stuck' process looks like in those rare >> moments when it gets to sleep: >> 18779 100511 collect2 =A0 =A0 =A0 =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0m= i_switch+0x176 >> turnstile_wait+0x1cb _mtx_lock_sleep+0xe1 sleepq_catch_signals+0x386 >> sleepq_timedwait_sig+0x19 _sleep+0x1b1 clnt_dg_call+0x7e6 >> clnt_reconnect_call+0x12e nfs_request+0x212 nfs_getattr+0x2e4 >> VOP_GETATTR_APV+0x44 nfs_bioread+0x42a VOP_READLINK_APV+0x4a >> namei+0x4f9 kern_statat_vnhook+0x92 kern_statat+0x15 >> freebsd32_stat+0x2e syscallenter+0x23d >> >> * Usually some timeout expires in few minutes, the process dies, ICMP >> storm stops and the system is usable again. >> * On occasion the process is stuck forever and I have to reboot the box. >> >> I'm not sure who's to blame here. >> >> Is the automounter at fault for disappearing from the port it was >> supposed to listen to? >> If NFS guilty of trying blindly to reconnect on the same port and not >> giving up sooner? >> Should I flog the operator (ALA myself) for misconfiguring something >> (what?) in amd or NFS? >> >> More importantly -- how do I fix it? >> Any suggestions on fixing/debugging this issue? >> >> --Artem > From owner-freebsd-net@FreeBSD.ORG Fri Aug 26 01:24:51 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE5D9106564A; Fri, 26 Aug 2011 01:24:51 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 1861F8FC08; Fri, 26 Aug 2011 01:24:51 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqAEAJj1Vk6DaFvO/2dsb2JhbABDhEykPIFAAQEBAQIBAQEBIAQnIAsFFg4KAgINGQIpAQkmBggHBAEaAgSHUQSoQpFegSyED4ERBJEJghCRFw X-IronPort-AV: E=Sophos;i="4.68,283,1312171200"; d="scan'208";a="135594101" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 25 Aug 2011 21:24:28 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 1C93DB3F0F; Thu, 25 Aug 2011 21:24:28 -0400 (EDT) Date: Thu, 25 Aug 2011 21:24:28 -0400 (EDT) From: Rick Macklem To: Artem Belevich Message-ID: <1499650185.371230.1314321868068.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.203] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Win)/6.0.10_GA_2692) Cc: freebsd-net@freebsd.org, Martin Birgmeier Subject: Re: amd + NFS reconnect = ICMP storm + unkillable process. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2011 01:24:51 -0000 Artem Belevich wrote: > On Wed, Jul 6, 2011 at 4:50 AM, Martin Birgmeier > wrote: > > Hi Artem, > > > > I have exactly the same problem as you are describing below, also > > with quite > > a number of amd mounts. > > > > In addition to the scenario you describe, another way this happens > > here > > is when downloading a file via firefox to a directory currently open > > in > > dolphin (KDE file manager). This will almost surely trigger the > > symptoms > > you describe. > > > > I've had 7.4 running on the box before, now with 8.2 this has > > started to > > happen. > > > > Alas, I don't have a solution. > > I may be on to something. Here's what seems to be happening in my > case: > > * Process, that's in the middle of a syscall accessing amd mountpoint > gets interrupted. > * If the syscall was restartable, msleep at the beginning of > get_reply: loop in in clnt_dg_call() would return ERESTART. > * ERESTART will result in clnt_dg_call() returning with RPC_CANTRECV > * clnt_reconnect_call() then will try to reconnect, and msleep will > eventually fail with ERESTART in clnt_dg_call() again and the whole > thing will be repeating for a while. > Btw, I fixed exactly the same issue for the TCP code (clnt_vc.c) in r221127, so I wouldn't be surprised if the UDP code suffers the same problem. I'll take a look at your patch tomorrow. You could also try a TCP mount and see if the problem goes away. (For TCP on a pre-r221127 system, the symptom would be a client thread looping in the kernel in "R" state.) I'll look tomorrow, but it sounds like you've figured it out. Looks like a good catch to me at this point, rick > I'm not familiar enough with the RPC code, but looking and clnt_vc.c > and other RPC places, it appears that both EINTR and ERESTART should > translate into RPC_INTR error. However in clnt_dg.c that's not the > case and that's what seems to make amd-mounted accesses hang. > > Following patch (against RELENG-8 @ r225118) seems to have fixed the > issue for me. With the patch I no longer see the hangs or ICMP storms > on the test case that could reliably reproduce the issue within > minutes. Let me know if it helps in your case. > > --- a/sys/rpc/clnt_dg.c > +++ b/sys/rpc/clnt_dg.c > @@ -636,7 +636,7 @@ get_reply: > */ > if (error != EWOULDBLOCK) { > errp->re_errno = error; > - if (error == EINTR) > + if (error == EINTR || error == ERESTART) > errp->re_status = stat = RPC_INTR; > else > errp->re_status = stat = RPC_CANTRECV; > > --Artem > > > > > We should probably file a PR, but I don't even know where to assign > > it to. > > Amd does not seem much maintained, it's probably using some > > old-style > > mounts (it never mounts anything via IPv6, for example). > > > > Regards, > > > > Martin > > > >> Hi, > >> > >> I wonder if someone else ran into this issue before and, maybe, > >> have a > >> solution. > >> > >> I've been running into a problem where access to filesystems mouted > >> with amd wedges processes in an unkillable state and produces ICMP > >> storm on loopback interface.I've managed to narrow down to NFS > >> reconnect, but that's when I ran out of ideas. > >> > >> Usually the problem happens when I abort a parallel build job in an > >> i386 jail on FreeBSD-8/amd64 (r223055). When the build job is > >> killed > >> now and then I end up with one process consuming 100% of CPU time > >> on > >> one of the cores. At the same time I get a lot of messages on the > >> console saying "Limiting icmp unreach response from 49837 to 200 > >> packets/sec" and the loopback traffic goes way up. > >> > >> As far as I can tell here's what's happening: > >> > >> * My setup uses a lot of filesystems mounted by amd. > >> * amd itself pretends to be an NFS server running on the localhost > >> and > >> serving requests for amd mounts. > >> * Now and then amd seems to change the ports it uses. Beats me why. > >> * the problem seems to happen when some process is about to access > >> amd > >> mountpoint when amd instance disappears from the port it used to > >> listen on. In my case it does correlate with interrupted builds, > >> but I > >> have no clue why. > >> * NFS client detects disconnect and tries to reconnect using the > >> same > >> destination port. > >> * That generates ICMP response as port is unreachable and it > >> reconnect > >> call returns almost immediatelly. > >> * We try to reconnect again, and again, and again.... > >> * the process in this state is unkillable > >> > >> Here's what the stack of the 'stuck' process looks like in those > >> rare > >> moments when it gets to sleep: > >> 18779 100511 collect2 - mi_switch+0x176 > >> turnstile_wait+0x1cb _mtx_lock_sleep+0xe1 > >> sleepq_catch_signals+0x386 > >> sleepq_timedwait_sig+0x19 _sleep+0x1b1 clnt_dg_call+0x7e6 > >> clnt_reconnect_call+0x12e nfs_request+0x212 nfs_getattr+0x2e4 > >> VOP_GETATTR_APV+0x44 nfs_bioread+0x42a VOP_READLINK_APV+0x4a > >> namei+0x4f9 kern_statat_vnhook+0x92 kern_statat+0x15 > >> freebsd32_stat+0x2e syscallenter+0x23d > >> > >> * Usually some timeout expires in few minutes, the process dies, > >> ICMP > >> storm stops and the system is usable again. > >> * On occasion the process is stuck forever and I have to reboot the > >> box. > >> > >> I'm not sure who's to blame here. > >> > >> Is the automounter at fault for disappearing from the port it was > >> supposed to listen to? > >> If NFS guilty of trying blindly to reconnect on the same port and > >> not > >> giving up sooner? > >> Should I flog the operator (ALA myself) for misconfiguring > >> something > >> (what?) in amd or NFS? > >> > >> More importantly -- how do I fix it? > >> Any suggestions on fixing/debugging this issue? > >> > >> --Artem > > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-net@FreeBSD.ORG Fri Aug 26 01:43:13 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E72891065670 for ; Fri, 26 Aug 2011 01:43:13 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id A5FAD8FC0A for ; Fri, 26 Aug 2011 01:43:13 +0000 (UTC) Received: by ywo32 with SMTP id 32so2748031ywo.13 for ; Thu, 25 Aug 2011 18:43:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=UTQdMYIpUYqBSSHq0mXKwresGV+1hexVC1UkbrwpsY0=; b=KgcwgZr1XMKP31r4BBAM4DfiwG2XYX+UgPnqnjlhBwq1QftdybF+B0ovTK58pAhS33 PETy9CqK/8YeCDH/cgO5gxc4aTmxuEvtbpbjLkZaOHOfU5CmdErHdtuL3B9G90CC9bAt TGpKVRZ7X5sUgccVdCAHNhgUM0l9cPg7ISeqA= MIME-Version: 1.0 Received: by 10.236.37.230 with SMTP id y66mr3132254yha.10.1314322992838; Thu, 25 Aug 2011 18:43:12 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.236.102.147 with HTTP; Thu, 25 Aug 2011 18:43:12 -0700 (PDT) In-Reply-To: <1499650185.371230.1314321868068.JavaMail.root@erie.cs.uoguelph.ca> References: <1499650185.371230.1314321868068.JavaMail.root@erie.cs.uoguelph.ca> Date: Thu, 25 Aug 2011 18:43:12 -0700 X-Google-Sender-Auth: bybdCR29mhMinM-TEYHLApU4qj8 Message-ID: From: Artem Belevich To: Rick Macklem Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net@freebsd.org, Martin Birgmeier Subject: Re: amd + NFS reconnect = ICMP storm + unkillable process. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2011 01:43:14 -0000 On Thu, Aug 25, 2011 at 6:24 PM, Rick Macklem wrote: > Btw, I fixed exactly the same issue for the TCP code (clnt_vc.c) in > r221127, so I wouldn't be surprised if the UDP code suffers the same The code in clnt_vc.c was exactly what made me wonder about treatment of ERESTART. > problem. I'll take a look at your patch tomorrow. You could also try > a TCP mount and see if the problem goes away. (For TCP on a pre-r221127 > system, the symptom would be a client thread looping in the kernel in > "R" state.) In my case the process was also stuck in unkillable running state because the process never returns from the syscall. Unfortunately amd itself seems to handle NFS requests for its own top-level mountpoints only via UDP. At least I haven't found a way to do so without hacking rather convoluted amd code. > I'll look tomorrow, but it sounds like you've figured it out. Looks like > a good catch to me at this point, rick Let me know if you're OK with the patch and I'll commit to head and MFC it to stable/8. --Artem From owner-freebsd-net@FreeBSD.ORG Fri Aug 26 12:06:05 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AB791065688 for ; Fri, 26 Aug 2011 12:06:05 +0000 (UTC) (envelope-from zeus@relay.ibs.dn.ua) Received: from relay.ibs.dn.ua (relay.ibs.dn.ua [91.216.196.25]) by mx1.freebsd.org (Postfix) with ESMTP id E524D8FC13 for ; Fri, 26 Aug 2011 12:06:03 +0000 (UTC) Received: from relay.ibs.dn.ua (localhost [127.0.0.1]) by relay.ibs.dn.ua with ESMTP id p7QC61cU099557; Fri, 26 Aug 2011 15:06:01 +0300 (EEST) Received: (from zeus@localhost) by relay.ibs.dn.ua (8.14.4/8.14.4/Submit) id p7QC61Fm099556; Fri, 26 Aug 2011 15:06:01 +0300 (EEST) Date: Fri, 26 Aug 2011 15:06:01 +0300 From: Zeus V Panchenko To: freebsd-net@freebsd.org Message-ID: <20110826120601.GA18070@relay.ibs.dn.ua> Mail-Followup-To: freebsd-net@freebsd.org, freebsd-rc@freebsd.org References: <20101112070759.GA36248@relay.ibs.dn.ua> <20101112230000.GD22460@michelle.cdnetworks.com> <20110121125917.GA48950@relay.ibs.dn.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20110121125917.GA48950@relay.ibs.dn.ua> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 8.1-RELEASE X-Editor: GNU Emacs 23.2.1 X-Face: iVBORw0KGgoAAAANSUhEUgAAACoAAAAqBAMAAAA37dRoAAAAFVBMVEWjjoiZhHDWzcZuW1U wOT+RcGxziJxEN0lIAAABrklEQVQokV2STXLbMAyFQaraE3a5dzSTfR1IF7CQrM3QuECn9z9DH0 gxzgSyFvr88PBD0uJxoR6BE+e8LtRgohE5ZB50sODP/REbfUnte/z12+llCekLUSKenFIMke6Be WinE8H0RJHSN71rUQp64gFDmtDDhRk0zam3FzpNVFprhwPGaFo6oY9wDBJQ9Qz6EuKyROJjDGa+ uza4VOTa8iHlN58Yv5BF9+4BGl0LA5pUD5xKXg4aQlVZm0co3NKxCGxQpu3aC352Gv3DZONmwQd tkrlaylV3YSew7bWtwAZF/zi9jblmprPoL7ktzeFSxmarVNmWRi+Bmxg7Y7tbGtR8XZUxLTo86G thANsssetjp3POuBvMBRlw6jRa5pKN7yVlP+F2lyiZGSMf5hnSU6eAVupmtfjRcxy0momwpxDnz 06hwnOWvBnUdR8U2/KX7cq26u1Jy5xFZMPOVONRbRUrwey8Qar6cWgf12xSymQuVX0DfYd4R8kN Hg0qCtLeaYZcj8B90M2N0cEX1P0vKSxw7NLy/3X8Qeriusu66jNA37P4Mn5QRTG2hz4d9D/6E3a EX852nwAAAABJRU5ErkJggg== Cc: freebsd-rc@freebsd.org Subject: lagg(4) and alises X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: zeus@ibs.dn.ua List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2011 12:06:05 -0000 Hi, i need advice, please? while trying to set lagg(4) interface i faced some difficulty ... i need advice to optimize/correct the configuration ... mine current configuration is: igb2 igb3 | | igb0 +----------+---------+--------+ igb1 x.x.x.x ---+ FreeBSD 8.1-STABLE #4 amd64 +--- y.y.y.y/30 /29 +-------+---------+-----------+ | | em0 em1 | | switch00 -+- lagg0 -+- switch01 + + z.z.z.z/26 + + | | | | | +------ trunk 1 -----+ | +-------- trunk 2 -------+ /etc/rc.conf ... ifconfig_igb0="inet x.x.x.x/29 media autoselect" ifconfig_igb1="inet y.y.y.y/30 media autoselect" ifconfig_em0="UP" ifconfig_em1="UP" ifconfig_lagg0="laggproto lacp laggport em0 laggport em1" ipv4_addrs_lagg0="z.z.z.z/26" # only this forced it work, # ifconfig_lagg0 assigns # the address but it doesn't work ... now i need to set additional three ip addresses on lagg0 ... and everything i was trying was not working ... i was trying to add this to /etc/rc.conf: ifconfig_lagg0_alias0="inet 91.216.196.10/26" ifconfig_lagg0_alias1="inet 91.216.196.11/26" ifconfig_lagg0_alias2="inet 91.216.196.12/26" after reboot addresses are assigned but ifconfig lagg0 shows status: no carrier so, here is the question: how is it correct to set aliases on lagg(4) interface (aggregation protocol `lacp') in /etc/rc.conf file? -- Zeus V. Panchenko JID:zeus@gnu.org.ua GMT+2 (EET) From owner-freebsd-net@FreeBSD.ORG Fri Aug 26 19:04:44 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1C051065670; Fri, 26 Aug 2011 19:04:44 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 579AA8FC12; Fri, 26 Aug 2011 19:04:44 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EAATuV06DaFvO/2dsb2JhbABDhEykUYFAAQEFIwRSGw4KAgINGQJZBhOwaZFlgSyED4ERBJMakRw X-IronPort-AV: E=Sophos;i="4.68,286,1312171200"; d="scan'208";a="132377283" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 26 Aug 2011 15:04:43 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 9B4D5B3F29; Fri, 26 Aug 2011 15:04:43 -0400 (EDT) Date: Fri, 26 Aug 2011 15:04:43 -0400 (EDT) From: Rick Macklem To: Artem Belevich Message-ID: <2062808982.416174.1314385483626.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.203] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Win)/6.0.10_GA_2692) Cc: freebsd-net@freebsd.org, Martin Birgmeier Subject: Re: amd + NFS reconnect = ICMP storm + unkillable process. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2011 19:04:44 -0000 Artem Belevich wrote: > On Thu, Aug 25, 2011 at 6:24 PM, Rick Macklem > wrote: > > Btw, I fixed exactly the same issue for the TCP code (clnt_vc.c) in > > r221127, so I wouldn't be surprised if the UDP code suffers the same > > The code in clnt_vc.c was exactly what made me wonder about treatment > of ERESTART. > > > problem. I'll take a look at your patch tomorrow. You could also try > > a TCP mount and see if the problem goes away. (For TCP on a > > pre-r221127 > > system, the symptom would be a client thread looping in the kernel > > in > > "R" state.) > > In my case the process was also stuck in unkillable running state > because the process never returns from the syscall. > > Unfortunately amd itself seems to handle NFS requests for its own > top-level mountpoints only via UDP. At least I haven't found a way to > do so without hacking rather convoluted amd code. > > > I'll look tomorrow, but it sounds like you've figured it out. Looks > > like > > a good catch to me at this point, rick > > Let me know if you're OK with the patch and I'll commit to head and > MFC it to stable/8. > The patch looks good to me. The only thing is that *maybe* it should also do the same for the other msleep() higher up in clnt_dg_call()? (It seems to me that if this msleep() were to return ERESTART, the same kernel loop would occur.) Here's this variant of the patch (I'll let you decide which to commit). Good work tracking this down, rick --- rpc/clnt_dg.c.sav 2011-08-26 14:44:27.000000000 -0400 +++ rpc/clnt_dg.c 2011-08-26 14:48:07.000000000 -0400 @@ -467,7 +467,10 @@ send_again: cu->cu_waitflag, "rpccwnd", 0); if (error) { errp->re_errno = error; - errp->re_status = stat = RPC_CANTSEND; + if (error == EINTR || error == ERESTART) + errp->re_status = stat = RPC_INTR; + else + errp->re_status = stat = RPC_CANTSEND; goto out; } } @@ -636,7 +639,7 @@ get_reply: */ if (error != EWOULDBLOCK) { errp->re_errno = error; - if (error == EINTR) + if (error == EINTR || error == ERESTART) errp->re_status = stat = RPC_INTR; else errp->re_status = stat = RPC_CANTRECV; From owner-freebsd-net@FreeBSD.ORG Fri Aug 26 19:19:05 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDBEF1065670 for ; Fri, 26 Aug 2011 19:19:05 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8C22B8FC17 for ; Fri, 26 Aug 2011 19:19:05 +0000 (UTC) Received: by gwb15 with SMTP id 15so3761366gwb.13 for ; Fri, 26 Aug 2011 12:19:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=SfYpkcN8DeGRVG0TB8lfKTQxFsJAW87YFAfSI+xxr+4=; b=GZTgdMbLBtglYa7KmKqh7JSkyfP3wgrzHCUnyHbGNY0w4zMrKf6528gse4vWVbXpGQ 0VaJCTSbtFdT7U+Nq6oR/JfiUzm3JmM3Cc4GxaPdIyWFRWj2oS8ObbQqpCE7w6ERYy77 GN8ZWl4gHgiVCgbyF1tNsnAgWM/c2GJkPi/WQ= MIME-Version: 1.0 Received: by 10.236.173.131 with SMTP id v3mr9071437yhl.112.1314386344634; Fri, 26 Aug 2011 12:19:04 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.236.102.147 with HTTP; Fri, 26 Aug 2011 12:19:04 -0700 (PDT) In-Reply-To: <2062808982.416174.1314385483626.JavaMail.root@erie.cs.uoguelph.ca> References: <2062808982.416174.1314385483626.JavaMail.root@erie.cs.uoguelph.ca> Date: Fri, 26 Aug 2011 12:19:04 -0700 X-Google-Sender-Auth: fA10eb0yV04Tyj1ydXGWqpjhLU8 Message-ID: From: Artem Belevich To: Rick Macklem Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-net@freebsd.org, Martin Birgmeier Subject: Re: amd + NFS reconnect = ICMP storm + unkillable process. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2011 19:19:05 -0000 On Fri, Aug 26, 2011 at 12:04 PM, Rick Macklem wrote= : > The patch looks good to me. The only thing is that *maybe* it should > also do the same for the other msleep() higher up in clnt_dg_call()? > (It seems to me that if this msleep() were to return ERESTART, the same > =A0kernel loop would occur.) > > Here's this variant of the patch (I'll let you decide which to commit). > > Good work tracking this down, rick > > --- rpc/clnt_dg.c.sav =A0 2011-08-26 14:44:27.000000000 -0400 > +++ rpc/clnt_dg.c =A0 =A0 =A0 2011-08-26 14:48:07.000000000 -0400 > @@ -467,7 +467,10 @@ send_again: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cu->cu_waitflag, "rpccwnd", 0); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (error) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0errp->re_errno =3D error; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 errp->re_status =3D stat = =3D RPC_CANTSEND; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (error =3D=3D EINTR || e= rror =3D=3D ERESTART) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 errp->re_st= atus =3D stat =3D RPC_INTR; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 else > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 errp->re_st= atus =3D stat =3D RPC_CANTSEND; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto out; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0} You're right. I'll add the change to the commit. --Artem > @@ -636,7 +639,7 @@ get_reply: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 */ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (error !=3D EWOULDBLOCK) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0errp->re_errno =3D error; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (error =3D=3D EINTR) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (error =3D=3D EINTR || e= rror =3D=3D ERESTART) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0errp->re_s= tatus =3D stat =3D RPC_INTR; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0else > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0errp->re_s= tatus =3D stat =3D RPC_CANTRECV; > > From owner-freebsd-net@FreeBSD.ORG Fri Aug 26 23:32:28 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD49A1065686 for ; Fri, 26 Aug 2011 23:32:28 +0000 (UTC) (envelope-from mahan@mahan.org) Received: from ns.mahan.org (ns.mahan.org [67.116.10.138]) by mx1.freebsd.org (Postfix) with ESMTP id AC27E8FC17 for ; Fri, 26 Aug 2011 23:32:28 +0000 (UTC) Received: from gypsy.mahan.org (localhost [127.0.0.1]) by ns.mahan.org (8.13.6/8.13.6) with ESMTP id p7QNZ3fj045783; Fri, 26 Aug 2011 16:35:04 -0700 (PDT) (envelope-from mahan@mahan.org) Message-ID: <4E582D0C.50100@mahan.org> Date: Fri, 26 Aug 2011 16:32:28 -0700 From: Patrick Mahan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Sergey Kandaurov References: <4E553F29.7020101@mahan.org> In-Reply-To: X-Enigmail-Version: 1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: Usage of IFQ_DEQUEUE vs IFQ_DRV_DEQUEUE X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2011 23:32:28 -0000 On 8/24/11 11:42 AM, Sergey Kandaurov wrote: > On 24 August 2011 22:12, Patrick Mahan wrote: >> Can somebody confirm my assumption on the following: >> >> If I am supporting ALTQ in a driver, then I should use the >> IFQ_DRV_DEQUEUE() macro. If I am not supporting ALTQ then >> it is okay IFQ_DEQUEUE() macro? If not what's the difference? >> >> Slightly confused... >> > > Just in case, have you read man 9 altq? It has a good description of > these macros. > Sergey, That is exactly what I was looking for. Don't know how I missed that (sometimes get caught up in looking at the source) Thanks, Patrick From owner-freebsd-net@FreeBSD.ORG Sat Aug 27 09:31:03 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26257106566B for ; Sat, 27 Aug 2011 09:31:03 +0000 (UTC) (envelope-from Martin.Birgmeier@aon.at) Received: from email.aon.at (nat-warsl417-02.aon.at [195.3.96.120]) by mx1.freebsd.org (Postfix) with ESMTP id 61E3F8FC16 for ; Sat, 27 Aug 2011 09:31:01 +0000 (UTC) Received: (qmail 3078 invoked from network); 27 Aug 2011 09:04:19 -0000 Received: from smarthub80.res.a1.net (HELO email.aon.at) ([172.18.1.200]) (envelope-sender ) by fallback43.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 27 Aug 2011 09:04:19 -0000 Received: (qmail 9031 invoked from network); 27 Aug 2011 09:04:16 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on WARSBL506.highway.telekom.at X-Spam-Level: Received: from 91-113-4-141.adsl.highway.telekom.at (HELO gandalf.xyzzy) ([91.113.4.141]) (envelope-sender ) by smarthub80.res.a1.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 27 Aug 2011 09:04:16 -0000 Received: from atpcdvvc.xyzzy (atpcdvvc.xyzzy [IPv6:fec0:0:0:4d42::84]) by gandalf.xyzzy (8.14.4/8.14.4) with ESMTP id p7R94AI7016064 for ; Sat, 27 Aug 2011 11:04:12 +0200 (CEST) (envelope-from Martin.Birgmeier@aon.at) Message-ID: <4E58B30A.6000001@aon.at> Date: Sat, 27 Aug 2011 11:04:10 +0200 From: Martin Birgmeier User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:6.0) Gecko/20110817 Thunderbird/6.0 MIME-Version: 1.0 To: freebsd-net@freebsd.org References: <2062808982.416174.1314385483626.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: amd + NFS reconnect = ICMP storm + unkillable process. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2011 09:31:03 -0000 Thank you for these patches. One interesting thing: I was trying to backport them to 7.4.0 and RELENG_7, too, but there the portion of the code dealing with the RPC_CANTSEND case does not exist. On the other hand, the problem surfaced (for me) when upgrading from 7.4 to 8.2. So could one probably conclude that it is more the write case which leads to the erroneous behavior? Regards, Martin On 08/26/11 21:19, Artem Belevich wrote: > On Fri, Aug 26, 2011 at 12:04 PM, Rick Macklem wrote: >> The patch looks good to me. The only thing is that *maybe* it should >> also do the same for the other msleep() higher up in clnt_dg_call()? >> (It seems to me that if this msleep() were to return ERESTART, the same >> kernel loop would occur.) >> >> Here's this variant of the patch (I'll let you decide which to commit). >> >> Good work tracking this down, rick >> >> --- rpc/clnt_dg.c.sav 2011-08-26 14:44:27.000000000 -0400 >> +++ rpc/clnt_dg.c 2011-08-26 14:48:07.000000000 -0400 >> @@ -467,7 +467,10 @@ send_again: >> cu->cu_waitflag, "rpccwnd", 0); >> if (error) { >> errp->re_errno = error; >> - errp->re_status = stat = RPC_CANTSEND; >> + if (error == EINTR || error == ERESTART) >> + errp->re_status = stat = RPC_INTR; >> + else >> + errp->re_status = stat = RPC_CANTSEND; >> goto out; >> } >> } > You're right. I'll add the change to the commit. > > --Artem > >> @@ -636,7 +639,7 @@ get_reply: >> */ >> if (error != EWOULDBLOCK) { >> errp->re_errno = error; >> - if (error == EINTR) >> + if (error == EINTR || error == ERESTART) >> errp->re_status = stat = RPC_INTR; >> else >> errp->re_status = stat = RPC_CANTRECV; >> >> > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > > From owner-freebsd-net@FreeBSD.ORG Sat Aug 27 11:17:50 2011 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B74CE1065670; Sat, 27 Aug 2011 11:17:50 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8F5298FC08; Sat, 27 Aug 2011 11:17:50 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p7RBHo20005776; Sat, 27 Aug 2011 11:17:50 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p7RBHovf005772; Sat, 27 Aug 2011 11:17:50 GMT (envelope-from linimon) Date: Sat, 27 Aug 2011 11:17:50 GMT Message-Id: <201108271117.p7RBHovf005772@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-net@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/160206: [gif] gifX stops working after a while (IPv6 tunnel) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2011 11:17:50 -0000 Old Synopsis: gifX stops working after a while (IPv6 tunnel) New Synopsis: [gif] gifX stops working after a while (IPv6 tunnel) Responsible-Changed-From-To: freebsd-bugs->freebsd-net Responsible-Changed-By: linimon Responsible-Changed-When: Sat Aug 27 11:17:29 UTC 2011 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=160206 From owner-freebsd-net@FreeBSD.ORG Sat Aug 27 12:23:25 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3982F106566C for ; Sat, 27 Aug 2011 12:23:25 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id EBDA48FC1B for ; Sat, 27 Aug 2011 12:23:24 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap8EAIzgWE6DaFvO/2dsb2JhbABChEykVIFAAQEBAQIBAQEBIAQnIAsFFhgCAg0ZAikBCSYGCAcEARwEh1EEqD+RFYEshA+BEQSRDoIRkSA X-IronPort-AV: E=Sophos;i="4.68,289,1312171200"; d="scan'208";a="132428170" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 27 Aug 2011 08:23:23 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id EBE84B3F0F; Sat, 27 Aug 2011 08:23:23 -0400 (EDT) Date: Sat, 27 Aug 2011 08:23:23 -0400 (EDT) From: Rick Macklem To: Martin Birgmeier Message-ID: <915518840.435132.1314447803952.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <4E58B30A.6000001@aon.at> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.201] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Win)/6.0.10_GA_2692) Cc: freebsd-net@freebsd.org Subject: Re: amd + NFS reconnect = ICMP storm + unkillable process. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2011 12:23:25 -0000 Martin Birgmeier wrote: > Thank you for these patches. > > One interesting thing: I was trying to backport them to 7.4.0 and > RELENG_7, too, but there the portion of the code dealing with the > RPC_CANTSEND case does not exist. On the other hand, the problem > surfaced (for me) when upgrading from 7.4 to 8.2. So could one > probably > conclude that it is more the write case which leads to the erroneous > behavior? > Well, the kernel rpc code isn't used by NFS in FreeBSD7.n. The only thing that uses it in FreeBSD7.n is the NLM (Network Lock Manager). As such, I don't think the patch is critical for FreeBSD7.n, rick > Regards, > > Martin > > On 08/26/11 21:19, Artem Belevich wrote: > > On Fri, Aug 26, 2011 at 12:04 PM, Rick Macklem > > wrote: > >> The patch looks good to me. The only thing is that *maybe* it > >> should > >> also do the same for the other msleep() higher up in > >> clnt_dg_call()? > >> (It seems to me that if this msleep() were to return ERESTART, the > >> same > >> kernel loop would occur.) > >> > >> Here's this variant of the patch (I'll let you decide which to > >> commit). > >> > >> Good work tracking this down, rick > >> > >> --- rpc/clnt_dg.c.sav 2011-08-26 14:44:27.000000000 -0400 > >> +++ rpc/clnt_dg.c 2011-08-26 14:48:07.000000000 -0400 > >> @@ -467,7 +467,10 @@ send_again: > >> cu->cu_waitflag, "rpccwnd", 0); > >> if (error) { > >> errp->re_errno = error; > >> - errp->re_status = stat = RPC_CANTSEND; > >> + if (error == EINTR || error == ERESTART) > >> + errp->re_status = stat = RPC_INTR; > >> + else > >> + errp->re_status = stat = RPC_CANTSEND; > >> goto out; > >> } > >> } > > You're right. I'll add the change to the commit. > > > > --Artem > > > >> @@ -636,7 +639,7 @@ get_reply: > >> */ > >> if (error != EWOULDBLOCK) { > >> errp->re_errno = error; > >> - if (error == EINTR) > >> + if (error == EINTR || error == ERESTART) > >> errp->re_status = stat = RPC_INTR; > >> else > >> errp->re_status = stat = > >> RPC_CANTRECV; > >> > >> > > _______________________________________________ > > freebsd-net@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-net > > To unsubscribe, send any mail to > > "freebsd-net-unsubscribe@freebsd.org" > > > > > > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-net@FreeBSD.ORG Sat Aug 27 18:13:49 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1474106566B for ; Sat, 27 Aug 2011 18:13:49 +0000 (UTC) (envelope-from qing.li@bluecoat.com) Received: from whisker.bluecoat.com (whisker.bluecoat.com [216.52.23.28]) by mx1.freebsd.org (Postfix) with ESMTP id 9C6E38FC1A for ; Sat, 27 Aug 2011 18:13:49 +0000 (UTC) Received: from PWSVL-EXCHTS-01.internal.cacheflow.com ([10.2.2.122]) by whisker.bluecoat.com (8.14.2/8.14.2) with ESMTP id p7RIDnvF015695 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Sat, 27 Aug 2011 11:13:49 -0700 (PDT) Received: from PWSVL-EXCMBX-01.internal.cacheflow.com ([fe80::15bc:12e2:4676:340f]) by PWSVL-EXCHTS-01.internal.cacheflow.com ([fe80::5c50:e2ba:8115:4223%20]) with mapi id 14.01.0289.001; Sat, 27 Aug 2011 11:13:43 -0700 From: "Li, Qing" To: Chris Miller , "freebsd-net@freebsd.org" Thread-Topic: arpresolve: can't allocate llinfo Thread-Index: AQHMXGSrxELtCFeMakeyHAk+0A/mSZUxDKgA Date: Sat, 27 Aug 2011 18:13:43 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [216.52.23.68] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: Subject: RE: arpresolve: can't allocate llinfo X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2011 18:13:49 -0000 Hi, Could you please try the patch sitting at http://people.freebsd.org/~qingli/in.c.diff and let me know if it works for you? Thanks, -- Qing > -----Original Message----- > From: owner-freebsd-net@freebsd.org [mailto:owner-freebsd- > net@freebsd.org] On Behalf Of Chris Miller > Sent: Tuesday, August 16, 2011 3:05 PM > To: freebsd-net@freebsd.org > Subject: arpresolve: can't allocate llinfo >=20 > I'm using FreeBSD 8.1 and I'm seeing the following messages spit out > frequently. >=20 > IPv4 address: "169.254.231.172" is not on the network > arpresolve: can't allocate llinfo for 169.254.231.172 >=20 > Background: > I have two interfaces attached to the same LAN, both configured using > 169.254/16 link local automatic addressing. > ARP entries exist for each interface. > There are two routing entries for 169.254.0.0/16, one going out each > interface. >=20 > I've done some debugging and it appears that this happens when a packet > is > received on one of the interfaces and while sending the reply the > routing > lookup code says that we should send it out the other interface. This > causes > the "not on the network" message. >=20 > I'm looking for suggestions or patches to allow this configuration to > work > as I need to have both interfaces on this network for redundancy. >=20 > Thanks for any help. >=20 > -Chris Miller > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"