From owner-freebsd-net@FreeBSD.ORG Tue Jul 6 15:35:22 2010 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 C3326106566C for ; Tue, 6 Jul 2010 15:35:22 +0000 (UTC) (envelope-from tomelite82@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 086C38FC16 for ; Tue, 6 Jul 2010 15:35:21 +0000 (UTC) Received: by vws6 with SMTP id 6so7999105vws.13 for ; Tue, 06 Jul 2010 08:35:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=lEvATkb5TQrCVQx9vjAy0SPPOP1sm6D4UxHJR0+IIKI=; b=dxQ+OvqKPpYPHp4+XeC83CUzsFBsrUuj59CBliB2tRMAw5VN9FLNmhRkhhK8Mhb7Zf +bsHJFJCJ6ySYhxS/9CsCZ3Z2Ae5GCRbTU9TiCilq8VWkbatc+YYRgYtgIgSgZptbsHv qsdB+Ubd60KqgtnV+v4I00Ll9mPfepBy2saMc= DomainKey-Signature: a=rsa-sha1; c=nofws; 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; b=n2d4lQztnzKXZCBqVgqOvxoyqd8aVzcemCkm+lCY+dSR37fhTI2/nAW1RtC9T1lXe4 ol8CdnxQATjwzl/JOsWm7YtcRIAfwUzXtONh5XSp8V4gYi/ZSXKj3RAU1YzNDKDtCiBI K7rBHg9XLFACakCEE/CN+pVyOME04uNTvR6ZU= MIME-Version: 1.0 Received: by 10.220.88.224 with SMTP id b32mr2522955vcm.217.1278430513826; Tue, 06 Jul 2010 08:35:13 -0700 (PDT) Sender: tomelite82@gmail.com Received: by 10.220.97.207 with HTTP; Tue, 6 Jul 2010 08:35:13 -0700 (PDT) In-Reply-To: <4C2E598D.2000201@delphij.net> References: <20100702083902.D14969@maildrop.int.zabbadoz.net> <4C2E598D.2000201@delphij.net> Date: Tue, 6 Jul 2010 08:35:13 -0700 X-Google-Sender-Auth: hlBd1fMDb7ClEnuhbJXDZ5Eti6s Message-ID: From: Qing Li To: d@delphij.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "Bjoern A. Zeeb" , Sam Leffler , Chao Shin , "freebsd-net@freebsd.org" Subject: Re: panic: rtqkill route really not free on freebsd 8.0-release update 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, 06 Jul 2010 15:35:22 -0000 Thank you Xin. Let me have a look and see if there is an alternative. -- Qing On Fri, Jul 2, 2010 at 2:26 PM, Xin LI wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Hi, Bjoern, > > On 2010/07/02 01:39, Bjoern A. Zeeb wrote: >> On Sat, 5 Jun 2010, Chao Shin wrote: >> >> Hey, >> >>> We add kdb/ddb and extra panic info printing into kernel and catch >>> this panic again. >>> >>> We have instrumented the kernel and found that this panic happens when >>> draining =3D=3D 1, >>> but seems to be confused with the fact that all access to radix trees >>> are protected >>> by locks. =A0Can anyone familiar with these code shed us some light on >>> this? >>> >>> below is url to screenshot in ddb: >>> http://www.delphij.net/zhao/1.png >>> http://www.delphij.net/zhao/2.png >> >> Did anyone pick this up? > > I don't think so. > > Currently we believe that there is some call paths that would exhibit > the following: > > Thread A =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Thread B > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(...) > RTLOCK(rt) > rt->ref--; > [ref drops to 0 now] > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(obtain rnh_lock) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(in in_matroute) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0saw rt->ref =3D=3D 0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0rt->rt_flags & RTPRF_OURS = =3D=3D 0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(return from in_matroute()= ) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0RT_LOCK(rt) <-- blocks her= e > rt->rt_flags |=3D OURS > RT_UNLOCK(rt); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0RT_LOCK(rt) <-- got a wake= up > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0rt->ref++ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(ref =3D=3D 1 && rt->rt_fl= ags & RTPRF_OURS) > > With the attached workaround they have not see this type of panics so > far but that doesn't seem ideal. > > Kip and Qing's paper titled "Optimizing the BSD routing system for > parallel processing" suggests copying the route entry rather than > referencing it but I didn't yet on how should I implement that and do > benchmark... > > Cheers, > - -- > Xin LI =A0 =A0http://www.delphij.net/ > FreeBSD - The Power to Serve! =A0 =A0 =A0 =A0 =A0Live free or die > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.15 (FreeBSD) > > iQEcBAEBCAAGBQJMLlmNAAoJEATO+BI/yjfBzvAIANjmEXX54lryJ6Qq37yUFdmd > BQqw7r/Q7IYD6gOBU0/iMUySa4x6H3U+8TPUK8Rf+ARkG8CP3JsRMPJtLkFs5Eby > lmvQDRcfcKzFCAC40m/FmdlCl0c2Q/mz5H4PYve3zuU+BEDN0NOEIUtnYVmOJK1U > 4O5XXZcAzNT1BXKKwbogwQq0t4dhT/3+4inH6vC3w8HpzwDfXS2GogFSOYlSurvC > h7b2wjrD7sgTPZZj1DN7qWjGSRNAao+AGzlzvQR6tNCqWV+bn8qF+QaNoFepev+g > ITeUh9IXffn646WCRF5whKUjz+M9IvSPhqGiFyWfhcGj8DbDt074XMsHiBLh7nc=3D > =3DlHSK > -----END PGP SIGNATURE----- >