From owner-freebsd-net@FreeBSD.ORG Mon Jul 9 20:25:34 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 264C31065670; Mon, 9 Jul 2012 20:25:34 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 796988FC0C; Mon, 9 Jul 2012 20:25:33 +0000 (UTC) Received: by weyx56 with SMTP id x56so461598wey.13 for ; Mon, 09 Jul 2012 13:25:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=yV77FD0MW0GFu12xRLkzmo9uQeqTcXjqIGvSyWjuLB0=; b=c4x4C8N6SgazCMT65hMSvx22h+dvbk413YoB+4E9IoYk9CDLRpDpyus7gqU42i8aeU 0Ib4UnoHfECvHP+g64Q5ywOowjCA5HXQ4sLsbCIvV4RAFFD6CAtBhksoqOzqF/DR1WKc 3SOYd7ettDYk65FCCafiVgY1OuDSoch/7DvfUk0t0lbIHNCmC3x6Uak7RXQsZN0W5Q3E to9UXSG6UpadxVdWSkq956YQObYcmeUYXoN3qKcKTx9Xjuyvk8WKA0n5VB791Whf97EK VjcpW9x2pg1LHVPC7kousfzn2K1LqRkCvGiYSxviWBlxj7p1C6O/lzP3EMt/rVuDTRRW ytRg== MIME-Version: 1.0 Received: by 10.216.2.132 with SMTP id 4mr4649508wef.208.1341865532379; Mon, 09 Jul 2012 13:25:32 -0700 (PDT) Received: by 10.180.103.137 with HTTP; Mon, 9 Jul 2012 13:25:32 -0700 (PDT) In-Reply-To: <20120709081225.GJ21957@glebius.int.ru> References: <20110513162311.GK95084@glebius.int.ru> <4DD298AD.2060905@frasunek.com> <20110517184613.GN74366@glebius.int.ru> <4FDB1D71.6050908@freebsd.lublin.pl> <20120615203142.GW28613@glebius.int.ru> <4FDBAFD7.9020606@freebsd.lublin.pl> <4FDF2F81.6030307@sentex.net> <4FDF3097.6080701@freebsd.lublin.pl> <4FE0EE62.5070905@freebsd.lublin.pl> <4FF7F2C6.5070401@freebsd.lublin.pl> <20120709081225.GJ21957@glebius.int.ru> Date: Mon, 9 Jul 2012 16:25:32 -0400 Message-ID: From: Ryan Stone To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Cc: bzeeb-lists@lists.zabbadoz.net, Przemyslaw Frasunek , Mike Tancsa , Eugene Grosbein , freebsd-net@freebsd.org Subject: Re: mpd5/Netgraph issues after upgrading to 7.4 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, 09 Jul 2012 20:25:34 -0000 On Mon, Jul 9, 2012 at 4:12 AM, Gleb Smirnoff wrote: > This looks very much related to a known race in ARP code. > > See this email and related thread: > > http://lists.freebsd.org/pipermail/freebsd-net/2012-March/031865.html > > Ryan didn't check in any patches since, and I failed to follow on this > problem due to ENOTIME. > > I've added Ryan to Cc. Ryan, what's the status of the problem at your > side? Did you come to any solution? Unfortunately I was never able to come to a satisfactory solution. As I recall, in the end I ran headlong into problems with making the locking sane. The big problem was with arpresolve. At one point it calls callout_reset to schedule the LLE's la_timer. In my patch this would have to be done with a write lock help on the afdata lock. However, this acquisition would have to be done before taking the LLE_LOCK to prevent a LOR, and in the end you conclude that you have to take a write lock on the ifnet's afdata lock for every packet that goes through arpresolve, which was a non-starter. That's the point that I reached before I got distracted by other things at $WORK. As I recall, the in6 case was even worse, as the in6 equivalent of arptimer is significantly more complicated and likes to do crazy things like dropping locks.